Building Xulrunner
From ADC
| Prev | Up | Next |
Contents |
abstract installs as a xulrunner application. The minimum version of XULRunner that is required to build and run abstract can be found in [Gecko] section of Abstract's application.ini. As of this writing, this version is 1.9b5.
abstract is using a slightly modified version of xulrunner to satisfy our test framework. At the moment, pre-built binary packages are available for Debian GNU/Linux (unstable only) and Windows. On all other platforms/OSes, working on abstract requires building custom xulrunner.
After abstract is built, it is supposed to be run with any suitable xulrunner including a stock version from ftp.mozilla.org.
Get sources
xulrunner releases are rare. Chances are that there is no source tarball for the latest version at ftp.mozilla.org. But the latest firefox sources are always there.
Mozilla is using CVS as source code managent system for its trunk (Mozilla2 uses Mercurial). CVS calculates diffs on the server, Mozilla tree is appx. 300 Mb. So plain cvs checkouts are not recommended, unless your Internet connection is really fast.
Downloads
Use patch from the latest release from this project downloads on SourceForge. Starting from granparadiso alpha8, firefox tarball is used as a starting point.
Firefox releases doesn't include xulrunner module. It should be acquired separately. The xulrunner-upstream*diff.gz for the latest release contains xulrunner module.
Unpack the tarball and apply the patch:
tar -xjf firefox-3.0b5-source.tar.bz2 cd mozilla zcat ../xulrunner-upstream_1.8.99+1.9b5-1.diff.gz | patch -p1 cat debian/patches/01-xulrunner-1.9b5.dpatch | patch -p1
cvs
With all its minuses, cvs is the Mozilla official way to get xulrunner. The patch 01-xulrunner-1.9b5 above is created this way:
cvs -d :pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/cvsroot -q -z 9 co -r FIREFOX_3_0b5_RELEASE mozilla/client.mk cd mozilla wget -O .mozconfig http://www.aasii.org/download/mozconfig make -f client.mk checkout zcat ../xulrunner-upstream_1.8.99+1.9b5-1.diff.gz | patch -p1
git
Mozilla is running a Mercurial mirror of its trunk cvs repository. This repository is also available in git format here. There is also a branch for 1.9b5 release. The commands below will checkout 1.9b5 to mozilla. You will need gitmo script from here.
git-clone git://repo.or.cz/mozilla-1.9.git mozilla cd mozilla git checkout -b b5 refs/remotes/origin/b5 gitmo init gitmo build zcat ../xulrunner-upstream_1.8.99+1.9b5-1.diff.gz | patch -p1
Abstract specific patches
Released xulrunner may have some bugs which are not harmful in general, but spoil abstract development model. Patches with fixes should be applied when xulrunner tree is ready. 1.9b5 contains fixes for upstream bugs:
cat debian/patches/10-js-filter-log2.dpatch | patch -p1
Windows
You may skip building. You can download xulrunner-1.9b5.en-US.win32.sdk.zip package from this project downloads on SourceForge. Unpack the downloaded file and invoke mozilla build shell.
cd /path/to/xulrunner-sdk xulrunner.exe --register-global
Debian and Ubuntu
You may skip building outright. You can merely download and install xulrunner-upstream and xulrunner-upstream-dev packages from this project downloads on SourceForge.
RPM based
We have prepared rpm spec file for creating xulrunner package on your system. It can be downloaded from this project downloads on SourceForge.
Prepare sources for rpmbuild
cd /path/to/rpmbuild cp /path/to/xulrunner.spec SPECS/ cp /path/to/firefox-firefox-3.0b5-source.tar.bz2-source.tar.bz2 SOURCES/ cd SOURCES zcat /path/to/xulrunner-upstream_1.8.99+1.9b5-1.diff.gz | patch -p1 mv debian/patches/*.dpatch ./ mv debian/mozconfig ./ rm -rf debian
Invoke rpmbuild
cd ../SPECS/ rpmbuild -bb xulrunner.spec
Install xulrunner
su rpm -Uvh /path/to/rpmbuild/RPMS/i386/xulrunner-1.9b5*.rpm logout
Distribution-independent
Build
If you have installed prerequisites and sources correctly, building mozilla should be as easy:
cp debian/mozconfig .mozconfig make -f client.mk build
If any there are errors, just repeat everything from the beginning. If it doesn't help, write to the mailing list.
After the xulrunner is built, install it.
Install with sudo
Type as your normal user to install XULRunner
sudo make install
Install with su
Become superuser
su -
Change to mozilla build directory
cd /path/to/mozilla
Install XULRunner
make install
Return to your normal account
logout
| Prev | Next |


