Personal tools
You are here: Home / cmgui / Zinc / Firefox


Build Firefox

You may need some extra packages installed. Here are a few commands to install packages I needed last time I built Firefox:

sudo apt-get install auto-make
sudo apt-get install libdbus-glib-1-dev
sudo apt-get install libcurl4-gnutls-dev

Get the source for the appropriate version of Firefox (as a bzipped tar file). You can find the source for all releases here:

Select which release you want by clicking on the appropriately named directory and then click on the source directory to find the bzipped tar file of the source. Download this.

Set up a directory to hold your source and the build. It is a good idea to include the source name in the directory so that you can easily distinguish between different firefox sources:

cd $CMISS_ROOT/zinc
mkdir firefox-3.0.1-source

Copy your bzipped tar file the directory you created and then extract it using tar, eg:

cd $CMISS_ROOT/zinc/firefox-3.0.1-source
tar -xvf firefox-3.0.1-source.tar.bz2

Set up your configuration file. Full instructions are here:

I did the following:

cd $CMISS_ROOT/zinc/firefox-3.0.1-source/mozilla
echo "# My first mozilla config" > .mozconfig

Then opened the .mozconfig file and added the following lines:

. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ff-opt
ac_add_options --disable-tests --enable-application=browser

Note that the MOZ_OBJDIR specifies where the built objects will be placed. In the above example they will be placed in a directory called ff-opt (for firefox optimised). If you intend on using the same source for building on multiple platforms (eg 32 and 64 bit linux) then you will want to modify the .mozconfig file before you build each one. If you use the same directory each time your previous build will not be preserved. For example if building firefox for i686-linux you you might use a line like:

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-i686-linux

Once you have built the objects it is not easy to move/rename the parent directory they are in as there are many symbolic links set up as part of the build.

Follow the build instructions:

I did the following:

cd $CMISS_ROOT/zinc/firefox-3.0.1-source/mozilla
make -f build

Windows build

Be sure to use MSVC version 6.0 when building on windows or the resulting zinc will not be compatible with the version of Firefox distributed by the Mozilla Foundation.