Version 2

    Q: Why do we ever need to build XULRunner?

    A: There is no official build of XULRunner for Linux x86-64. We have to build it ourself.

     

    Prerequisites

    You need some libraries to build XULRunner. If you are using Ubuntu, execute:

    > sudo apt-get build-dep firefox

    > sudo apt-get install mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev libxt-dev libiw-dev mesa-common-dev autoconf2.13 yasm

     

    Prerequisites for other Linux distributives and OSes.

    Getting the source

    To clone Mozilla 1.9.1 repository, execute:

    > mkdir 191src

    > hg clone http://hg.mozilla.org/releases/mozilla-1.9.1/ 191src

    > cd 191src

    You may find links to other Mozilla versions here.

     

    Then you need to select a dotversion to build:

    > hg tags

    It prints a long list of tags:

    ...

    FIREFOX_3_5_17_RELEASE         27311:d5eeb3c15214

    ...

     

    Let's select the most recent release. In this case it is FIREFOX_3_5_17_RELEASE with revision number 27311.

    Update to it:

    > hg update 27311

     

    Creation of configuration file

    Now you need to create '.mozconfig' file inside 191src folder with the following content:

    ##########################################################

    ac_add_options --enable-application=xulrunner

    ac_add_options --disable-debug

    ac_add_options --disable-tests

    # the following line is needed for Ubuntu/Debian only

    ac_add_options --disable-crashreporter

    mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../xulrunner_build191

     

    #java

    ac_add_options --with-java-include-path=/usr/lib/jvm/java-6-sun/include

    ac_add_options --with-java-bin-path=/usr/lib/jvm/java-6-sun/bin

    ##########################################################

    These options are tested under Ubuntu 10.10 x86-32 with Sun Java 6 installed. You may need to specify other options for other systems.

     

    Building

    From 191src execute:

    > make -f client.mk build

     

    Separating binaries

    > cd ..

    > cp -L -r ./xulrunner_build191/dist/bin/* xulrunner-1.9.1

     

    That's it! Now you have XULRunner binaries inside xulrunner-1.9.1 folder.

     

    Useful stuff

    Register xulrunner for user:

    > ./xulrunner --register-user

     

    Register xulrunner for system:

    > sudo ./xulrunner --register-global

     

    Information about xulrunner registred for user lies here:

    /home/user_name/.gre.d/1.9.conf

     

    Information about xulrunner registred globally lies here:

    /etc/gre.d/1.9.conf

     

    View Firefox/XULRunner build options:

    about:buildconfig