<?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>Songbird Blog &#187; ben</title>
	<atom:link href="http://blog.songbirdnest.com/author/ben/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.songbirdnest.com</link>
	<description>Play music. Play the Web.</description>
	<lastBuildDate>Thu, 09 Feb 2012 00:55:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>We All Hate Crashes (a Little Less)</title>
		<link>http://blog.songbirdnest.com/2007/10/04/we-all-hate-crashes-a-little-less/</link>
		<comments>http://blog.songbirdnest.com/2007/10/04/we-all-hate-crashes-a-little-less/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 00:29:03 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://blog.songbirdnest.com/2007/10/04/we-all-hate-crashes-a-little-less</guid>
		<description><![CDATA[<a href="http://publicsvn.songbirdnest.com/wiki/Nightly_Builds"><img src="http://songbirdnest.com/files/images/74_crash-reporter.png"/></a>

Everyone hates it when an application crashes (I can't tell you how many times my code editor has crashed on me... GRR!), but changes in Songbird and Mozilla should make crashes a little easier to tolerate than before.

Recent nightlies (including the <a href="http://publicsvn.songbirdnest.com/wiki/Nightly_Builds">last blessed build</a>) have quietly enabled support for the <a href="http://wiki.mozilla.org/Breakpad">Mozilla Crash Reporter</a> using <a href="http://code.google.com/p/google-breakpad/">Google's Breakpad</a> library. Now every time Songbird crashes you will have the option to submit a small crash report to <a href="http://crashreports.songbirdnest.com">our server</a> for analysis. Check out the typical data included in a report <a href="http://crashreports.songbirdnest.com/report/index/24dfe005-72ba-11dc-8985-00301bb9b54d">here</a> on our <a href="http://code.google.com/p/socorro/">Socorro</a> server.

These reports are extremely helpful to us as they tell us exactly what went wrong when the application crashed, enabling us to fix our code and deliver a much more stable product in the future. Report submission is optional but you are strongly encouraged to help us improve the quality of Songbird by electing to share that valuable data. You'll be glad that you did!

And, of course, many thanks to the wonderful folks at Mozilla and Google for making this great open-source technology and for all their help getting it running.]]></description>
			<content:encoded><![CDATA[<p><a href="http://publicsvn.songbirdnest.com/wiki/Nightly_Builds"><img src="http://songbirdnest.com/files/images/74_crash-reporter.png"/></a></p>
<p>Everyone hates it when an application crashes (I can&#8217;t tell you how many times my code editor has crashed on me&#8230; GRR!), but changes in Songbird and Mozilla should make crashes a little easier to tolerate than before.</p>
<p>Recent nightlies (including the <a href="http://publicsvn.songbirdnest.com/wiki/Nightly_Builds">last blessed build</a>) have quietly enabled support for the <a href="http://wiki.mozilla.org/Breakpad">Mozilla Crash Reporter</a> using <a href="http://code.google.com/p/google-breakpad/">Google&#8217;s Breakpad</a> library. Now every time Songbird crashes you will have the option to submit a small crash report to <a href="http://crashreports.songbirdnest.com">our server</a> for analysis. Check out the typical data included in a report <a href="http://crashreports.songbirdnest.com/report/index/24dfe005-72ba-11dc-8985-00301bb9b54d">here</a> on our <a href="http://code.google.com/p/socorro/">Socorro</a> server.</p>
<p>These reports are extremely helpful to us as they tell us exactly what went wrong when the application crashed, enabling us to fix our code and deliver a much more stable product in the future. Report submission is optional but you are strongly encouraged to help us improve the quality of Songbird by electing to share that valuable data. You&#8217;ll be glad that you did!</p>
<p>And, of course, many thanks to the wonderful folks at Mozilla and Google for making this great open-source technology and for all their help getting it running.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.songbirdnest.com/2007/10/04/we-all-hate-crashes-a-little-less/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>XULRunner apps, meet the Mozilla build system</title>
		<link>http://blog.songbirdnest.com/2007/05/30/xulrunner-apps-meet-the-mozilla-build-system/</link>
		<comments>http://blog.songbirdnest.com/2007/05/30/xulrunner-apps-meet-the-mozilla-build-system/#comments</comments>
		<pubDate>Thu, 31 May 2007 03:31:57 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://blog.songbirdnest.com/2007/05/30/xulrunner-apps-meet-the-mozilla-build-system</guid>
		<description><![CDATA[<img src="http://www.songbirdnest.com/files/images/64_moz-build-system.png" height="244" width="241" alt="Birdbuilder">

The <a href="http://developer.mozilla.org/en/docs/How_Mozilla%27s_build_system_works">Mozilla build system</a> is big, complicated, and sparsely documented. There are only a <a href="http://ted.mielczarek.org/">few</a> <a href="http://benjamin.smedbergs.us/blog/">folks</a> that are actively working on it to my knowledge. As <a href="http://benjamin.smedbergs.us/blog/2006-11-08/tamarin-build-system/">bsmedberg pointed out</a>, however, the build system is also quite powerful and has had a ton of bugs worked out of it over the years. Unfortunately for most XULRunner developers it's also off limits unless you feel like jumping in and hacking it yourself. It builds Firefox, Thunderbird, XULRunner, and other Mozilla-hosted apps and extensions happily, but what about <a href="http://benjamin.smedbergs.us/xulrunner/xulmine-0.9.xulapp">XULMine</a>? <a href="http://developer.mozilla.org/en/docs/XULRunner_Hall_of_Fame">Other XULRunner apps</a>? <a href="http://songbirdnest.com">Songbird</a>?

Well, the build system underwent a substantial change last week. (more...)]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.songbirdnest.com/files/images/64_moz-build-system.png" height="244" width="241" alt="Birdbuilder"></p>
<p>The <a href="http://developer.mozilla.org/en/docs/How_Mozilla%27s_build_system_works">Mozilla build system</a> is big, complicated, and sparsely documented. There are only a <a href="http://ted.mielczarek.org/">few</a> <a href="http://benjamin.smedbergs.us/blog/">folks</a> that are actively working on it to my knowledge. As <a href="http://benjamin.smedbergs.us/blog/2006-11-08/tamarin-build-system/">bsmedberg pointed out</a>, however, the build system is also quite powerful and has had a ton of bugs worked out of it over the years. Unfortunately for most XULRunner developers it&#8217;s also off limits unless you feel like jumping in and hacking it yourself. It builds Firefox, Thunderbird, XULRunner, and other Mozilla-hosted apps and extensions happily, but what about <a href="http://benjamin.smedbergs.us/xulrunner/xulmine-0.9.xulapp">XULMine</a>? <a href="http://developer.mozilla.org/en/docs/XULRunner_Hall_of_Fame">Other XULRunner apps</a>? <a href="http://songbirdnest.com">Songbird</a>?</p>
<p>Well, the build system underwent a substantial change last week. (more&#8230;)<span id="more-195"></span></p>
<p>I&#8217;m happy to say that I landed some of the work to make the build system cooperate with XULRunner apps in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=380846">bug 380846</a>. I&#8217;m going to continue some smaller tasks next week. As <a href="http://home.kairo.at/blog/2007-05/weekly_status_report_w21_2007">some</a> <a href="http://weblogs.mozillazine.org/calendar/">other</a> <a href="http://hskupin.info/">guys</a> have already started making changes to their products&#8217; builds I figured I should at least blog about the changes that have gone in until I have time to make a doc on <a href="http://developer.mozilla.org/">MDC</a>.</p>
<p>The major changes are:</p>
<ol>
<li>
  Support for arbitrary applications through &#8216;&#8211;enable-application&#8217; in mozconfig files.</p>
<ul>
<li>
  Adding &#8216;&#8211;enable-application=myapp&#8217; to your &#8216;mozconfig&#8217; file instructs the build system to check the folder &#8216;mozilla/myapp/&#8217; for a &#8216;build.mk&#8217; file. This file, in turn, tells the build system where to start the build process. See the <a href="http://lxr.mozilla.org/seamonkey/source/minimo/build.mk">Minimo &#8216;build.mk&#8217;</a> for the simplest example in the tree. Note that if you forget to make a &#8216;build.mk&#8217; the build system will stop dead in its tracks and yell at you.
  </li>
<li>
  The folder &#8216;mozilla/myapp/&#8217; will be checked for a &#8216;confvars.sh&#8217; file to influence the behavior of the configure script. See the <a href="http://lxr.mozilla.org/seamonkey/source/xulrunner/confvars.sh">XULRunner &#8216;confvars.sh&#8217;</a> for an idea of what to do there. At a minimum you should set &#8216;MOZ_APP_NAME=myapp&#8217;, &#8216;MOZ_APP_DISPLAYNAME=My Amazing App&#8217;, and &#8216;MOZ_XUL_APP=1&#8242;. Add anything else you want. This file is completely optional, however.
  </li>
<li>
  The folder &#8216;mozilla/myapp/&#8217; will also be checked for a &#8216;makefiles.sh&#8217; file that will be called to tell the build system which makefiles the app requires. That script should call the &#8216;add_makefiles&#8217; function. See the <a href="http://lxr.mozilla.org/seamonkey/source/suite/makefiles.sh">Suite &#8216;makefiles.sh&#8217;</a> for a shiny new example. This file is optional, but it doesn&#8217;t really make sense to build a new app without adding at least one Makefile&#8230;
  </li>
</ul>
</li>
<li>
Support for arbitrary extensions through &#8216;&#8211;enable-extensions&#8217; in mozconfig files.</p>
<ul>
<li>
  Setting &#8216;&#8211;enable-extensions=myext&#8217; in your mozconfig file instructs the build system to look in the &#8216;mozilla/extensions/myext/&#8217; folder for a &#8216;makefiles.sh&#8217; script. That script should call &#8216;add_makefiles&#8217; as above to tell the build system which makefiles are required to build the extension.
  </li>
<li>
  Note that extensions cannot influence the configure script through a &#8216;confvars.sh&#8217; script, nor can they influence the starting point of the build system through a &#8216;build.mk&#8217; file.
  </li>
</ul>
</li>
<li>
  Support for building extensions without building another app first.</p>
<ul>
<li>
  For lightweight extensions it&#8217;s a pain to build something like XULRunner just to get your JAR built, so you can now specify &#8216;&#8211;enable-application=extensions&#8217; followed by &#8216;&#8211;enable-extensions=myext&#8217; in a mozconfig file.
  </li>
<li>
  Note that you probably won&#8217;t have much luck trying to compile binary components without building XULRunner first&#8230; This option is really only for extensions that have JS/XUL/CSS files (unless you have a libXUL SDK &#8211; see below).
  </li>
</ul>
</li>
</ol>
<p>So, what to do for XULRunner apps that don&#8217;t want to rebuild XULRunner each time? Here&#8217;s the plan:</p>
<ol>
<li>
Make a folder for your app in the &#8216;mozilla/&#8217; directory. Add &#8216;build.mk&#8217;, &#8216;confvars.sh&#8217;, and &#8216;makefiles.sh&#8217; files as detailed above.
</li>
<li>
Add &#8216;Makefile.in&#8217; files to your new folder to build your application. See the documentation on MDC for details on how to write makefiles. A good place to start is probably <a href="http://developer.mozilla.org/en/docs/Creating_Custom_Firefox_Extensions_with_the_Mozilla_Build_System">Plasticmillion&#8217;s extension tutorial</a>.
</li>
<li>
Use a mozconfig file similar to <a href="http://www.songbirdnest.com/node/1769">this</a> for whenever you want to build or rebuild your XULRunner SDK.
</li>
<li>
Use a mozconfig similar to <a href="http://www.songbirdnest.com/node/1770">this</a> to rebuild just your application.
</li>
<li>
Run &#8216;make -f client.mk&#8217; as usual!
</li>
</ol>
<p>This week (or next) I&#8217;ll be looking at reducing the number of makefiles required to build an app or extension with a libxul-sdk. I&#8217;ll also be looking at making a checkout target for just the build system so that you don&#8217;t have to pull the whole mozilla tree every time.</p>
<p>In the meantime, if anyone is interested in yanking makefiles out of the hugely bloated <a href="http://lxr.mozilla.org/seamonkey/source/allmakefiles.sh">&#8216;allmakefiles.sh&#8217;</a> and moving them into an app-specific &#8216;makefiles.sh&#8217; please feel free to ping me.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.songbirdnest.com/2007/05/30/xulrunner-apps-meet-the-mozilla-build-system/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Running the DRM Gauntlet</title>
		<link>http://blog.songbirdnest.com/2007/02/04/running-the-drm-gauntlet/</link>
		<comments>http://blog.songbirdnest.com/2007/02/04/running-the-drm-gauntlet/#comments</comments>
		<pubDate>Sun, 04 Feb 2007 20:09:57 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.songbirdnest.com/2007/02/04/running-the-drm-gauntlet</guid>
		<description><![CDATA[The next version of Songbird (0.2.5) will support Apple FairPlay and Windows Media DRM audio playback. Those features are already enabled in the latest <a href="http://publicsvn.songbirdnest.com/trac/wiki/Nightly_Builds">nightly build</a> and everyone is encouraged to give those builds a spin. If you're on Windows you'll need to have a new-ish version of Windows Media Player (probably 9 or newer) for protected WMA playback and QuickTime for Windows (probably 7 or newer) for FairPlay to work. On OS X you'll only get FairPlay playback, sorry.

How does this work? We don't hack out the encryption keys or anything illegal. Songbird supports multiple playback cores so we simply use Apple's and Microsoft's own playback engines to do the decoding for us. We use <a href="http://www.videolan.org/vlc/">VLC</a> for playback of most file types, but now whenever you play a protected WMA or M4P file we swap in the Windows Media Player or QuickTime core. Sounds easy, right?

Well, no. Not really. The world of DRM is a little (cough) unfriendly, so I figured that I should share some of the war stories and a few tricks for anyone interested in making DRM playback work in their own apps.

It seems both Apple and Microsoft are a little paranoid when it comes to debuggers. I fault Apple a little more than Microsoft in this case for reasons I'll hit in a second. But be forewarned: using DRM software under a debugger may not work correctly (or at all), and documentation may be totally misleading. What happens? Well...]]></description>
			<content:encoded><![CDATA[<p>The next version of Songbird (0.2.5) will support Apple FairPlay and Windows Media DRM audio playback. Those features are already enabled in the latest <a href="http://publicsvn.songbirdnest.com/trac/wiki/Nightly_Builds">nightly build</a> and everyone is encouraged to give those builds a spin. If you&#8217;re on Windows you&#8217;ll need to have a new-ish version of Windows Media Player (probably 9 or newer) for protected WMA playback and QuickTime for Windows (probably 7 or newer) for FairPlay to work. On OS X you&#8217;ll only get FairPlay playback, sorry.</p>
<p>How does this work? We don&#8217;t hack out the encryption keys or anything illegal. Songbird supports multiple playback cores so we simply use Apple&#8217;s and Microsoft&#8217;s own playback engines to do the decoding for us. We use <a href="http://www.videolan.org/vlc/">VLC</a> for playback of most file types, but now whenever you play a protected WMA or M4P file we swap in the Windows Media Player or QuickTime core. Sounds easy, right?</p>
<p>Well, no. Not really. The world of DRM is a little (cough) unfriendly, so I figured that I should share some of the war stories and a few tricks for anyone interested in making DRM playback work in their own apps.</p>
<p>It seems both Apple and Microsoft are a little paranoid when it comes to debuggers. I fault Apple a little more than Microsoft in this case for reasons I&#8217;ll hit in a second. But be forewarned: using DRM software under a debugger may not work correctly (or at all), and documentation may be totally misleading. What happens? Well&#8230;<span id="more-161"></span></p>
<p>Applications that use QuickTime APIs on OS X will appear to crash the *instant* a FairPlay track is loaded if the app has a debugger attached. Seriously. The entire app dies and prints &#8220;Program exited with code 055&#8243; to the console. What, you don&#8217;t know what code 055 is? No one else seemed to, either, except for Google. I was led to <a href="http://steike.com/HowToDebugITunesWithGdb">an excellent blog post</a> that helped me unravel this mystery. In a nutshell QuickTime aborts the app if it sees an attached debugger and prints that cryptic error message.</p>
<p>For an honest developer (me) trying to use Apple&#8217;s public API this is unacceptable. Killing the entire app is entirely unnecessary. Why not just make the load function fail? The QuickTime docs don&#8217;t mention this limitation as far as I have been able to find, and that is equally ridiculous. Try searching <a href="http://developer.apple.com/cgi-bin/search.pl?q=quicktime+055&#038;num=10&#038;site=default_collection">developer.apple.com</a> for &#8220;quicktime 055&#8243; and see how many hits you come up with. I&#8217;d even be happier if it printed a simple &#8220;Not allowed with an attached debugger&#8221; message. As it is I spent quite a bit of time examining my code for changes that could have caused a &#8220;crash&#8221; before admitting defeat and searching Google.</p>
<p>Fortunately there&#8217;s a really simple way around that mess. As detailed in the blog post above, the abort is triggered from the ptrace() function, so using gdb you can do an early return and keep your app alive. I added a gdb script to my machine that automatically skips ptrace() and I haven&#8217;t looked back. Except with bitterness.</p>
<p>Now, before I move on to Microsoft I should point out that once the debugging issue was solved I have been rather pleased with the way QuickTime works with protected content. It even works on Windows. The APIs are a little, uh, tough to get used to if you haven&#8217;t done much Carbon programming, but with enough time and patience I got an acceptable result (and I learned enough to know that I made some mistakes &#8211; I can&#8217;t wait to fix some of the code for 0.3).</p>
<p>Microsoft is just as paranoid about debuggers and DRM but they win the &#8220;developer friendly&#8221; award by a hair. Accessing protected WMA files with Windows Media Player seems just like opening any other file. Your app continues to run (amazing, no hard abort!) except that the file refuses to play under a debugger.</p>
<p>The play() function succeeds as it does for every other file, and let me tell you, it&#8217;s really frustrating to receive no error code when you know that something has obviously failed. I ended up adding a bunch of error logging code that examines the IWMPErrorItem associated with a media item and found that Windows Media Player was actually returning an error sometime after my play() call supposedly succeeded. This leads me to believe that play() does nothing more than add the internal play command to a queue somewhere (but good luck finding that in the <a href="http://msdn2.microsoft.com/en-us/library/bb248738.aspx">documentation</a>). </p>
<p>The error code returned was 0xC00D2767, and after a little searching I found that code was defined as NS_E_DRM_DEBUGGING_NOT_ALLOWED: &#8220;Running this process under a debugger while using DRM content is not allowed&#8221;. Of course I wasted several hours trying to figure out why play() was failing yet claiming success, so I was still royally upset when I realized I had been bitten by the same kind of &#8220;bug&#8221; that I had fought with QuickTime. But at least Microsoft was nice enough not to kill my app and to actually return an informative error code (albeit in a way that was difficult for me to figure out).</p>
<p>A week ago I had never used the Windows Media Player APIs, and I&#8217;m brand new to the QuickTime APIs as well. I&#8217;m sure a lot of my frustrations were just the normal headaches associated with learning new APIs. I&#8217;m also willing to bet that a bunch of the &#8220;bugs&#8221; I encountered were caused by me using those APIs incorrectly. I&#8217;m used to debugging XULRunner, and whenever I receive an error code I&#8217;m unfamiliar with or something fails for no reason I can go look at the code to figure out what&#8217;s going on. In contrast QuickTime and Windows Media Player are black boxes, and without good documentation it&#8217;s really tough to figure out what&#8217;s going on&#8230; Add DRM into the mix and the black box turns into a black hole.</p>
<p>Both Apple and Microsoft are trying to protect their DRM schemes (which isn&#8217;t a bad idea), but in doing so they&#8217;ve made it much more difficult to use their products. Maybe I would feel less bitter if they&#8217;d simply stamped a big red &#8220;WARNING&#8221; banner on their documentation.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.songbirdnest.com/2007/02/04/running-the-drm-gauntlet/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Living on the Edge: Songbird on Gecko 1.9</title>
		<link>http://blog.songbirdnest.com/2007/01/17/living-on-the-edge-songbird-on-gecko-19/</link>
		<comments>http://blog.songbirdnest.com/2007/01/17/living-on-the-edge-songbird-on-gecko-19/#comments</comments>
		<pubDate>Thu, 18 Jan 2007 03:49:25 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://blog.songbirdnest.com/2007/01/17/living-on-the-edge-songbird-on-gecko-19</guid>
		<description><![CDATA[<img src="http://www.songbirdnest.com/files/images/52_geckobird.png" alt="Geckobird">

After working on Songbird for a year you would think I could have written at least a dozen blog entries and dazzled the world with my wit and expertise. The joke would be on you, of course, because I haven't written a single one. Zilch. I'm lazy, I guess. Or shy. Or something.

So here we go, my first blog post... Ever.

I've recently been working to prepare Songbird for the fabled leap to <a href="http://lxr.mozilla.org/seamonkey/source/">Gecko 1.9</a> (aka "trunk"). Songbird 0.2 was based on <a href="http://lxr.mozilla.org/mozilla1.8/source/">Gecko 1.8</a> (two other apps you may be familiar with that were also built on Gecko 1.8 were Firefox 1.5 and Firefox 2.0). See, Gecko 1.8 has been around for a long time now. It has been thoroughly tested and crashes <a href="http://talkback-public.mozilla.org/reports/firefox/FF2001/index.html">only sometimes</a>. Why move to 1.9 then? Well, check out <a href="http://wiki.mozilla.org/Firefox3/Gecko_Feature_List">this feature list</a> to get some idea. 
]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.songbirdnest.com/files/images/52_geckobird.png" alt="Geckobird"></p>
<p>After working on Songbird for a year you would think I could have written at least a dozen blog entries and dazzled the world with my wit and expertise. The joke would be on you, of course, because I haven&#8217;t written a single one. Zilch. I&#8217;m lazy, I guess. Or shy. Or something.</p>
<p>So here we go, my first blog post&#8230; Ever.</p>
<p>I&#8217;ve recently been working to prepare Songbird for the fabled leap to <a href="http://lxr.mozilla.org/seamonkey/source/">Gecko 1.9</a> (aka &#8220;trunk&#8221;). Songbird 0.2 was based on <a href="http://lxr.mozilla.org/mozilla1.8/source/">Gecko 1.8</a> (two other apps you may be familiar with that were also built on Gecko 1.8 were Firefox 1.5 and Firefox 2.0). See, Gecko 1.8 has been around for a long time now. It has been thoroughly tested and crashes <a href="http://talkback-public.mozilla.org/reports/firefox/FF2001/index.html">only sometimes</a>. Why move to 1.9 then? Well, check out <a href="http://wiki.mozilla.org/Firefox3/Gecko_Feature_List">this feature list</a> to get some idea.<br />
<span id="more-151"></span><br />
The trick is that all interfaces were frozen on the 1.8 branch some time ago. Not so on trunk. So I knew I was in for a little pain trying to update all of Songbird&#8217;s interface usage. But hey, not <em>that</em> much has changed from branch to trunk. I thought it would be easy.</p>
<p>But it turns out that there was something else I had to do first. Something I had tried to ignore for as long as possible. Something I knew would bite me eventually.</p>
<p>You see, Songbird has been cheating for a year now. With Gecko 1.8 all XULRunner apps were given <a href="http://developer.mozilla.org/en/docs/XPCOM_Glue">three choices</a> when it came to using Mozilla components. Components could use two flavors of &#8220;frozen&#8221; linkage or go for &#8220;internal&#8221; linkage. At the time the frozen libs didn&#8217;t provide all the love we thought we needed, and rather than spend the time to expand the libs we decided to coast on through with internal linkage. It&#8217;s like Mozilla threw wide their doors and said, &#8220;Please, take anything you&#8217;d like! No strings attached!&#8221; It was fast, it was easy, and it was great.</p>
<p>We were warned, of course, that such open access would disappear in the future. Well, the future is now, as they say, and in Gecko 1.9 it is no longer possible to use internal linkage. Luckily, <a href="http://benjamin.smedbergs.us/blog/">bsmedberg</a> took pity on us cheaters and created a <a href="http://developer.mozilla.org/en/docs/Migrating_from_Internal_Linkage_to_Frozen_Linkage">basic migration guide</a> to help XULRunner apps move to using the frozen linkage. He has also added to the glue libraries substantially in the last year so that using frozen linkage isn&#8217;t really bad at all.</p>
<p>So for the last few days I have been working on porting all of our code to use Gecko 1.9 as well as frozen linkage. I got more than I bargained for, to be sure, but I&#8217;m pleased to say that Songbird builds and runs <em>almost</em> perfectly on Gecko 1.9 after about four days of work. On Windows, at least. The Linux and Mac boxes are my next targets.</p>
<p>So what kept me busy? I had to move the <a href="http://lxr.mozilla.org/seamonkey/source/xpcom/glue/nsAutoLock.h">nsAutoLock</a><br />
classes into the glue, and I also had to add <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=366592">comparison operators</a> to the <a href="http://lxr.mozilla.org/seamonkey/source/xpcom/glue/nsStringAPI.h">frozen String API</a> in order to make our STL classes happy. Oh, and there&#8217;s a nice bug in <a href="http://lxr.mozilla.org/seamonkey/source/xpcom/glue/nsStringAPI.cpp#225">this function</a> that took about a day to track down (50 points if you can spot the problem without checking my patch!). Aside from those few problems I must say that everything else migrated nicely.</p>
<p>So, beyond our <a href="http://blog.songbirdnest.com/2007/01/08/documentation-fury/">architecture plans</a> we&#8217;re also going to be experiencing some platform love in the future. Look for hardware-accelerated graphics, <a href="http://code.google.com/p/airbag/">airbag integration</a>, transparency, SVG widgets, tighter OS integration, and, of course, the <a href="http://www.webstandards.org/files/acid2/test.html">acid2 smiley face</a> before too long. Exciting times, indeed.</p>
<p>So I went ahead and landed the majority of the changes needed for 1.9 builds to work tonight. The only hitch is that I only got a chance to check in the debug Mozilla SDK for windows&#8230; So mac and linux builds are totally hosed at the moment. Fun! I would highly recommend that eager-beaver types wait a bit before pulling the latest source &#8211; It&#8217;s going to be a little messy for a while.</p>
<p>Oh, and our public svn server seems to be running a bit behind&#8230; Ausman/Mattman to the rescue?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.songbirdnest.com/2007/01/17/living-on-the-edge-songbird-on-gecko-19/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

