User:Mdsouza/Assignment 01: Build the Fox

From CDOT Wiki
< User:Mdsouza
Revision as of 17:38, 19 September 2006 by Mdsouza (talk | contribs)
Jump to: navigation, search

Overview

The way I decided to proceed with this assignment was to read all the information out there about how the build process works before trying anything out. I did this to decrease my chances that I do not fall into a "try, fail, try again" scenario. However, as it came to be, finding a bug in software is inevitable. :(

In the report below I mentioned the tools one needs, steps I took, and problems that I tackled to get me through the process of building firefox 1.5.0.7 without using CVS!

Computer Specs

  • Intel Pentium IV 1.7 GHz
  • 1GB of RAM
  • 40GB Hard Drive
  • Windows XP Professional

Steps Took To Build the Fox

Did The Boring Stuff

Here are some of the sites I spent the most time reading:

Downloaded And Installed The Tools

When installing Cygwin the following packages need to be selected:

* ash -- UNIX-like command line interpreter shell (Base category) 
* coreutils -- GNU core utilities (includes fileutils, install, sh-utils, and textutils) (Base category) 
* cvs -- concurrent versions system (Devel category) 
* diffutils -- file comparison utility (Base category) 
* findutils (Base category) 
* gawk -- pattern matching language (Base and Interpretors categories) 
* grep -- text search tool (Base category) 
* libiconv -- character set conversion (Devel category) 
* make -- dependency analyzer for software builds (Devel category) (not mandatory if the version is 3.81 -- we need 3.80)
* 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 (to overwrite the 3.81 version from the Cygwin install)

Once MAKE is downloaded and saved on your hard drive:

1. Use WinRAR to extract the file to any folder of your choosing.
2. Copy the make.exe file located within the usr/bin folder and overwrite the make.exe located in C:\cygwin\bin 

Once downloaded, extract the contents to any location. Remember the location though as you will need to edit your batch file with this location.

Once downloaded, the "Windows Core SDK" (Tools, Build Environment, and Redistributable Components) and the "Web Workshop SDK" (Build Environment) must be installed. If you are using at least Visual Studio .NET 2003, you already have all the necessary SDKs for building mozilla and can skip this requirement step.

The Build Begins

Problems And Solutions

Problem 1

Problem 2

Problem 3

Apendix

Batch File

SET CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
SET CVS_RSH=ssh

rem --- Set HOME so that cvs and ssh work correctly
rem --- cvs uses HOME to locate your .cvspass file, and ssh to locate your .ssh file
rem --- if you are using ssh, your HOME should match the home directory specified in /etc/passwd. See http://www.cygwin.com/faq/faq0.html.
set HOME=C:\home

rem --- Set VCVARS to wherever the MSVC vcvars.bat file is found
set VCVARS=C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat

rem --- Set MSSDK to wherever the MS SDK is installed
rem --- Only required for MSVC7 or the Free MSVC editions that don't come with an SDK
set MSSDK=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2

rem --- Set MOZ_TOOLS to wherever you have the moztools packaged installed
set MOZ_TOOLS=C:\moztools

rem --- Set CYGWINBASE to wherever cygwin is installed
rem --- Do not use CYGWIN or else cygserver, cygrunsrv, and Cygwin services will not function properly
rem --- Variable CYGWIN is also used to modify Cygwin's behaviour a little bit.
set CYGWINBASE=C:\cygwin
rem --- Make sure Cygwin does not print out a DOS style path warning
set CYGWIN=nodosfilewarning

rem --- Prepend Cygwin path
rem --- This is necessary so that cygwin find is ahead of windows find.exe in the PATH, but cgywin link is after MSVC link.exe.
set PATH=%CYGWINBASE%\bin;%PATH%

rem --- Set MSVC environment vars
call "%VCVARS%"

rem --- Prepend SDK paths
rem --- Only required for MSVC7 or the Free MSVC editions that don't come with an SDK
set PATH=%MSSDK%\bin;%PATH%
set INCLUDE=%MSSDK%\include;%INCLUDE%
set LIB=%MSSDK%\lib;%LIB%

rem --- moztools comes last
set PATH=%PATH%;%MOZ_TOOLS%\bin

rem --- Now the PATH variable contains:
rem MS-SDK; MSVC; Cygwin; Windows; glib/libIDL; Moztools

rem --- Typically the last thing the script does is launch a cygwin shell
rem --- watch for your ~/.profile and /etc/profile which may overwrite your carefully setup PATH!
bash --login -i

.mozconfig File

Voila!

Conclusion