Open main menu

CDOT Wiki β

Assignment1(jbmossop)

Revision as of 19:26, 19 September 2006 by Jbmossop (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Steps Taken to Build the Fox


By following the directions on David’s site for building Firefox as well as the documentation provided by Mozilla I was able to compile Firefox with little complication. In order for me to build Firefox on my machine I first needed to download the iso’s for Visual Studio 2005 from ACS. In addition to Visual Studio I also needed to install Cygwin, ensuring that the patchutils (version 3.80), perl, cvs, zip, and unzip packages are installed along with it.

After installing VS2005 and Cygwin, I downloaded and extracted the moztools package to a temporary directory (c:\proj) in which I would be compiling the program. After logging onto the Mozilla cvs repository I successfully checked out the build script for Firefox.

Next I created a batch file (as per the instructions on David’s site) to set the environment variables for the Windows command prompt that would be needed to build Firefox (Fig 1) as well as a .mozconfig file to configure the settings for the build. I used the mozconfig provided by Mozilla on their website (Fig 2).

I next attempted to download the source tree from Mozilla’s cvs server and was unsuccessful. Therefore I obtained a copy of the Firefox source from Mozilla’s resource site and extracted it to my project directory.

With everything in place I entered the command to compile. After approximately 50 minutes (on a 1.7 GHz Celeron w/1gig ram) the build completed successfully.

Fig 1: Config Batch File


@echo off

rem --- CVS Setup
SET CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
SET CVS_RSH=ssh

set NSIS=C:\Program Files\NSIS

rem --- Setup the paths to the moztools build libraries
set MOZ_TOOLS=C:\proj\moztools
set GLIB_PREFIX=%MOZ_TOOLS%
set LIBIDL_PREFIX=%MOZ_TOOLS%

rem --- Scrub these variables first
SET INCLUDE=
SET LIB=
SET PATH=C:\;C:\windows\system32;C:\windows\system32\wbem

rem --- Prepend cygwin
SET PATH=C:\ffbuild\preReq\cygwin\bin;%PATH%

rem --- Setup VC8 compiler environment vars
CALL "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat" x86

rem --- Add glib/libidl to build environment
SET PATH=%PATH%;%GLIB_PREFIX%;%GLIB_PREFIX%\bin
SET INCLUDE=%GLIB_PREFIX%\include;%INCLUDE%
SET LIB=%GLIB_PREFIX%\lib;%LIB%

rem --- moztools comes last after glib/libIDL
SET PATH=%PATH%;%MOZ_TOOLS%\bin

set path=%PATH%;%NSIS%

Fig 2: Mozconfig File

. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ff-opt-static
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --enable-static
ac_add_options --disable-shared
ac_add_options --disable-tests
mk_add_options MOZ_CO_PROJECT=browser