Assignment 1 - Building the Fox
Written By Mark Paruzel.
THIS IS UNDER CONSTRUCTION!!
Introduction
I have built Firefox before for a previous assignment I did and it was dead simple. Building Firefox 3.0 is as easy as riding a bike; building Firefox 1.5 is like attempting to start a fire, 30 feet under water. Its painful. So, hopefully these instructions will make it a bit easier then the instructions available on the MDC.
Required Software
- Microsoft Visual Studio 2003 (MSVC 7.1)
- Cygwin
- Make 3.80 for Cygwin
- Moztools & Wintools
- Patience!!!
Build Instructions
Visual Studio 2003
- Visual Studio is available at the school ACS office/website so you can grab it from there and install it. Its easy to install it because the installer is idiot proof. This shouldn't be hard :).
Cygwin
- Cygwin is avilable for download Here. Install it with the following tools:
- ash -- UNIX-like command line interpreter shell (Base category)
- coreutils -- GNU core utilities (includes fileutils, sh-utils, and textutils) (Base category)
- diffutils -- file comparison utility (Base category)
- findutils (Base category)
- gawk -- pattern matching language (Base and Interpretors categories)
- grep -- text search tool (Base category)
- make -- dependency analyzer for software builds (Devel category)
- patchutils -- a small collection of programs that operate on patch files (Devel category)
- perl -- a scripting language used to control parts of the build (Interpreters category)
- sed -- a search and replace language (Base category)
- unzip -- zip file extraction (Archive category)
- zip -- zip file creation (Archive category)
Make 3.80
- Unfortunately, Cygwin no longer is bundled with make 3.80, rather its bundled with 3.81-1 which breaks duing the Firefox build.
- To get the version of make that works (3.80), you have to download it here. Once you have download it, you can just grab the Make executable file (make.exe) from /usr/bin/ directory and drop it into Cywgin/bin (this will overwrite the existing Make executable).
- While your doing this, make sure Cygwin is not running. If it is, you will need to restart Cygwin.
Setting Up Your Build Directory
- Start up Cygwin and navigate to your C drive:
$> cd /cygdrive/c/ $> pwd /cygdrive/c
- We need to create a place where we will do all our development. I used a directory called proj:
$> mkdir proj $> cd proj $> pwd /cygdrive/c/proj
- Inside this directory, we will put all of our tools and batch files we will use to setup the build environment:
$> touch buildsetup.bat
- The buildsetup.bat will set up the environment variables for us, which we will do in a different section.
Moztools And Wintools
- There are two tool packages that are required to build Firefox using VS 7.1. These two tools are called Moztools and Wintools.
- Download these two zip files and extrat thier contents into your C:\proj\ directory.
$> pwd /cygdrive/c/proj $> ls -al
Setting Up The Environment
- At this point, the Cygwin Environment is basically set up. You now have the tools required to automate the build process as well as the compiler to do the grunt work.
- Before you can start to build, you need to set up a bunch of environment variables so that the make files know where to look for dependencies. I created a build batch file that set up the environment for me:
BuildSetup.bat goes here
Glib And LibIDL For VC 7.1
Pulling From CVS
Building
Problems Encountered & Solutions
xpidl.exe Crashes
Resources Used
- David Humphrey's site on how to build Firefox
- Official Mozilla Instructions on building the 1.8.0 Branch
- Jeff Walden's Page On Building Firefox
Conclusion
It took me almost a week to figure out what to pull from CVS, setting up the environment variables, build, finding what i did wrong and rebuilding 6 more times...In other words, it was a pain. Fortunately, Firefox got built so now I can get on with trying to run it through the VS Debugger.