
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 Gecko 1.9 (aka “trunk”). Songbird 0.2 was based on Gecko 1.8 (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 only sometimes. Why move to 1.9 then? Well, check out this feature list to get some idea.
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’s interface usage. But hey, not that much has changed from branch to trunk. I thought it would be easy.
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.
You see, Songbird has been cheating for a year now. With Gecko 1.8 all XULRunner apps were given three choices when it came to using Mozilla components. Components could use two flavors of “frozen” linkage or go for “internal” linkage. At the time the frozen libs didn’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’s like Mozilla threw wide their doors and said, “Please, take anything you’d like! No strings attached!” It was fast, it was easy, and it was great.
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, bsmedberg took pity on us cheaters and created a basic migration guide 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’t really bad at all.
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’m pleased to say that Songbird builds and runs almost perfectly on Gecko 1.9 after about four days of work. On Windows, at least. The Linux and Mac boxes are my next targets.
So what kept me busy? I had to move the nsAutoLock
classes into the glue, and I also had to add comparison operators to the frozen String API in order to make our STL classes happy. Oh, and there’s a nice bug in this function 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.
So, beyond our architecture plans we’re also going to be experiencing some platform love in the future. Look for hardware-accelerated graphics, airbag integration, transparency, SVG widgets, tighter OS integration, and, of course, the acid2 smiley face before too long. Exciting times, indeed.
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… 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 - It’s going to be a little messy for a while.
Oh, and our public svn server seems to be running a bit behind… Ausman/Mattman to the rescue?










