Open main menu

CDOT Wiki β

Changes

Assignment 1 paul

5,329 bytes added, 23:12, 19 September 2006
no edit summary
 
This is my first experience in building such a big application. It took me a lot of time to do the research, I went to Google, went to ChatZilla, and went to blog, tried to get help. The following are my steps to build FireFox.
== Steps to build Mozilla firefox ==
 == Steps to build Mozilla Firefox == Here are the steps that I took to build Firefox under Windows with Visual Studio 2005 .  <b><font style="font-size:120%"> Step 1: </font></b>Install Visual Studio .NET Professional 2005 by default. <b><font style="font-size:120%"> Step 2: </font></b>Install [http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites#GNU_Tools_for_Microsoft_Windows_.28Cygwin.29 GNU Tools for Microsoft Windows (Cygwin)]. Cywin is a Linux-like environment for Windows. It includes many utilities that are used to build firefox, such as gawk, perl, zip, and make. <b><font style="font-size:120%"> Step 3: </font></b>Download and Extract the [http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/moztools-static.zip Static moztools libraries] for Visual C++ to directory “C:\proj\moztools”. <b><font style="font-size:120%"> Step 4: </font></b>Create a build script called '''buildenv.bat''' containing following content in folder '''”C:\proj\”''' to setup the appropriate environment variables and paths. {| style="background:black; color:white" width="600"|-| C:\> cd c:\proj|-| C:\proj > copy con buildenv.bat|} <pre>@echo off rem --- CVS SetupSET CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsrootSET CVS_RSH=ssh rem --- Setup the paths to the moztools build librariesset MOZ_TOOLS=C:\proj\moztoolsset GLIB_PREFIX=%MOZ_TOOLS%set LIBIDL_PREFIX=%MOZ_TOOLS% 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 8\VC\vcvarsall.bat" 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=%PATH%;%MOZ_TOOLS%\bin </pre> <b><font style="font-size:120%"> Step 5: </font></b>Create a text file named .mozconfig containing following content in “C:\proj\mozilla” from command line. {| style="background:black; color:white" width="600"|-| C:\> cd c:\proj|-| C:\proj> md mozilla|-| C:\proj> cd mozilla|-| C:\proj\mozilla> copy con .mozconfig|} <pre># Building Firefox Trunk with Debugging. $topsrcdir/browser/config/mozconfig # Put all obj files in one place, not in src treemk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-objdirac_add_options --disable-staticac_add_options --enable-shared # Debug Build Setup Optionsac_add_options --disable-optimizeac_add_options --enable-debug # Disable build Windows installation fileac_add_options --disable-installer</pre> <b><font style="font-size:120%"> Step 6: </font></b>Login to the mozilla CVS repository, using the password anonymous. {| style="background:black; color:white" width="600"|- | C:\> cd c:\proj|- style="background:black; color:white" width="600"| C:\proj> buildenv.bat|-| C:\proj> cvs login|} <b><font style="font-size:120%"> Step 7: </font></b>Checkout the build script. {| style="background:black; color:white" width="600"|-| C:\proj> cvs co mozilla/browser/config mozilla/client.mk|} <b><font style="font-size:120%"> Step 8: </font></b>Download the source file from CVS. {| style="background:black; color:white" width="600"|-| C:\proj> cd mozilla|-| C:\proj\mozilla> make -f client.mk checkout |} <b><font style="font-size:120%"> Step 9: </font></b>Build the Firefox from source. {| style="background:black; color:white" width="600"|-| C:\proj\ mozilla> make -f client.mk build|}   == Problems Encountered ==  Firstly, I thought I should have the source code in order to build the application. So I went to Mozilla website and tried to download the Firefox source code, and follow the steps that on this website, which is David’s instruction about how to build Firefox on windows with Visual Studio 2005. But soon, I got stuck. The compiling process stopped after 10 minutes. The system displayed an error saying xxx.h file is not compatible. I put the error message in Google and tried to find the solution, but none of them worked for me. Finally, I went to ChatZilla to get help, luckily I got Dave figure out my problem. After I talked to Dave, I found my steps were ok, but I shouldn’t download the source code. This source code that I downloaded won’t work under Visual Studio 2005. Following Dave’s instruction on his website, I did step by step, it worked great. However, my system crashed after 30 minutes compiling. The Windows said out of memory, this is my machineproblem that I had disabled virtual memory on Windows. I enabled the virtual memory on Windows and reboot the system, after another 15 minutes compiling, the new Firefox is built.   == Resources == * [http://cs.senecac.on.ca/~david.humphrey/writing/firefox-win32-build.html Building Firefox on Win32 using Visual Studio .NET 2005] * [http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites#GNU_Tools_for_Microsoft_Windows_.28Cygwin.29 GNU Tools for Microsoft Windows (Cygwin)] * [http://gemal.dk/mozilla/build.html Build Mozilla Thunderbird/Firefox/Sunbird on Microsoft Windows] * [http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites Windows Build Prerequisites] * [http://forums.mozillazine.org/viewtopic.php?t=338845 How to build Firefox with Visual Studio 2005 Express Edition]   == Screenshot ==  This is the screen shot of new FireFox. [[Image: Minefield_Paul. jpg]]
Step 1: Install VS.NET 2005 by default.
== Conclusion ==
Step 2: Install GNU Tools for Microsoft Windows (Cygwin)[http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/moztools-static.zip]. Cywin This is a Linux-like environment for Windowsgreat experience in learning how to build a big project and involving so many software and configuration. It includes many utilities I learned knowledge and lessons from my problems that are used to build firefoxI encountered. The most important is, such as gawk, perl, zipwe can get any help, and make. When selecting packages, you must make sure the version of make is 3.80also we can help each other in open source community.
1
edit