Packaging XULRunner to build Songbird
Overview
This page assumes you have followed the steps on the Build XULRunner for Songbird page and you now have a properly patch and built XULRunner tree. From here the steps are very simple
- Removing existing files.
- Use our script to package the "Mozilla SDK"
- Use our script to package the XULRunner tarball (or on windows zip it up)
- Build songbird.
In tools/scripts you will find the neccessary scripts to package XULRunner. They are make-mozilla-sdk.sh and make-xulrunner-tarball.sh. Do not get confused and accidentally use make-code-tarball.sh, that is for a completely different process.
Step Detail
- Remove existing files. You'll want to certainly removing the files for the mozilla sdk, which reside in songbird/trunk/dependencies/<your platform>/mozilla/[debug|release]. I also generally like to remove the xulrunner tarball (zip on windows) just for fun, but it isn't completely neccessary since that one file will be copied over. The main reason for removing the Mozilla SDK is that files will be removed and added as the mozilla tree progresses and you don't want to have old files hanging around. You'll do something like:
cd /builds/songbird/trunk/dependencies/linux/ rm -r mozilla/debug/* rm -r mozilla/release/* rm xulrunner/debug/xulrunner.tar.gz rm xulrunner/release/xulrunner.tar.gz
- Make the Mozilla SDK, which we use as a target to build against for things like headers and additional build scripts, by moving into the scripts directory and running make-mozilla-sdk.h. It takes 3 arguments, the first is the Mozilla source code directory, the second is the mozilla object directory, the third is the directory to place the output (the Mozilla SDK - several folders full of stuff). Based on our example from Build XULRunner for Songbird this step would look like:
cd /builds/songbird/trunk/tools/scripts ./make-mozilla-sdk.sh /builds/xulrunner/mozilla \ /builds/xulrunner/mozilla/compiled/xulrunner-debug \ /builds/songbird/trunk/dependencies/linux/mozilla/debug
- Make the XULRunner tarball (linux and mac) or the XULRunner zip (Windows). On Windows we just use our favorite Zip utility to zip up the entire XULRunner bin directory. It is the same directory we package on Linux and Mac, just a different file format. The script to use is make-xulrunner-tar.sh, it takes 3 args: the path to the mozilla bin directory, the path to the directory to place the tarball in and finally the full name of the tarball itself (legacy from when we had mutliple tarballs for one platform - this may change). Again, based on the previous example this step goes a little something like:
cd /builds/songbird/trunk/tools/scripts ./make-xulrunner-tarball.sh \ /builds/xulrunner/mozilla/compiled/xulrunner-debug/dist/bin \ /builds/songbird/trunk/dependencies/linux/xulrunner/debug \ xulrunner.tar.gz
- Build Songbird by heading into the root Songbird directory and making it.
cd /builds/songbird/trunk make -f songbird.mk debug
Wrap Up
You now have a full Songbird build from the ground up (besides the plugins and playback cores etc...). Go into your songbird/compiled/dist folder and let The Bird sing!!
I have outlined in these 2 pages how to build a debug version. If you want to try out a release version change all the points that contain debug to their corresponding release bit.
xulrunner.linux.debug.fc4.mozconfig -> xulrunner.linux.release.fc4.mozconfig compiled/xulrunner-debug -> compiled/xulrunner-release etc...
Now that you have gotten this far, flutter over to Songbird's Bugzilla and find yourself a bug to start playing with. You can start by just verifying any unconfirmed bugs if you like, or dive right in and try hacking some code. See you in IRC ( #songbird at irc.landoleet.org )
