Open main menu

CDOT Wiki β

Changes

Building Firefox 1.5

4,729 bytes added, 01:31, 14 October 2006
no edit summary
* 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 extrat extract thier contents into your C:\proj\ directory.
<pre>
$> pwd
/cygdrive/c/proj
$> ls -al
drwx------+ 6 RealMarkP None 0 Oct 12 15:13 .
drwxrwxr-x+ 10 Administrators SYSTEM 0 Oct 13 11:23 ..
-rwx------+ 1 RealMarkP None 843 Oct 12 15:08 buildsetup.bat
drwx------+ 5 RealMarkP None 0 Jan 23 2001 buildtools
drwx------+ 5 RealMarkP None 0 Jan 24 2006 moztools
</pre>
* At this point were technically done with this section, installing these two tools will be handled in a later section.
=== Setting Up The Environment ===
* At this point, the The Cygwin Environment is basically set upand the two tool packages are extracted. You now have the tools required to automate the build process as well as the compiler to do the grunt work.
* Before you can start to build, you need to set up a bunch of environment variables so that the make files know where to look for dependencies. I created a build batch file that set up the environment for me:
<pre>
BuildSetup@echo off rem --- CVS SetupSET CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsrootSET CVS_RSH=ssh rem --- Setup the paths to the moztools build librariessetset MOZ_TOOLS=C:\proj\moztoolsset GLIB_PREFIX=c:\proj\vc71set LIBIDL_PREFIX=c:\proj\vc71 rem --- Scrub these variables firstSET INCLUDE=SET LIB=SET PATH=C:\;C:\windows\system32;C:\windows\system32\wbem rem --- Prepend cygwinSET PATH=C:\cygwin\bin;%PATH% rem --- Setup VC8 compiler environment varsCALL "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat goes here" x86 rem --- Add glib/libidl to build environmentSET PATH=%PATH%;%GLIB_PREFIX%;%GLIB_PREFIX%\binSET INCLUDE=%GLIB_PREFIX%\include;%INCLUDE%SET LIB=%GLIB_PREFIX%\lib;%LIB% rem --- moztools comes last after glib/libIDLSET PATH=%GLIB_PREFIX%;%GLIB_PREFIX%\bin;%PATH%;%MOZ_TOOLS%\bin
</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.
=== Glib And LibIDL For VC 7.1 ===
* Unfortunately, Moztools cones with an out dated version of Glib and LibIDL, therefore we have to supply our own. The following versions of [http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc71/vc71-glib-1.2.10-bin.zip Glib] and [http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc71/vc71-libIDL-0.6.8-bin.zip libIDL] are for Visual Studio 7.1.* Grab these two files and extract them into the proj directory. If done correctly they should be a directory called VC71in your C:\proj directory.<pre>$> pwd/cygdrive/c/proj$> ls -aldrwx------+ 6 RealMarkP None 0 Oct 12 15:13 .drwxrwxr-x+ 10 Administrators SYSTEM 0 Oct 13 11:23 ..-rwx------+ 1 RealMarkP None 843 Oct 12 15:08 buildsetup.batdrwx------+ 5 RealMarkP None 0 Jan 23 2001 buildtoolsdrwx------+ 5 RealMarkP None 0 Jan 24 2006 moztoolsdrwx------+ 6 RealMarkP None 0 Apr 5 2004 vc71</pre>* At this point, you are ready to set up the environment variables so that the build process knows where to look. === Environment Variables === * The first thing that needs to be done, is to jump into the DOS command prompt.<pre>$> cmd.exeC:\proj></pre>* Note: All the unix commands work perfectly in this state because the DOS command prompt inherited all the environment settings of the Cygwin shell.* In order to install winTools into the Moztools, we need to navigate into that directory and install using the batch file provided.<pre>C:\proj>cd buildtoolsC:\proj\buildtools>cd windowsC:\proj\buildtools\windows>install.bat MOZ_TOOLS is set to C:\proj\moztools copying exes and dlls to C:\proj\moztools\bincopying include files to C:\proj\moztools\includecopying include files to C:\proj\moztools\include\libIDLcopying lib files to C:\proj\moztools\lib done copying make sure that MOZ_TOOLS\bin is on your path C:\proj\buildtools\windows>cd ../..C:\proj></pre>* This copies over any windows related tools that we need for the build.* Secondly, we need to run the builsetup batch file we created earlier in order to set up any environment variables we need.<pre>C:\proj>buildsetup.batSetting environment for using Microsoft Visual Studio .NET 2003 tools.(If you have another version of Visual Studio or Visual C++ installed and wishto use its tools from the command line, run vcvars32.bat for that version.) C:\proj></pre>* In order to test and see if this worked, you can display all the variables that were changed and see if they contain the necessary paths for the build to work.<pre>C:\proj>echo %PATH%c:\proj\vc71;c:\proj\vc71\bin;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE;C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\BIN;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\bin\prerelease;C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\bin;C:\Program Files\Microsoft VisualStudio .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 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\vc71 C:\proj>echo %LIBIDL_PREFIX%c:\proj\vc71 C:\proj>echo %MOZ_TOOLS%C:\proj\moztools C:\proj></pre>*
=== Pulling From CVS ===
1
edit