The Mozilla
Organization
At A Glance
Feedback
Get Involved
Newsgroups
License Terms
Newsbot
Developer Docs
Roadmap
Projects
Ports
Module Owners
Hacking
Get the Source
Build It
Testing
Download
Bugzilla
Bug Writing
Tools
View Source
Tree Status
New Checkins
Submit A Bug
FAQ
Search

Building A Mozilla Distribution

These are directions for creating your own milestone build or any other distribution. You might want to create your own distribution in order to create a build for some platform that's not normally on our ftp site or to enable some feature that's not supported in the standard builds.
  1. Download the special milestone tarball and build from it, not from your normal tree.
  2. Set the build options to disable debugging symbols, create optimized code, set the build date (which is used in bugzilla) plus whichever other options you choose.
  3. Test your build to make sure it runs and make a note of the BuildID number in the lower right hand corner of the app. It should look something like 2000020208 and reflect the date and time you built the package.
  4. Make the tarball available somewhere and let us know so we can move it to the ftp site. We need to know the build id number and anything non-standard enabled (or disabled) in the build.

Unix

It helps to be familiar with the unix build instructions and with using the unix build configurator to create a mozconfig file.
  1. Download the source.
    Download a source tarball of the latest milestone. (If you're making a distribution from code in your own private tree you'll probably need to make clobber first).

  2. Configure the build environment.
    Create a file in the tree created from your tarball called mozilla/.mozconfig. You'll want to add these options to make your distribution smaller. The --disable-debug option is pretty important otherwise your package will be 20mb or more. Normal packages are around 5MB. The --enable-optimize option enables the compiler option to build optimized binaries. Feel free to turn on other options such as MathML which aren't enabled in the official builds.
    ac_add_options --disable-tests
    ac_add_options --disable-debug
    ac_add_options --enable-optimize
    #ac_add_options --enable-mathml #uncomment to enable mathml
     

    Set these environment variables so the build date will be set correctly.

    MOZILLA_OFFICIAL=1
    export MOZILLA_OFFICIAL
    BUILD_OFFICIAL=1
    export BUILD_OFFICIAL
    
  3. Build the tree.
    Make sure not to use the regular command to compile the code since you don't want to do a cvs update. If you sync the tree, you'll be building from the tip and no longer have a milestone build.
    gmake -f client.mk build
    
  4. Create the package.
    There is a make file in the packager directory that will create a tarball for you in a package directory. It should place your package in mozilla/dist. At this point the only supported package type is tar but instrumentation exists for enterprising contributors to add support for other package formats such as RPM or deb.
    cd mozilla/xpinstall/packager
    gmake
    
  5. Test.
    Test your package to make sure it works. Our smoke tests are designed for this purpose.

  6. Distribute.
    Make the tarball available somewhere and let us know so we can move it to the ftp site. Let us know the BuildID as well as anything useful about your build environment such as the version of the OS, the name of the Linux distribution, or if you're using a non-standard compiler. If your package is very non-standard, it would be a good idea to include a README file.

    Win32

    It helps to be familiar with the build instructions.
    1. Download the source.
      Download a source tarball of the latest milestone.

    2. Configure the build environment.
      You'll want to disable debugging to reduce the size of your distribution. Set MOZILLA_OFFICIAL to set the correct build date. (There is a problem with this. See bug 27316 for a workaround.) Feel free to turn on other options such as MathML which aren't enabled in the official builds. If you're building from a different directory than normal remember to set MOZ_SRC to the parent directory of your mozilla tree.
      set MOZ_DEBUG=
      set MOZILLA_OFFICIAL=1
      set MOZ_MATHML=1
      set MOZ_SRC=d:\mozilla\m13 
       
    3. Build the tree.
      When you compile, make sure not to use a command uses cvs to update the tree. If you sync the tree, you'll be building from the tip and no longer have a milestone build.
      nmake /f client.mak build_all
      
    4. Create the package.
      You have the choice of packaging the binaries either as a zip file or as an executable installer. The installer is only buildable on NT and requires the command line zip utility from Info-ZIP. Download unz540xN.exe to get unzip.exe. Then download and unzip zip23xN.zip. Copy zip.exe to a directory in your system's search path.

      • To create an installer, change to the xpinstall builder directory and run the perl script.
        cd mozilla\xpinstall\wizard\windows\builder
        perl build.pl
         
        This creates the file mozilla-win32-installer.exe in mozilla\dist\win32_o.obj\install. (Or in mozilla\dist\win32_d.obj\install if you created a debug build.)

      • To create a zip file, change to the mozilla/dist/WIN32_O.OBJ directory and and create a zip file of the bin directory and its contents.
        cd mozilla\dist\WIN32_O.OBJ
        zip.exe -r mozilla-win32-M13.zip bin
         

    5. Test.
      Test your package to make sure it works. Our smoke tests are designed for this purpose.

    6. Distribute.
      Make the tarball available somewhere and let us know so we can move it to the ftp site. Let us know the BuildID as well as anything useful about your build environment such as the version of the OS, the name of the Linux distribution, or if you're using a non-standard compiler. If your package is very non-standard, it would be a good idea to include a README file.

      Macintosh

      HELP WANTED! We need distribution directions for the Macintosh.

      Contact: Dawn Endico

Copyright © 1998-2000 The Mozilla Organization.
Last modified February 23, 2000.