mozilla

Revision 101064 of Getting comm-central Source Code Using Mercurial

  • Revision slug: Developer_Guide/Source_Code/Getting_comm-central
  • Revision title: Getting comm-central Source Code Using Mercurial
  • Revision id: 101064
  • Created:
  • Creator: Standard8
  • Is current revision? No
  • Comment Add section on building.

Revision Content

{{wiki.template(':en/Build_Documentation/TOC')}}

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.

{{template.Note("If you want to contribute patches to Thunderbird 2.0, SeaMonkey 1.1 or Firefox 3 development, use <a href=\"en/Mozilla_Source_Code_(CVS)\">CVS</a>.")}}

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

If you get the error message "No module named subprocess", that's because you didn't 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
    • extensions/webdav
    • 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.

Building

Thunderbird and SeaMonkey

Configure and build as usual using a <tt>.mozconfig</tt> file and <tt>make -f client.mk</tt>.

# Generate a mozconfig yourself, or use this minimal default one for Thunderbird
echo '. $topsrcdir/mail/config/mozconfig' > .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

Firefox and xulrunner

As client.py pulls mozilla-central, 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

Revision Source

<p>{{wiki.template(':en/Build_Documentation/TOC')}}
</p><p><a href="en/Mercurial">Mercurial</a> 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 <a href="en/Mozilla_Source_Code_(CVS)">CVS</a> for Mozilla 1.9 development to Mercurial for Mozilla 1.9.1 development and onwards.
</p><p>{{template.Note("If you want to contribute patches to Thunderbird 2.0, SeaMonkey 1.1 or Firefox 3 development, use &lt;a href=\"en/Mozilla_Source_Code_(CVS)\"&gt;CVS&lt;/a&gt;.")}}
</p>
<h3 name="Client_Settings"> Client Settings </h3>
<p>The settings are the same as for the core Firefox 3/xulrunner 1.9.1 development. See <a href="en/Mozilla_Source_Code_(Mercurial)#Client_settings">Mozilla_Source_Code_(Mercurial)#Client_settings</a>.
</p>
<h3 name="Checking_out_a_source_tree"> Checking out a source tree </h3>
<p>There are multiple hg repositories hosted at mozilla.org, see http://hg.mozilla.org/ for the full list.
</p><p>The integration repository for Thunderbird 3.0/SeaMonkey 2.0 development is <a href="en/Comm-central">comm-central</a>. It contains the code needed by Thunderbird and SeaMonkey.
</p><p>To check out from comm-central ("clone" the repository, using Mercurial terminology):
</p>
<pre class="eval"># 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
</pre>
<p>update/pull all other needed source via client.py:
</p>
<pre class="eval">python client.py
</pre>
<p>If you get the error message "No module named subprocess", that's because you didn't install Python 2.4 or later.
</p><p>If you don't run client.py, it won't build. client.py does several things:
</p>
<ul><li> Pulls the core <a href="en/Mozilla-central">mozilla-central</a> codebase (Firefox 3.1/xulrunner 1.9.1) into mozilla/
</li><li> Pulls the following directories from cvs (the directories prefixed by extensions/ go into mozilla/extensions):
<ul><li> calendar
</li><li> extensions/irc (Chatzilla)
</li><li> extensions/typeaheadfind
</li><li> extensions/venkman
</li><li> extensions/wallet
</li><li> extensions/webdav
</li><li> directory/c-sdk
</li></ul>
</li><li> 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.
</li></ul>
<h3 name="Building"> Building </h3>
<h4 name="Thunderbird_and_SeaMonkey"> Thunderbird and SeaMonkey </h4>
<p><a href="en/Configuring_Build_Options">Configure</a> and build as usual using a <tt>.mozconfig</tt> file and <tt>make -f client.mk</tt>.
</p>
<pre class="eval"># Generate a mozconfig yourself, or use this minimal default one for Thunderbird
echo '. $topsrcdir/mail/config/mozconfig' &gt; .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' &gt;&gt; .mozconfig

# Now do the build; configure will be run automatically
make -f client.mk build
</pre>
<h4 name="Firefox_and_xulrunner"> Firefox and xulrunner </h4>
<p>As client.py pulls mozilla-central, 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:
</p>
<pre class="eval">cd src/mozilla
make -f client.mk build
</pre>
Revert to this revision