Changes

Jump to: navigation, search

Building Firefox 1.5

1,988 bytes added, 12:25, 14 October 2006
no edit summary
= Assignment 1 - Building the The Fox - 1.8.0 Branch =
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 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
rem --- moztools comes last after glib/libIDL
SET PATH=%GLIB_PREFIX%;%GLIB_PREFIX%\bin;%PATH%;%MOZ_TOOLS%\bin
SET MOZCONFIG=C:\proj\mozilla\mozconfig
</pre>
* It should be noted that there are several lines that point to C:\proj\VC71, this is alright because we will install those in the enxt section.
=== 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%
C:\proj>echo %MOZ_TOOLS%
C:\proj\moztools
 
C:\proj>echo %MOZCONFIG%
C:\proj\mozilla\mozconfig
C:\proj>
</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 ===
 
* Now the easy part begins. In order to pull from the CVS repository, you have to specify the right type of branch to pull, this is done by the following command.
<pre>
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 that’s the branch that corresponds with the Firefox 1.5 build.
* This creates a Mozilla directory with a file called client.mk inside it. 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>
C:\proj>cd mozilla
C:\proj\mozilla>make -f client.mk checkout
</pre>
* Once its done, we need to make a file called mozconfig that will specify the parts of the system that will be built. Put the following code inside this file using notepad or similar text processor. This file does not have an extension and is plainly called mozconfig.
<pre>
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/hopefullyWorked.firefox.optimized
ac_add_options --enable-application=browser
ac_add_options --disable-optimize
ac_add_options --enable-debug
ac_add_options --enable-svg
ac_add_options --enable-canvas
ac_add_options --disable-installer
</pre>
* Next, all we have to do is Build!!
=== Building ===
 
* Its time to build this beast!
<pre>
C:\proj\mozilla>make -f client.mk build
</pre>
 
* Wait...
* ....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 directory.
* Were done!!!
== Problems Encountered & Solutions ==
=== 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

Navigation menu