Mozilla.com

  1. MDC
  2. Main Page
  3. Comm-central source code (Mercurial)

Comm-central source code (Mercurial)

Mercurial is a source-code management tool which allows users to keep track of changes to the source code locally and share their changes with others. The Mozilla project is in transition from using CVS for Mozilla 1.9 development to Mercurial for Mozilla 1.9.1 development and onwards.

^ 

Note: If you want to contribute patches to Thunderbird 2.0, SeaMonkey 1.1 or Firefox 3.0 development, use CVS.

Client Settings

The settings are the same as for the core Firefox 3/xulrunner 1.9.1 development. See Mozilla_Source_Code_(Mercurial)#Client_settings.

Checking out a source tree

There are multiple hg repositories hosted at mozilla.org, see http://hg.mozilla.org/ for the full list.

The integration repository for Thunderbird 3.0/SeaMonkey 2.0 development is comm-central. It contains the code needed by Thunderbird and SeaMonkey.

To check out from comm-central ("clone" the repository, using Mercurial terminology):

# Pull the Mozilla source to the folder src/ - may take a while 
# as hundreds of megabytes of history is downloaded to .hg
hg clone http://hg.mozilla.org/comm-central/ src

cd src

update/pull all other needed source via client.py:

python client.py checkout

^ 

Note: If you get the error message "No module named subprocess", you need to install python 2.4 or later

If you don't run client.py, it won't build. client.py does several things:

  • Pulls the core mozilla-central codebase (Firefox 3.1/xulrunner 1.9.1) into mozilla/
  • Pulls the following directories from cvs (the directories prefixed by extensions/ go into mozilla/extensions):
    • calendar
    • extensions/irc (Chatzilla)
    • extensions/typeaheadfind
    • extensions/venkman
    • extensions/wallet
    • directory/c-sdk
  • Runs a 'hg pull' to pull changes. This is not required (in fact, you may prefer to pull manually). Pass --skip-comm to client.py to skip this.

^ 

Note: This step will download hundreds of megabytes of data. This can take a while, depending on your network connection.


^ 

Note: Pulling in the related repositories means that you can use the same source directories to develop and build any of the items mentioned above, but does not mean that you can create cross-repository change sets. Patches that span repositories will require multiple changesets.

Building

Thunderbird and SeaMonkey

Configure and build as usual using a .mozconfig file and make -f client.mk:

# Enter the source directory
cd src

# Generate a mozconfig yourself, or use this minimal default one for Thunderbird
echo 'ac_add_options --enable-application=mail' > .mozconfig

# Builds with the object directory the same as the source directory are not
# supported, so set the object directory here. Note: Whether you have the
# object directory within the source directory is up to you. .hgignore includes
# objdir-* and obj-*, making your object directory start with one of them
# will make change finding easier and hg faster, but moving it to outside
# will make things like grep easier and quicker as well.
echo 'mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../objdir-tb' >> .mozconfig

# configure will be automatically generated using the 'autoconf-2.13'
# command.  If autoconf-2.13 isn't the right name for your system, as
# is the case on OS X using MacPorts and on Ubuntu Linux, use the 
# real command name as demonstrated below. (Note: it's "autoconf2.13"
# rather than "autoconf213" for Ubuntu 8.04, at least.)
echo 'mk_add_options AUTOCONF=autoconf213' >> .mozconfig

# Now do the build; configure will be run automatically
make -f client.mk build

^ 

Note: The dist directory for the output will now be under objdir/mozilla rather than just objdir/

^ 

Note: Just doing make -f client.mk will not update the code anymore! You need to run python client.py checkout before!

Firefox and xulrunner

You can, if needed, build Firefox or xulrunner from this tree. As client.py pulls the mozilla-central repository, builds and development of Firefox and xulrunner can take place within a repository from comm-central. The only difference is that you will need to go into the mozilla/ directory before running the build command:

cd src/mozilla
make -f client.mk build
Languages

Page last modified 10:59, 10 Aug 2008 by Standard8

Files (0)