1
edit
Changes
no edit summary
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 "minefield" using CVS! Note: I initially tried to build firefox 1.5.0.7 without using CVS!, but ran into way too many problems to document. I then moved on to the minefield version and the problems that spitted out were easier to fix.
=Computer Specs=
==Downloaded And Installed The Tools==
*Microsoft® Visual Studio .NET 2003® (C++ module is needed mainly). It's available from [http://acs.senecac.on.ca/pages/download.php ACS] -- [http://sonic.senecac.on.ca/download/getfile.php?username=sfernan2&filename=MSDN/2072.2.ISO Pre-requesite Disc], [http://sonic.senecac.on.ca/download/getfile.php?username=sfernan2&filename=MSDN/2070.ISO Disc 1], [http://sonic.senecac.on.ca/download/getfile.php?username=sfernan2&filename=MSDN/2071.ISO Disc 2]
*[http://www.rarlabs.com WinRar] to extract several archive files
*[ftp://ftp.cygwin.com/pub/cygwin/setup.exe Cygwin] | [http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites#GNU_Tools_for_Microsoft_Windows_.28Cygwin.29 More Info] | [http://www.cygwin.com Cygwin Main Website]
*[http://cygwin.paracoda.com/release/make/make-3.80-1.tar.bz2 Make 3.80] (to overwrite the 3.81 version from the Cygwin install)
Once '''MAKE ''' is downloaded and saved on your hard drive:
<pre>
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 '''
</pre>
*[http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/moztools-static.zip MozTools] | [http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites#moztools More Info]
Once downloaded, extract the contents to any location. Remember the location though as you will need to edit your batch file with this location'''C:\proj\moztools'''.
*[http://www.microsoft.com/downloads/details.aspx?FamilyID=0baf2b35-c656-4969-ace8-e4c0c0716adb&DisplayLang=en Microsoft ® Windows Server® 2003 R2 Platform SDK] | [http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites#Platform_SDK More Info]
==The Build Begins==
I mainly followed the guide from [http://cs.senecac.on.ca/%7Edavid.humphrey/writing/firefox-win32-build.html Dave's site] but changed a few aspects of it so that it worked for the Visual Studio 2003 version and the way I setup my computer.
1. Created a directory called '''C:\proj'''
2. Downloaded and Installed the necessary software above.
3. Created my [[User:Mdsouza/Assignment_01:_Build_the_Fox#Batch_File|batch file]] and [[User:Mdsouza/Assignment_01:_Build_the_Fox#.mozconfig_File|.mozconfig file]].
4. Navigated to the location of where I stored my batch file ('''C:\proj''') and double-clicked it to execute.
5. When the bash prompt came up, I typed the following commands...
Navigated to the '''C:\proj''' folder. Logged in ('''anonymous''' is the password):
<pre>
cvs login
</pre>
Navigated to the '''C:\proj''' folder. Checked out the build script:
<pre>
cvs co mozilla/browser/config mozilla/client.mk
</pre>
6. It created a directory called '''C:\proj\home\mozilla'''. I copied my .mozconfig file over to the '''C:\proj\home\mozilla''' folder.
7. Went back to the prompt and typed...
Navigated to the '''C:\proj\home\mozilla''' folder. Got the full source code:
<pre>
make -f client.mk checkout
</pre>
Built the code:
<pre>
make -f client.mk build
</pre>
8. Kept waiting for it to build (it took a couple of hours suprisingly). A couple of bugs below came up, I checked my
[[User:Mdsouza/Assignment_01:_Build_the_Fox#Did_The_Boring_Stuff|resources]] and [http://www.google.com Google], fixed the problems and FINALLY finished it successfully!
==Problems And Solutions==
<pre>
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:\proj\home
rem --- Set VCVARS to wherever the MSVC vcvars.bat file is foundCVS Setupset VCVARSSET CVSROOT=C:\Program Files\Microsoft Visual Studio pserver:anonymous@cvs-mirror.NET 2003\Vc7\bin\vcvars32mozilla.batorg:/cvsrootSET CVS_RSH=ssh
rem --- Set MSSDK Setup the paths to wherever the MS SDK is installedrem --- Only required for MSVC7 or the Free MSVC editions that don't come with an SDKmoztools build librariesset MSSDKMOZ_TOOLS=C:\Program Filesproj\Microsoft Platform SDK for Windows Server 2003 R2moztoolsset GLIB_PREFIX=%MOZ_TOOLS%set LIBIDL_PREFIX=%MOZ_TOOLS%
rem --- Set MOZ_TOOLS to wherever you have the moztools packaged installedScrub these variables firstset MOZ_TOOLSSET INCLUDE=SET LIB=SET PATH=C:\moztools;C:\windows\system32;C:\windows\system32\wbem
rem --- Set CYGWINBASE to wherever Prepend cygwin is installedrem --- Do not use CYGWIN or else cygserver, cygrunsrv, and Cygwin services will not function properlyrem --- Variable CYGWIN is also used to modify Cygwin's behaviour a little bit.set CYGWINBASESET PATH=C:\cygwinrem --- Make sure Cygwin does not print out a DOS style path warningset CYGWIN=nodosfilewarning\bin;%PATH%
rem --- Prepend Cygwin pathSetup VC7 compiler environment varsrem --- This is necessary so that cygwin find is ahead of windows findCALL "C:\Program Files\Microsoft Visual Studio .exe in the PATH, but cgywin link is after MSVC link.exe.set PATH=%CYGWINBASE%NET 2003\Vc7\bin;%PATH%\vcvars32.bat"
rem --- Set MSVC Add glib/libidl to build environment varscall "SET PATH=%VCVARSPATH%;%GLIB_PREFIX%;%GLIB_PREFIX%\binSET INCLUDE=%GLIB_PREFIX%\include;%INCLUDE%SET LIB=%GLIB_PREFIX%\lib;%LIB%"
rem --- Typically the last thing the script does is launch a cygwin shell
===.mozconfig File===
<pre>
# Building Firefox Trunk with Debugging
. $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-static
ac_add_options --enable-shared
# Debug Build Setup Options
ac_add_options --disable-optimize
ac_add_options --enable-debug
# I'm using Canvas for my work
ac_add_options --enable-canvas
# I disabled the installer
ac_add_options --disable-installer
</pre>
=Voila!=