Difference between revisions of "Real World Mozilla Build Mozilla Lab"

From CDOT Wiki
Jump to: navigation, search
 
(Update to version 1.2 of MozBuild)
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Dive into Mozilla]] > [[Dive into Mozilla Day 2]] > Build Mozilla Lab
+
[[Real World Mozilla]] > [[Real World Mozilla Day 2]] > Build Mozilla Lab
  
 
== Overview ==
 
== Overview ==
Line 9: Line 9:
 
== Instructions ==
 
== Instructions ==
  
The lab machines have already been set-up to use MSVC 8 and MozillaBuild RC1You only need to run '''Mozilla-Build MSVC 8.bat''' (there is a link on the desktop) to begin (i.e., you shouldn't need to install anything).
+
In order to build Mozilla from source you must create a build environment. On Windows, this must include [http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.2.exe Mozilla Build (1.2 or newer)] and MSVC 8.  Once installed (and these are already installed int he lab) you only need to run '''start-msvc8.bat''' (there is a link on the desktop) to begin (i.e., you shouldn't need to install anything). On Linux, just install the standard development tools and libraries (e.g., on Fedora, use "yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software Development'").
  
# Create a directory called '''C:\ff''' to hold the source
+
# If on Windows on a lab machine, create a directory called '''C:\ff''' to hold the source -- if on Linux in the lab, use the '''/tmp''' directory, or your home directory on your own system.
 
# Make sure the tree is '''not red''' on [http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox tinderbox]
 
# Make sure the tree is '''not red''' on [http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox tinderbox]
# Check-out the Firefox code from '''CVS''' into C:\ff ([http://developer.mozilla.org/en/docs/Mozilla_Source_Code_%28CVS%29 instructions are here]).  You can use either of the following CVSROOT values:
+
# Check-out the Firefox code from '''CVS''' into the appropriate directory ([http://developer.mozilla.org/en/docs/Mozilla_Source_Code_%28CVS%29 instructions are here]).  You can use either of the following CVSROOT values:
 
#* :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
 
#* :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
 
#* :pserver:anonymous@hera.senecac.on.ca:/cvsroot
 
#* :pserver:anonymous@hera.senecac.on.ca:/cvsroot
# Create a '''.mozconfig''' file ([http://developer.mozilla.org/en/docs/Configuring_Build_Options instructions are here]) in C:\ff\mozilla with the following:
+
# Create a '''.mozconfig''' file ([http://developer.mozilla.org/en/docs/Configuring_Build_Options instructions are here]) in '''C:\ff\mozilla''' with the following:
 
#* Use an Object Directory (OBJDIR) named '''objdir'''
 
#* Use an Object Directory (OBJDIR) named '''objdir'''
 
#* '''Disable''' Optimization
 
#* '''Disable''' Optimization
 
#* '''Enable''' Debugging
 
#* '''Enable''' Debugging
 
#* Use '''Shared''' libraries instead of Static
 
#* Use '''Shared''' libraries instead of Static
# Build the source (instructions are here)
+
# Build the source ([http://developer.mozilla.org/en/docs/Build_and_Install instructions are here])
 
# wait, wait, wait...NOTE: the build process (a debug build) takes approximately '''1 hour''' to complete in the lab.
 
# wait, wait, wait...NOTE: the build process (a debug build) takes approximately '''1 hour''' to complete in the lab.
 
# Test your new browser:
 
# Test your new browser:
## Set the following environment variables to turn-off assertion dialogs and allow for multiple versions of the browser to be run simultaneously:
+
## Set the following environment variable to turn-off assertion dialogs, and run Firefox as follows (NOTE: -no-remote allows for another version of the browser to be run at the same time, and -Profilemanager allows you to choose/create a new profile so you don't corrupt your default profile):
 
##* export XPCOM_DEBUG_BREAK=warn
 
##* export XPCOM_DEBUG_BREAK=warn
##* export MOZ_NO_REMOTE=1
+
## Run the browser as follows:<br /><code>C:\ff\mozilla\objdir\dist\bin\firefox -Profilemanager -no-remote</code>
## Run the browser as follows: C:\ff\mozilla\objdir\dist\bin\firefox -Profilemanager
 
 
## When prompted, create a new profile called '''development'''
 
## When prompted, create a new profile called '''development'''
 
## In the address bar, enter the following URI and note the build information: '''about:'''
 
## In the address bar, enter the following URI and note the build information: '''about:'''
  
 
== Resources ==
 
== Resources ==
 +
* [http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.2.exe MozillaBuild 1.2 for Win32]
 +
* [http://webtools.mozilla.org/build/config.cgi MOZCONFIG Build Configurator]

Latest revision as of 13:09, 6 February 2008

Real World Mozilla > Real World Mozilla Day 2 > Build Mozilla Lab

Overview

This lab is designed to give you first-hand experience building Mozilla from source code. This includes setting-up a proper development/build environment, using CVS to obtain the code, configuring your build, and actually doing a complete build.

By the end of this lab you should have a functioning debug trunk build of Firefox, which we'll use for the remainder of the week for our other development work.

Instructions

In order to build Mozilla from source you must create a build environment. On Windows, this must include Mozilla Build (1.2 or newer) and MSVC 8. Once installed (and these are already installed int he lab) you only need to run start-msvc8.bat (there is a link on the desktop) to begin (i.e., you shouldn't need to install anything). On Linux, just install the standard development tools and libraries (e.g., on Fedora, use "yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software Development'").

  1. If on Windows on a lab machine, create a directory called C:\ff to hold the source -- if on Linux in the lab, use the /tmp directory, or your home directory on your own system.
  2. Make sure the tree is not red on tinderbox
  3. Check-out the Firefox code from CVS into the appropriate directory (instructions are here). You can use either of the following CVSROOT values:
    •  :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
    •  :pserver:anonymous@hera.senecac.on.ca:/cvsroot
  4. Create a .mozconfig file (instructions are here) in C:\ff\mozilla with the following:
    • Use an Object Directory (OBJDIR) named objdir
    • Disable Optimization
    • Enable Debugging
    • Use Shared libraries instead of Static
  5. Build the source (instructions are here)
  6. wait, wait, wait...NOTE: the build process (a debug build) takes approximately 1 hour to complete in the lab.
  7. Test your new browser:
    1. Set the following environment variable to turn-off assertion dialogs, and run Firefox as follows (NOTE: -no-remote allows for another version of the browser to be run at the same time, and -Profilemanager allows you to choose/create a new profile so you don't corrupt your default profile):
      • export XPCOM_DEBUG_BREAK=warn
    2. Run the browser as follows:
      C:\ff\mozilla\objdir\dist\bin\firefox -Profilemanager -no-remote
    3. When prompted, create a new profile called development
    4. In the address bar, enter the following URI and note the build information: about:

Resources