<?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; xulrunner</title>
	<atom:link href="http://www.digitalspace.ca/tag/xulrunner/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>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>
