<?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>Mark's World &#187; Development</title>
	<atom:link href="http://www.digitalspace.ca/category/development/feed" rel="self" type="application/rss+xml" />
	<link>http://www.digitalspace.ca</link>
	<description>GNU Not just another ranting blog</description>
	<lastBuildDate>Thu, 14 Jan 2010 05:35:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mozilla MozCamp</title>
		<link>http://www.digitalspace.ca/2008/04/17/mozilla-mozcamp</link>
		<comments>http://www.digitalspace.ca/2008/04/17/mozilla-mozcamp#comments</comments>
		<pubDate>Thu, 17 Apr 2008 18:34:41 +0000</pubDate>
		<dc:creator>Mark Lise</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[ActiveState]]></category>
		<category><![CDATA[Flock]]></category>
		<category><![CDATA[Komodo]]></category>
		<category><![CDATA[MozCamp]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[PyXPCOM]]></category>
		<category><![CDATA[Shane Caraveo]]></category>
		<category><![CDATA[Sxipper]]></category>
		<category><![CDATA[xulrunner]]></category>

		<guid isPermaLink="false">http://www.digitalspace.ca/?p=48</guid>
		<description><![CDATA[<p>I made a trip to MozCamp organized by Shane Caraveo at ActiveState.  It was a meetup designed to bring together XUL developers from the surrounding Victoria / Vancouver area.  There was a decent response with about 20+ people representing various companies with notables such as Mozilla Messaging, Sxipper, Songbird, Activestate (obviously), and Flock.</p>
<p>Two of the [...]]]></description>
			<content:encoded><![CDATA[<p>I made a trip to MozCamp organized by Shane Caraveo at <a title="ActiveState" href="http://www.activestate.com/">ActiveState</a>.  It was a meetup designed to bring together XUL developers from the surrounding Victoria / Vancouver area.  There was a decent response with about 20+ people representing various companies with notables such as <a title="Mozilla Messaging" href="http://www.mozillamessaging.com/">Mozilla Messaging</a>, <a title="Sxipper" href="http://www.sxipper.com/">Sxipper</a>, <a title="Songbird" href="http://www.songbirdnest.com">Songbird</a>, <a title="ActiveState" href="http://www.activestate.com/">Activestate</a> (obviously), and <a title="Flock" href="http://www.flock.com/">Flock</a>.</p>
<p>Two of the main topics people seemed to gravitate towards was build systems and collaboration between companies developing open source software.  These topics will most likely shape a more structured discussion for the next MozCamp, hopefully &lt;biased opinion here/&gt; the next one will be in Victoria.</p>
<p>As for the collaboration, this is a great step forward for those using Xulrunner as their platform base.  Activestate has a number of patches against Xulrunner which haven&#8217;t yet landed on the tree.  I ran into some build issues myself when I wanted to build Python scripting natively into Xulrunner.  I searched around and eventually found <a title="PyXPCOM + Xulrunner" href="http://www.digitalspace.ca/2008/01/14/mozilla-python-xpcomdom-in-linux">a fix sitting at Activestate</a> (thanks guys!).</p>
<p>So, as a result of all this independent development on Xulrunner others may be duplicating work, or worse yet missing out on some key bugfixes.  Anybody developing Xulrunner based applications should get together and pool their bugs against Xulrunner so that it can help increase the priority of the bugs.  The more people running into the issue, the more likely it will be looked at and eventually pushed through <img src='http://www.digitalspace.ca/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<p>An important side note: As a direct result of going to MozCamp and talking to the ActiveState people, <a title="Komodo Edit" href="http://www.openkomodo.com/">Komodo Edit</a> has now become my editor of choice.  All Mozilla platform developers should be using this!  I&#8217;ll report more on this as I become more familiar with the product.  A big thanks to Shane for organizing this event, it was successful and I can&#8217;t wait for the next one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalspace.ca/2008/04/17/mozilla-mozcamp/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google App Engine Invite</title>
		<link>http://www.digitalspace.ca/2008/04/07/google-app-engine-invite</link>
		<comments>http://www.digitalspace.ca/2008/04/07/google-app-engine-invite#comments</comments>
		<pubDate>Tue, 08 Apr 2008 05:29:05 +0000</pubDate>
		<dc:creator>Mark Lise</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[app engine]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://www.digitalspace.ca/?p=45</guid>
		<description><![CDATA[<p>I was a little bummed when I was madly hitting refresh on the Google App Engine and couldn&#8217;t get through.  Once I did get through the 10K limit was already hit, all within about 15 minutes of release.  I was trying to be one of the 10,000 developers allowed access after I saw [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.jaiku.com/blog/wp-content/uploads/2008/04/jaiku-appengine.png" alt="Google App Engine" width="145" height="111" />I was a little bummed when I was madly hitting refresh on the <a href="http://code.google.com/appengine/">Google App Engine</a> and couldn&#8217;t get through.  Once I did get through the 10K limit was already hit, all within about 15 minutes of release.  I was trying to be one of the 10,000 developers allowed access after I saw their announcement about it a couple hours ago.  So here I am surfing around.. commenting on blogs.. and my inbox lights up.  It&#8217;s an email from <a href="http://www.google.com/">Google</a> saying, &#8220;Invitation to try Google App Engine&#8221;.  Woo!  I get to play with this thing.  Funny thing is that some of the most obvious names I would pick were already taken!  Oh well, happy with what I got.  We&#8217;ll see what I can make of this thing. <img src='http://www.digitalspace.ca/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalspace.ca/2008/04/07/google-app-engine-invite/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>OpenWeb Vancouver</title>
		<link>http://www.digitalspace.ca/2008/03/13/openweb-vancouver</link>
		<comments>http://www.digitalspace.ca/2008/03/13/openweb-vancouver#comments</comments>
		<pubDate>Thu, 13 Mar 2008 18:24:38 +0000</pubDate>
		<dc:creator>Mark Lise</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[openweb]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[vancouver]]></category>

		<guid isPermaLink="false">http://www.digitalspace.ca/2008/03/13/openweb-vancouver</guid>
		<description><![CDATA[<p>Geeks Unite! As the title says on their page&#8230;  I will be attending OpenWebVancouver this year.  This event I&#8217;m especially looking forward to as it brings together web technology, culture, design, and the open source discussion all in one neat little place.  If you want to learn about where the web is [...]]]></description>
			<content:encoded><![CDATA[<p>Geeks Unite! As the title says on their page&#8230;  I will be attending <a href="http://openwebvancouver.ca/">OpenWebVancouver</a> this year.  This event I&#8217;m especially looking forward to as it brings together web technology, culture, design, and the open source discussion all in one neat little place.  If you want to learn about where the web is going today from some of the top leaders in the space, come to Openweb Vancouver!  Talks include those from the <a href="http://www.mozilla.org/">Mozilla foundation</a>, <a href="http://www.google.com/">Google</a>, <a href="http://www.sun.com/">Sun Microsystems</a>, and <a href="http://www.facebook.com/">Facebook</a>.</p>
<p>The event is put on by the <a href="https://vancouver.php.net/">Vancouver PHP user&#8217;s association</a>, a non-profit organization that advances php development and other open source initiatives.  <a href="https://events.coverallcrew.com/openweb">Sign up and register</a> today to learn about or simply promote the use of open source technology!  Hope to see you all there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalspace.ca/2008/03/13/openweb-vancouver/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DemoCampVictoria Chapter.</title>
		<link>http://www.digitalspace.ca/2008/02/26/democampvictoria-chapter</link>
		<comments>http://www.digitalspace.ca/2008/02/26/democampvictoria-chapter#comments</comments>
		<pubDate>Tue, 26 Feb 2008 18:24:55 +0000</pubDate>
		<dc:creator>Mark Lise</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[barcamp]]></category>
		<category><![CDATA[democamp]]></category>
		<category><![CDATA[democamp vancouver]]></category>
		<category><![CDATA[democamp victoria]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[victoria]]></category>

		<guid isPermaLink="false">http://www.digitalspace.ca/2008/02/26/democampvictoria-chapter</guid>
		<description><![CDATA[<p>I had this idea to bring people together in my town to spice things up a bit &#8211; and I found DemoCampVancouver!  A few weeks back I decided to go check these guys out and I was pleasantly surprised!  It was very cool and I had blogged about it a while back.</p>
<p>Once I [...]]]></description>
			<content:encoded><![CDATA[<p>I had this idea to bring people together in my town to spice things up a bit &#8211; and I found <a href="http://barcamp.org/DemoCampVancouver05">DemoCampVancouver</a>!  A few weeks back I decided to go check these guys out and I was pleasantly surprised!  It was very cool and I had <a href="http://www.digitalspace.ca/category/democamp">blogged</a> about it a while back.</p>
<p>Once I saw how interesting their event was I decided to start a chapter in Victoria.  I want to bring people together from all different types of industry to make new relationships, new business ideas, new innovation and new everything!  It&#8217;s time to showcase what Victoria has with respect to tech.</p>
<p>I need to organize space, times, some presenters.. There is lots to be done &#8211; If you have an idea you want to share or just want to check out what&#8217;s happening in Victoria, come join the group!  I&#8217;ve set it up on facebook and barcamp so add your name!  I will have dates/spaces and all that to figure out in the next few weeks but I will be updating the wiki and group appropriately.  Hope to see you there!</p>
<p><a href="http://www.facebook.com/group.php?gid=22375720391">Facebook group</a><br />
<a href="http://www.barcamp.org/DemoCampVictoria">Barcamp Wiki</a></p>
<p class="flockcredit" style="text-align: right; color: #cccccc; font-size: x-small">Blogged with the <a style="color: #999999; font-weight: bold" title="Flock Browser" href="http://www.flock.com/blogged-with-flock" target="_new">Flock Browser</a></p>
<p><!-- technorati tags begin --></p>
<p style="font-size: 10px; text-align: right">Tags: <a rel="tag" href="http://technorati.com/tag/democampvictoriademocampvancouver%20democamp">democampvictoria democampvancouver democamp</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalspace.ca/2008/02/26/democampvictoria-chapter/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adventures moving to a Macbook Pro</title>
		<link>http://www.digitalspace.ca/2008/02/17/adventures-moving-to-a-macbook-pro</link>
		<comments>http://www.digitalspace.ca/2008/02/17/adventures-moving-to-a-macbook-pro#comments</comments>
		<pubDate>Sun, 17 Feb 2008 19:08:40 +0000</pubDate>
		<dc:creator>Mark Lise</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Flock]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[macboo pro]]></category>
		<category><![CDATA[refit]]></category>
		<category><![CDATA[triple boot]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.digitalspace.ca/2008/02/17/adventures-moving-to-a-macbook-pro</guid>
		<description><![CDATA[<p>One of the reasons why I wanted a Mac was so that I didn&#8217;t need to VNC into a Mini to do development of Flock.  My previous machine was an IBM TP60 &#8211; a decent machine which I had setup for dual-boot Windows XP and Ubuntu.  Originally Linux was Edgy then I dist-upgraded [...]]]></description>
			<content:encoded><![CDATA[<p>One of the reasons why I wanted a <a href="http://www.apple.com/">Mac</a> was so that I didn&#8217;t need to <a href="http://www.realvnc.com/">VNC</a> into a <a href="http://www.apple.com/macmini/">Mini</a> to do development of <a href="http://www.flock.com/">Flock</a>.  My previous machine was an IBM TP60 &#8211; a decent machine which I had setup for dual-boot Windows XP and <a href="http://www.ubuntu.com/">Ubuntu</a>.  Originally Linux was Edgy then I dist-upgraded to Gutsy &#8211; big mistake as dual-head screens no longer worked, but I digress.</p>
<p>It was a love-hate relationship with that machine.  It had a docking station which is something that I think is missing from the Macs.  Then again all I really need is just a few more USB ports so a hub will suffice.  The 4:3 screen sucked, however IBM has a new version that has a wide screen so it&#8217;s a bit better.  Linux was absolutely awesome &#8211; super fast, snappy response, no crashing&#8230;  developing Flock was a breeze.</p>
<p>Windows was a whole different set of apples!  The performance was absolute garbage, taking anywhere from 1-2 hours for an fbuild_all (neat little script that automatically updates subversion and builds from the root source dir).  Linux was no more than 45 minutes.  Now this is largely due to ccache being broken under cygwin, but even loading Thunderbird/Flock/Firefox/Pidgin/Skype makes the machine crawl.  I stayed mostly in Linux because I wanted to actually get *some* work done.  This created problems tho every time I booted into Windows because inevitably the tree would be so out of sync that I&#8217;d be spending a minimum of 1.5 hours just building before I could do anything.  Occasionally during the build my machine would hang when it was linking large object files.</p>
<p>Enter the new intel Macbook Pro: As soon as I got it I immediately got my hands on a Gutsy and WinXP disc.  I got my machine triple booting in probably less time than it took to do a full rebuild of Flock under my old machine.  I still needed to setup the build environments on each OS, but that wouldn&#8217;t be so bad.  I spend most of my time in OSX and I love it.  It&#8217;s exactly what I&#8217;ve been looking for all these years &#8211; nice eye candy with standardized installation of software (read: drag program into Applications folder) and a shell to interact with.  Performance of WinXP is actually better than what I was getting about of the IBM &#8211; so I&#8217;m happy there.</p>
<p>Having triple boot on the Mac is great &#8211; I think anyone developing cross-platform software targeting the big-3 definitely need to consider Mac.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalspace.ca/2008/02/17/adventures-moving-to-a-macbook-pro/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Featured Projects</title>
		<link>http://www.digitalspace.ca/2008/02/11/featured-projects</link>
		<comments>http://www.digitalspace.ca/2008/02/11/featured-projects#comments</comments>
		<pubDate>Mon, 11 Feb 2008 19:00:30 +0000</pubDate>
		<dc:creator>Mark Lise</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Flock]]></category>
		<category><![CDATA[open komodo]]></category>

		<guid isPermaLink="false">http://www.digitalspace.ca/2008/02/11/featured-projects</guid>
		<description><![CDATA[<p>Featured Projects on Mozilla&#8217;s site now shows Flock under Featured Mozilla-Based Applications.  Thank you Mozilla!  If you&#8217;re a developer you&#8217;ll want to check out Open Komodo &#8211; the IDE is really good and has support for many different languages (using plugins).  There was a recent extension added that allows you to interact [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mozilla.org/projects/">Featured Projects</a> on Mozilla&#8217;s site now shows <a href="http://www.flock.com/">Flock</a> under Featured Mozilla-Based Applications.  Thank you <a href="http://www.mozilla.org/">Mozilla</a>!  If you&#8217;re a developer you&#8217;ll want to check out <a href="http://www.openkomodo.com/">Open Komodo</a> &#8211; the IDE is really good and has support for many different languages (using plugins).  There was a <a href="http://www.openkomodo.com/blogs/toddw/komodo-developer-extension">recent extension</a> added that allows you to interact with a Komodo application on the fly, using either Javascript or Python!</p>
<p style="text-align: right; font-size: 8px">Blogged with <a title="Flock" href="http://www.flock.com/blogged-with-flock" target="_new">Flock</a></p>
<p><!-- technorati tags begin --></p>
<p style="font-size: 10px; text-align: right">Tags: <a rel="tag" href="http://technorati.com/tag/Mozilla">Mozilla</a>, <a rel="tag" href="http://technorati.com/tag/Development">Development</a>, <a rel="tag" href="http://technorati.com/tag/%20Flock"> Flock</a>, <a rel="tag" href="http://technorati.com/tag/%20Web%202.0"> Web 2.0</a>, <a rel="tag" href="http://technorati.com/tag/%20Firefox"> Firefox</a>, <a rel="tag" href="http://technorati.com/tag/%20Browser"> Browser</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalspace.ca/2008/02/11/featured-projects/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing auto-updaters</title>
		<link>http://www.digitalspace.ca/2008/01/28/writing-auto-updaters</link>
		<comments>http://www.digitalspace.ca/2008/01/28/writing-auto-updaters#comments</comments>
		<pubDate>Tue, 29 Jan 2008 00:34:02 +0000</pubDate>
		<dc:creator>Mark Lise</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[auto update]]></category>
		<category><![CDATA[download manager]]></category>
		<category><![CDATA[Flock]]></category>
		<category><![CDATA[netscape]]></category>

		<guid isPermaLink="false">http://www.digitalspace.ca/2008/01/28/writing-auto-updaters</guid>
		<description><![CDATA[<p>I was presented with a problem to solve last week &#8211; how do you get a Mozilla product to automatically suggest and download another product?  The method I came up with was use the extension updater to our advantage:  We can push an update via the browser&#8217;s autoupdate mechanism to install and extension [...]]]></description>
			<content:encoded><![CDATA[<p>I was presented with a problem to solve last week &#8211; how do you get a Mozilla product to automatically suggest and download another product?  The method I came up with was use the extension updater to our advantage:  We can push an update via the browser&#8217;s autoupdate mechanism to install and extension which does all the work for us!</p>
<p>1) Built-in update manager downloads and installs a custom xpi.</p>
<p>2) This extension will load on next start, so all we need to do is overlay the browser.xul and we&#8217;ve got startup on every instance from that moment forward.  All of our intended logic is encapsulated and run with privileges inside the chrome.</p>
<p>3) Use the hidden <a href="http://www.digitalspace.ca/2008/01/24/the-hidden-window-trick" target="_blank">window trick</a> to limit launching of the code to once-per-session.</p>
<p>4) Use the &#8220;@mozilla.org/download-manager;1&#8243; CID to initiate the download and then monitor all downloads using the observer service (watch for dl-start/dl-done etc).</p>
<p>5) Once that is complete, you can then call downloadedFileObject.targetFile.launch() and your installer will run!</p>
<p>More details will follow when I can release the code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalspace.ca/2008/01/28/writing-auto-updaters/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The hidden window trick</title>
		<link>http://www.digitalspace.ca/2008/01/24/the-hidden-window-trick</link>
		<comments>http://www.digitalspace.ca/2008/01/24/the-hidden-window-trick#comments</comments>
		<pubDate>Fri, 25 Jan 2008 05:46:15 +0000</pubDate>
		<dc:creator>Mark Lise</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[mozilla hidden window xul js]]></category>

		<guid isPermaLink="false">http://www.digitalspace.ca/2008/01/24/the-hidden-window-trick</guid>
		<description><![CDATA[<p>I was working with an extension today and I came across the need to overlay browser.xul, but only have my overlay fired once-per-session.  So, say you write an extension that puts a toolbar in as well as display some XUL on startup, but you don&#8217;t want the XUL to display every time browser.xul is loaded [...]]]></description>
			<content:encoded><![CDATA[<p>I was working with an extension today and I came across the need to overlay browser.xul, but only have my overlay fired once-per-session.  So, say you write an extension that puts a toolbar in as well as display some XUL on startup, but you don&#8217;t want the XUL to display every time browser.xul is loaded (which is every time a new browser window is created).  johnm in the #extedev channel on irc.mozilla.org reminded me about the <a href="http://developer.mozilla.org/en/docs/Working_with_windows_in_chrome_code#The _hidden_window_hack" target="_blank">hidden window trick</a>!  The basics is to call into nsIAppShellService and set a property value so that the next time your &#8220;onLoad()&#8221; function gets called, you can see if that property exists again.  The lifetime of any data that you create in the hidden window is for the session, so it&#8217;s the perfect example.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalspace.ca/2008/01/24/the-hidden-window-trick/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mozilla Python XPCOM/DOM in Linux</title>
		<link>http://www.digitalspace.ca/2008/01/14/mozilla-python-xpcomdom-in-linux</link>
		<comments>http://www.digitalspace.ca/2008/01/14/mozilla-python-xpcomdom-in-linux#comments</comments>
		<pubDate>Tue, 15 Jan 2008 04:52:00 +0000</pubDate>
		<dc:creator>Mark Lise</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[xpcom]]></category>
		<category><![CDATA[xulrunner]]></category>

		<guid isPermaLink="false">http://www.digitalspace.ca/2008/01/14/mozilla-python-xpcomdom-in-linux</guid>
		<description><![CDATA[<p>Recently I&#8217;ve been dabbling in python and I wanted to figure out a way to get it working in xulrunner.  My guide assumes you already know the basics of making a xulrunner application &#8211; see this guide first otherwise.  The two main things to really worry about are:</p>

build the source for xulrunner
build python [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been dabbling in <a href="http://www.python.org/" target="_blank">python</a> and I wanted to figure out a way to get it working in <a href="http://developer.mozilla.org/en/docs/XULRunner" target="_blank">xulrunner</a>.  My guide assumes you already know the basics of making a xulrunner application &#8211; see <a href="http://developer.mozilla.org/en/docs/Getting_started_with_XULRunner">this guide</a> first otherwise.  The two main things to really worry about are:</p>
<ul>
<li>build the source for xulrunner</li>
<li>build python xpcom/dom into xulrunner</li>
</ul>
<p><strong>Step One </strong></p>
<p>Checkout the client script from any directory (for these purposes i&#8217;ll say &#8220;/home/mark/development&#8221;):</p>
<blockquote><p>cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk</p>
<p>This will checkout the client.mk file which will be used to get the mozilla source.  A new directory will be created &#8220;mozilla&#8221; and you&#8217;ll find &#8220;client.mk&#8221; inside.</p></blockquote>
<p><strong>Step Two</strong></p>
<blockquote><p>Once step one is completed, change into the mozilla directory where the client.mk file is and create a new file called &#8220;.mozconfig&#8221;.  It is important to be named exactly how it sounds,dot-mozconfig.  This is the configuration file that will be used to checkout the specific source code that you want (xulrunner) and build it with the appropriate flags enabled.  This is mine:</p></blockquote>
<blockquote>
<blockquote><p>ac_add_options &#8211;disable-optimize &#8211;enable-debug<br />
mk_add_options MOZ_OBJDIR=@topsrcdir@/obj-xulrunner<br />
mk_add_options MOZ_BUILD_PROJECTS=&#8221;xulrunner&#8221;<br />
mk_add_options MOZ_CO_PROJECT=&#8221;xulrunner&#8221;<br />
ac_add_app_options xulrunner &#8211;enable-application=xulrunner<br />
ac_add_options &#8211;enable-default-toolkit=cairo-gtk2<br />
ac_add_options &#8211;disable-javaxpcom<br />
ac_add_options &#8211;enable-extensions=python,default<br />
ac_add_options &#8211;enable-svg<br />
ac_add_options &#8211;enable-xft<br />
ac_add_options &#8211;disable-tests</p></blockquote>
<p>Explanation of some of the key entries:</p>
<blockquote><p>ac_add_options &#8211;enable-extensions=python,default | This tells the build script to checkout and build both the python/xpcom and python/dom code.  You&#8217;re probably wondering what the difference is, and it&#8217;s pretty straightforward &#8211; python/dom is for using python instead of javascript for your xul handling; python/xpcom is to be able to embed python in an xpcom module.</p>
<p>ac_add_options &#8211;enable-default-toolkit=cairo-gtk2 | This is a MUST for linux-based systems.  You&#8217;ll get compile errors if you don&#8217;t!</p></blockquote>
</blockquote>
<p><strong>Step Three</strong></p>
<blockquote><p>Save the .mozconfig file and then execute:</p>
<blockquote><p>make -f client.mk checkout</p></blockquote>
<p>This will checkout all the xulrunner source, python source, and anything else relevant to building based on what you put in the .mozconfig file.  I enabled svg just because I wanted to play around with that too <img src='http://www.digitalspace.ca/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Now, normally at this stage you&#8217;d go on to compiling the source but as a result of a bug you&#8217;ll need get the following patch and apply it before you start the build:</p>
<p><a href="http://svn.openkomodo.com/openkomodo/view/openkomodo/trunk/mozilla/patches-new/HEAD/pyxpcom_pyxultest_make.patch?rev=132">http://svn.openkomodo.com/openkomodo/view/openkomodo/trunk/mozilla/patches-new/HEAD/pyxpcom_pyxultest_make.patch?rev=132</a></p>
<p>Please read <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=392210" target="_blank">mozilla bug #392210</a> for detailed explanation why.  The short and sweet is that the Makefile for linux screws up when trying to build the python object file.</p></blockquote>
<p><strong>Step Four</strong></p>
<blockquote><p>Time to build the source!  Execute the following:</p></blockquote>
<blockquote>
<blockquote><p>make -f client.mk build</p></blockquote>
<p>This may take a while. <img src='http://www.digitalspace.ca/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p></blockquote>
<p><strong>Step Five</strong></p>
<blockquote><p>Change into your mozilla object dir &#8211; this was set using:</p>
<blockquote><p>mk_add_options MOZ_OBJDIR=@topsrcdir@/obj-xulrunner</p></blockquote>
<p>In this case it will be &#8220;/home/mark/development/mozilla/obj-xulrunner/xulrunner&#8221;.  Now execute the following command:</p>
<blockquote><p>make package</p></blockquote>
<p>You don&#8217;t really need this to do initial development but I like to do it anyways and then move the whole xulrunner package over to a working project dir so that I can run my application in it&#8217;s own space without relying on my mozilla/obj directory.   This will probably take a while on your computer.</p></blockquote>
<p><strong>Step Six</strong></p>
<blockquote><p>Now you&#8217;ve successfully built xulrunner with python available for scripting!  Copy the dist/xulrunner directory to your project xulrunner directory:</p></blockquote>
<blockquote>
<blockquote><p>cp -a &#8220;/home/mark/development/mozilla/obj-xulrunner/xulrunner/dist/xulrunner&#8221; &#8220;/home/mark/development/my_cool_project/&#8221;</p></blockquote>
<p>You&#8217;ll have a fully encapsulated &#8220;xulrunner&#8221; platform to build your first python xulrunner-based app!   Hold on tho, you&#8217;re not quite done.  You now need to setup some enivronment variables.</p></blockquote>
<p><strong>Step Seven</strong></p>
<blockquote><p>I put the following into a function called &#8220;env_coolproj&#8221; inside my  .bashrc so that when I want to do development on this cool project, I can just execute &#8220;env_coolproj; cd $c&#8221; and it will setup all the environment variables for me nicely and cd&#8217;s me to the main application root directory.   I have setup my project using subversion so I&#8217;ve followed the standard svn repository layout.</p></blockquote>
<blockquote><p>export COOL_PROJECT_DEV_DIR=/home/mark/development/my_cool_project<br />
export PYTHONPATH=$PYTHONPATH:$COOL_PROJECT_DEV_DIR/my_cool_project/xulrunner/python MOZILLA_FIVE_HOME=$COOL_PROJECT_DEV_DIR/trunk/my_cool_project/xulrunner/<br />
export LD_LIBRARY_PATH=$MOZILLA_FIVE_HOME<br />
export c=$COOL_PROJECT_DEV_DIR/trunk/my_cool_project</p></blockquote>
<p>Now you&#8217;ve got a setup ready for python development!  The only thing you need to change in your xul to switch from javascript to python scripting is add the script-type=&#8221;application/x-python&#8221; to the window/page element (the first element not including the &lt;?xml/&gt; tags), and add &lt;script type=&#8221;application/x-python&#8221;src=&#8221;chrome://mycoolproj/content/main.py&#8221;/&gt; inside of that element.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalspace.ca/2008/01/14/mozilla-python-xpcomdom-in-linux/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
