Open main menu

CDOT Wiki β

Changes

Building Firefox 1.5

4,966 bytes added, 12:20, 13 October 2006
no edit summary
= Assignment 1 - Building the Fox =

Written By [[user:RealMarkP|Mark Paruzel]].<br/>
''THIS IS UNDER CONSTRUCTION!!''

== Introduction ==

I have built [[Assignment_1_(mcparuze)|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 [ftp://ftp.osuosl.org/pub/cygwin/setup.exe 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 [http://cygwin.paracoda.com/release/make/make-3.80-1.tar.bz2 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:
<pre>
$> cd /cygdrive/c/
$> pwd
/cygdrive/c
</pre>
* We need to create a place where we will do all our development. I used a directory called proj:
<pre>
$> mkdir proj
$> cd proj
$> pwd
/cygdrive/c/proj
</pre>
* Inside this directory, we will put all of our tools and batch files we will use to setup the build environment:
<pre>
$> touch buildsetup.bat
</pre>
* 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 [http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/moztools-static.zip Moztools] and [http://ftp.mozilla.org/pub/mozilla.org/mozilla/source/wintools.zip Wintools].
* Download these two zip files and extrat thier contents into your C:\proj\ directory.
<pre>
$> pwd
/cygdrive/c/proj
$> ls -al
</pre>

=== 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:
<pre>
BuildSetup.bat goes here
</pre>
*

=== Glib And LibIDL For VC 7.1 ===

[http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc71/vc71-glib-1.2.10-bin.zip Glib] and [http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc71/vc71-libIDL-0.6.8-bin.zip libIDL] for VC71

=== Pulling From CVS ===

=== Building ===

== Problems Encountered & Solutions ==

=== xpidl.exe Crashes ===



== Resources Used ==

* [http://cs.senecac.on.ca/~david.humphrey/writing/firefox-win32-build.html David Humphrey's site on how to build Firefox]
* [http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites_on_the_1.7_and_1.8_Branches Official Mozilla Instructions on building the 1.8.0 Branch]
* [http://whereswalden.com/mozilla/msvcfree/comments/ 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 [[Running_Firefox_In_The_VS_Debugger|VS Debugger]].
1
edit