Difference between revisions of "Assignment 1: Building the Fox"

From CDOT Wiki
Jump to: navigation, search
(Initial Setup)
(Build Process)
Line 60: Line 60:
  
 
== Build Process ==
 
== Build Process ==
 +
Compared to the initial setup, the building process is not complicated, but more messy in comparison, due to my being clueless at the entire process. The process took many retries due to various problems, which will be discussed later. Here's the successful step-by-step process.
  
 +
*First, I ran the mozset.bat to set up the environment, and then switch to the project directory.
 +
<pre>
 +
mozset.bat
 +
cd mozilla
 +
</pre>
 +
*Then I downloaded the source files. This process took approximately 25 minutes in my computer as it populated the previously-sparse c:/home/mozilla.
 +
<pre>$ make -f client.mk checkout MOZ_CO_PROJECT=browser</pre>
 +
*Finally, I started the compilation process.
 +
<pre>$ make -f client.mk build</pre>
 +
 +
The entire process took around 25 minutes to download the files and 90 minutes to complete the compilation. At first I had a bunch of applications running while Firefox compiled, making it slow. Closing most of the applications could have hastened the process.
 +
 +
Once the process is done, I checked '''C:\proj\mozilla\firefox-objdir\dist\bin''', double-clicked the mine, got roughed up a bit by error messages, and found the Fox running.
  
 
== Problems Encountered ==
 
== Problems Encountered ==

Revision as of 19:18, 19 September 2006

Introduction

I built Firefox merely a day before the deadline due to busy schedule. Unfortunately, this means I had a fair share of horror stories from other peers in the course who had gone through the mire. On the other hand, this circumstance allows me to receive plenty of support and advice from them, of which I am grateful.

Built Environment

I use the following system to build my Firefox:

  • Pentium M 1.86 GHz, 512 MB RAM
  • 80 GB Hard Drive
  • Windows XP Home - SP2
  • MS Visual Studio .NET 2003 already installed

Initial Setup

For the preparation for the build, I first read the Mozilla Development Center Build Documentation, but quickly ran out of patience. Then I found another website that offers a more compressed set of instructions.

  • First, I downloaded and installed Cygwin, following the instruction here.
  • I already have Visual Studio .NET 2003 installed, so I didn't install any SDK suggested by the site.
  • I downloaded Moztools, and unpacked it as instructed.
  • I created a batch file following this template and name it mozset.bat. I later edited the batch file, reducing it to this:
set HOME=C:\home

set VCVARS=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat

set MOZ_TOOLS=C:\moztools
set CVSROOT=:pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/cvsroot

set CYGWINBASE=C:\cygwin
set CYGWIN=nodosfilewarning

set PATH=%CYGWINBASE%\bin;%PATH%

call "%VCVARS%"
 
set PATH=%PATH%;%MOZ_TOOLS%\bin

bash --login -i
  • Lastly, I retrieved Mozilla source using cvs as instructed here.
mozset
cvs login
cvs co mozilla/client.mk
  • Prior to the build, I created .mozconfig file and place it on the mozilla directory at c:/home. I used the template from the source site at first, but then modified it using Elizabeth Chak's version here. This is the resulting file:
. $topsrcdir/browser/config/mozconfig
# Put all obj files in one place, not in src tree
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-objdir
ac_add_options --disable-shared
ac_add_options --disable-static
ac_add_options --enable-debug
ac_add_options --disable-activex
ac_add_options --disable-activex-scripting
ac_add_options --enable-canvas
ac_add_options --disable-installer

Build Process

Compared to the initial setup, the building process is not complicated, but more messy in comparison, due to my being clueless at the entire process. The process took many retries due to various problems, which will be discussed later. Here's the successful step-by-step process.

  • First, I ran the mozset.bat to set up the environment, and then switch to the project directory.
mozset.bat
cd mozilla
  • Then I downloaded the source files. This process took approximately 25 minutes in my computer as it populated the previously-sparse c:/home/mozilla.
$ make -f client.mk checkout MOZ_CO_PROJECT=browser
  • Finally, I started the compilation process.
$ make -f client.mk build

The entire process took around 25 minutes to download the files and 90 minutes to complete the compilation. At first I had a bunch of applications running while Firefox compiled, making it slow. Closing most of the applications could have hastened the process.

Once the process is done, I checked C:\proj\mozilla\firefox-objdir\dist\bin, double-clicked the mine, got roughed up a bit by error messages, and found the Fox running.

Problems Encountered

Screenshot

Acknowledgement

Reflection