Open main menu

CDOT Wiki β

Changes

User:RichardChu/Assignment 01: Building Firefox

4,475 bytes added, 10:38, 19 September 2006
The Build
== The Build ==
coming soonBefore Mozilla may be built, environment variables referencing the platform SDK, location of where Cygwin is installed, and location of where moztools is installed need to be set up.Therefore, [http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites#Configure_the_Environment This batch script] was copied and pasted into a text editor. The ''MOZ_TOOLS'' environment variable was modified from ''C:\moztools'' to ''C:\proj\moztools''. The batch script was saved as ''ConfigEnv.bat'' to ''C:\proj''. The resulting batch script is:  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. rem --- 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 8\VC\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 rem --- Set MOZ_TOOLS to wherever you have the moztools packaged installed set MOZ_TOOLS=C:\proj\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 A command prompt was opened (Start -> Run... -> cmd) and the present working directory was changed to ''C:\proj''. The script was executed to ensure that there are no errors. If there were no errors, you should see the Cygwin shell prompt. The file ''link.exe'' located in ''C:\cygwin\bin'' was renamed to ''_link.exe'' based on the recommendation [http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites#Configure_the_Environment located here]. After executing the ConfigEnv.bat script, we should be in the cygwin shell. Once there, the present working directory was changed to ''C:\proj''. Now that we are in the correct directory, it is time to checkout the makefile that will be used to checkout the rest of the source in the tree. To do this, the following command was executed: cvs -d :pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/client.mk Next, a .mozconfig file was created based on the information located at the [http://developer.mozilla.org/en/docs/Configuring_Build_Options Configuring Build Options] page. The resulting .mozconfig file contained the following configutation options: . $topsrcdir/browser/config/mozconfig mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-@CONFIG_GUESS@ # Optimization ac_add_options --disable-optimize ac_add_options --enable-debug # Static Build ac_add_options --disable-static --enable-shared The file was saved as ''.mozconfig'' to the ''C:\proj\mozilla'' directory. Then, from the ''C:\proj'' directory, the following command was executed to checkout Firefox's default .mozconfig file:  cvs -d :pserver:anonymous:anonymous@cvs-mirror.mozilla.org:/cvsroot co mozilla/browser/config/mozconfig  The present working directory was changed to ''C:\proj\mozilla'' and the following command was executed to checkout the branch:  make -f client.mk checkout Now that the source has been checked out, it is time to build Firefox. To do this, the following command was executed:  make -f client.mk build
== Problems Encountered and Solutions ==
1
edit