<?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>arjansnaterse.nl &#187; Extensions</title>
	<atom:link href="http://arjansnaterse.nl/tag/extensions/feed" rel="self" type="application/rss+xml" />
	<link>http://arjansnaterse.nl</link>
	<description></description>
	<lastBuildDate>Wed, 02 Dec 2009 07:48:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Extensions build script updated</title>
		<link>http://arjansnaterse.nl/extensions-build-script-updated</link>
		<comments>http://arjansnaterse.nl/extensions-build-script-updated#comments</comments>
		<pubDate>Mon, 19 Jan 2009 22:24:24 +0000</pubDate>
		<dc:creator>Arjan</dc:creator>
				<category><![CDATA[Firefox extensions]]></category>
		<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://arjansnaterse.nl/?p=159</guid>
		<description><![CDATA[Yesterday I wrote a post about building Firefox extensions in Mac OS. Unfortunately the script didn&#8217;t work perfectly so I have updated it now. The most important change is about the hidden file .DS_Store in Mac OS. When zipping a file (also via the Terminal) Mac OS includes this file and as a result of [...]<p><a href="http://arjansnaterse.nl/extensions-build-script-updated">Extensions build script updated</a> is a post from: <a href="http://arjansnaterse.nl">arjansnaterse.nl</a></p>
]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Farjansnaterse.nl%2Fextensions-build-script-updated"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Farjansnaterse.nl%2Fextensions-build-script-updated&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Extensions build script updated" alt=" Extensions build script updated" /><br />
			</a>
		</div>
<p>Yesterday I wrote a post about <a href="http://arjansnaterse.nl/build-script-firefox-extensions-mac-os">building Firefox extensions in Mac OS</a>. Unfortunately the script didn&#8217;t work perfectly so I have updated it now.</p>
<p>The most important change is about the hidden file <code>.DS_Store</code> in Mac OS. When zipping a file (also via the Terminal) Mac OS includes this file and as a result of that you Firefox extensions is notworking anymore..</p>
<p>The second part that is changed is the last rule. This rule installs the extension automatically and restarts Firefox. Well, if that ain&#8217;t easy! ;-)</p>
<p><a href="http://arjansnaterse.nl/extensions-build-script-updated">Extensions build script updated</a> is a post from: <a href="http://arjansnaterse.nl">arjansnaterse.nl</a></p>
]]></content:encoded>
			<wfw:commentRss>http://arjansnaterse.nl/extensions-build-script-updated/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build script for Firefox extensions in Mac OS X</title>
		<link>http://arjansnaterse.nl/build-script-firefox-extensions-mac-os</link>
		<comments>http://arjansnaterse.nl/build-script-firefox-extensions-mac-os#comments</comments>
		<pubDate>Sun, 18 Jan 2009 19:59:20 +0000</pubDate>
		<dc:creator>Arjan</dc:creator>
				<category><![CDATA[Firefox extensions]]></category>
		<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://arjansnaterse.nl/?p=151</guid>
		<description><![CDATA[Now and then I play some with Firefox extensions. While doing that I use a batch file that creates the XPI files easily. No problems this far. But&#8230;. A few weeks ago I got my new Macbook and I love it. The only thing was that I couldn&#8217;t use the batch file anymore. So I [...]<p><a href="http://arjansnaterse.nl/build-script-firefox-extensions-mac-os">Build script for Firefox extensions in Mac OS X</a> is a post from: <a href="http://arjansnaterse.nl">arjansnaterse.nl</a></p>
]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Farjansnaterse.nl%2Fbuild-script-firefox-extensions-mac-os"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Farjansnaterse.nl%2Fbuild-script-firefox-extensions-mac-os&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Build script for Firefox extensions in Mac OS X" alt=" Build script for Firefox extensions in Mac OS X" /><br />
			</a>
		</div>
<p>Now and then I play some with Firefox extensions. While doing that I use a <a href="http://gmacker.com/web/content/tutorial/firefox/firefoxtutorial.htm">batch file</a> that creates the XPI files easily. No problems this far.</p>
<p>But&#8230;. A few weeks ago I got my new Macbook and I love it. The only thing was that I couldn&#8217;t use the batch file anymore. So I adjusted the batch file and converted it to a shell script. Here&#8217;s the code:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">:
<span style="color: #666666; font-style: italic;"># @(#) --Builds Firefox extensions</span>
<span style="color: #007800;">BASELOC</span>=<span style="color: #007800;">$PWD</span>
<span style="color: #007800;">EXTENSION</span>=$<span style="color: #000000;">1</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> build
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> .<span style="color: #000000; font-weight: bold;">/</span>build<span style="color: #000000; font-weight: bold;">/</span>chrome
<span style="color: #7a0874; font-weight: bold;">cd</span> .<span style="color: #000000; font-weight: bold;">/</span>chrome
<span style="color: #c20cb9; font-weight: bold;">rm</span> .DS_Store
<span style="color: #c20cb9; font-weight: bold;">zip</span> <span style="color: #660033;">-r</span> <span style="color: #007800;">$EXTENSION</span>.jar .<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #007800;">$EXTENSION</span>.jar ..<span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #000000; font-weight: bold;">/</span>build<span style="color: #000000; font-weight: bold;">/</span>chrome
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$BASELOC</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">cp</span> .<span style="color: #000000; font-weight: bold;">/</span>install.<span style="color: #000000; font-weight: bold;">*</span> .<span style="color: #000000; font-weight: bold;">/</span>build
<span style="color: #c20cb9; font-weight: bold;">cp</span> .<span style="color: #000000; font-weight: bold;">/</span>update.<span style="color: #000000; font-weight: bold;">*</span> .<span style="color: #000000; font-weight: bold;">/</span>build
<span style="color: #c20cb9; font-weight: bold;">cp</span> .<span style="color: #000000; font-weight: bold;">/*</span>.manifest .<span style="color: #000000; font-weight: bold;">/</span>build
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> .<span style="color: #000000; font-weight: bold;">/</span>build<span style="color: #000000; font-weight: bold;">/</span>defaults
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> .<span style="color: #000000; font-weight: bold;">/</span>build<span style="color: #000000; font-weight: bold;">/</span>defaults<span style="color: #000000; font-weight: bold;">/</span>preferences
<span style="color: #7a0874; font-weight: bold;">cd</span> .<span style="color: #000000; font-weight: bold;">/</span>defaults<span style="color: #000000; font-weight: bold;">/</span>preferences
<span style="color: #c20cb9; font-weight: bold;">cp</span> .<span style="color: #000000; font-weight: bold;">/*</span>.<span style="color: #000000; font-weight: bold;">*</span> ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>build<span style="color: #000000; font-weight: bold;">/</span>defaults<span style="color: #000000; font-weight: bold;">/</span>preferences
<span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>build
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">rm</span> .DS_Store
<span style="color: #c20cb9; font-weight: bold;">zip</span> <span style="color: #660033;">-r</span> <span style="color: #007800;">$EXTENSION</span>.xpi .<span style="color: #000000; font-weight: bold;">/*</span>
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #007800;">$EXTENSION</span>.xpi ..<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-r</span> .<span style="color: #000000; font-weight: bold;">/</span>build
&nbsp;
<span style="color: #666666; font-style: italic;">## Restart Firefox and install extension</span>
<span style="color: #c20cb9; font-weight: bold;">killall</span> firefox-bin <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #000000; font-weight: bold;">/</span>Applications<span style="color: #000000; font-weight: bold;">/</span>Firefox.app<span style="color: #000000; font-weight: bold;">/</span>Contents<span style="color: #000000; font-weight: bold;">/</span>MacOS<span style="color: #000000; font-weight: bold;">/</span>firefox <span style="color: #660033;">-install-global-extension</span> <span style="color: #007800;">$PWD</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$EXTENSION</span>.xpi <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> open <span style="color: #660033;">-a</span> Firefox</pre></div></div>

<p>Save this file as <code>build.sh</code> and place it in the directory where you are developing the extension. Now open the Terminal, browse to the right path and make this file executable:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> +x .<span style="color: #000000; font-weight: bold;">/</span>build.sh</pre></div></div>

<p>To build your Firefox extension use the following code in the terminal:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>build.sh name_of_extension</pre></div></div>

<p>Everything is working so far? Cool! Now you have something which makes the extension development in Mac OS X a lot easier! If not, please leave a comment or contact me.</p>
<p>Good luck with it!</p>
<p><a href="http://arjansnaterse.nl/build-script-firefox-extensions-mac-os">Build script for Firefox extensions in Mac OS X</a> is a post from: <a href="http://arjansnaterse.nl">arjansnaterse.nl</a></p>
]]></content:encoded>
			<wfw:commentRss>http://arjansnaterse.nl/build-script-firefox-extensions-mac-os/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
