<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Rory Craig-Barnes &#187; Blackberry</title>
	<atom:link href="http://rorycraigbarnes.com/category/blackberry-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://rorycraigbarnes.com</link>
	<description>Cooking. Baking. Whippets. Coding. Photography.</description>
	<lastBuildDate>Wed, 01 May 2013 13:26:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>BlackBerry WebWorks Deploy Bash Scripts</title>
		<link>http://rorycraigbarnes.com/2012/05/25/blackberry-webworks-deploy-bash-scripts/</link>
		<comments>http://rorycraigbarnes.com/2012/05/25/blackberry-webworks-deploy-bash-scripts/#comments</comments>
		<pubDate>Fri, 25 May 2012 22:59:41 +0000</pubDate>
		<dc:creator>rory</dc:creator>
				<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[blackberry]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[WebWorks]]></category>

		<guid isPermaLink="false">http://rorycraigbarnes.com/?p=99</guid>
		<description><![CDATA[Things you should know: I am inherently a lazy coder and forgetful to make things worse. This means every time I needed to build and deploy an app for debug or submission I have to remember what the heck I &#8230; <a href="http://rorycraigbarnes.com/2012/05/25/blackberry-webworks-deploy-bash-scripts/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><strong>Things you should know:</strong> I am inherently a lazy coder and forgetful to make things worse.</p>
<p>This means every time I needed to build and deploy an app for debug or submission I have to remember what the heck I needed to do again. On top of that I had to figure out what the last buildID I used was.</p>
<p>That often led to a lot of annoyance on my part. To solve this problem I used my very basic Bash scripting knowledge from my day job to automate building (debug, signing and signing with debug) and versioning.</p>
<p>I hadn&#8217;t thought these scripts would be of interest to anyone but me, but it seems as though they might be.</p>
<ul>
<li><a href="http://glpr.ca/JZWReM" target="_blank">Playbook Build/Deploy Script</a></li>
<li><a href="http://glpr.ca/JZWLUu" target="_blank">DevAlpha Build/Deploy Script</a></li>
</ul>
<p>You can modify either of those to do Smartphone builds, I just haven&#8217;t updated mine yet with the automatic buildID when signing so I am not including it yet (might add that over the weekend.)</p>
<p>Once you have these scripts just run:</p>
<p>./build_pb.sh &lt;appname&gt; &lt;buildtype&gt;<br />
or<br />
./build_bb10.sh &lt;appname&gt; &lt;buildtype&gt;</p>
<p>&lt;appname&gt; is the directory name where the app src is store<br />
&lt;buildtype&gt; can be debug, sign or sign_debug</p>
<p>What the script does:</p>
<ul>
<li>deletes the current build src</li>
<li>deletes current zip file</li>
<li>deletes current bar file (make a copy of the versions you want)</li>
<li>copies your new src to the build directory</li>
<li>strips .DS_store files (you can add other files/folders if you want)</li>
<li>creates a zip file</li>
<li>compiles with the proper SDK  and flags</li>
<li>deploys it to your specified device.</li>
</ul>
<p><strong>The finer points:</strong><br />
To make these work you need to have a fairly specific directory setup so they script properly does things for you (although you could customize this for yourself)</p>
<p><em>Source location</em> (in my case: /Users/rory/Sites/&lt;appname&gt;/pb)<br />
The important part here is &#8216;&lt;appname&gt;/pb&#8217; you can tell the script the first bit, but all your app source needs to be structured like this or the script will fail.</p>
<p><em>Build location</em> (in my case: /Users/rory/Sites/builds/&lt;appname&gt;/pb<br />
Again the important part is &#8216;&lt;appname&gt;/pb&#8217; you can tell it where to look for this but it will always be built in the same place. This directory needs to exist before the script is run.</p>
<p>That is it.</p>
<p>If you have any questions or feedback on these (or if you make improvements to them) I would love to hear about it. I am still learning the ropes of Bash scripting and would love to improve my skills.</p>
]]></content:encoded>
			<wfw:commentRss>http://rorycraigbarnes.com/2012/05/25/blackberry-webworks-deploy-bash-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
