Open main menu

CDOT Wiki β

Changes

Building Firefox 1.5

260 bytes added, 11:24, 14 October 2006
no edit summary
== 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 It’s painful. So, hopefully these instructions will make it a bit easier then the instructions available on the MDC.
== Required Software ==
=== Cygwin ===
* Cygwin is avilable available 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 Interpreters categories)
** grep -- text search tool (Base category)
** make -- dependency analyzer for software builds (Devel category)
=== Make 3.80 ===
* Unfortunately, Cygwin no longer is bundled with make 3.80, rather its bundled with 3.81-1 which breaks duing during 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.
* 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 extract thier their contents into your C:\proj\ directory.
<pre>
$> pwd
=== Environment Variables ===
* The first thing that needs to be done, is to jump into the DOS command prompt.
<pre>
$> cmd.exe
C:\proj>
</pre>
* Note: All the unix Unix commands work perfectly in this state because the DOS command prompt inherited all the environment settings of the Cygwin shell.
* Firstly, we need to run the buildsetup batch file we created earlier in order to set up any environment variables we need.
<pre>
Studio .NET 2003\SDK\v1.1\bin;C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322;C:\cygwin\bin;C:\;C:\windows\system32;C:\windows\system32\wbem;;c:\proj\vc71;c:\proj\vc71\bin;C:\proj\moztools\bin
</pre>
* What you should be looking for is if the if C:\proj\vc71 is in the path as well as C:\proj\moztools. These two paths are crucial to the build.
<pre>
C:\proj>echo %GLIB_PREFIX%
</pre>
* This copies over any windows related tools that we need for the build.
* The environment is now set up to recieve receive and compile the mozilla Mozilla source tree.
=== Pulling From CVS ===
C:\proj>cvs -d :pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/cvsroot co -r MOZILLA_1_8_0_BRANCH mozilla/client.mk
</pre>
* We are going to pull the 1.8.0 branch because thats that’s the branch that corresponds with the Firefox 1.5 build.* This creates a mozilla Mozilla directory with a cile file called client.mk inside it. this This file is a make file script that defines what to pull and how.
* To pull the source from the CVS, just use this command.
<pre>
=== Building ===
* Its tim time to build this beast!
<pre>
C:\proj\mozilla>make -f client.mk build
* ....Wait some more...
* ...........Keep waiting............
* Somewhere within about 2 hours, the code will finish compiling and you should have Firefox.exe sitting inside your C:\proj\mozilla\hopefullyWorked.firefox.optimized\dist\bin directoydirectory.
* Were done!!!
=== xpidl.exe Crashes ===
* This is because your Path enironment veariable points to the wrong version of Glib and LibIDL. check your path and make sure that it points to C:\proj\vc71 and C:\proj\Vc71\bin. These two Path entries should be at the begining of your Path variable.
== Resources Used ==
1
edit