mozilla

Revision 280621 of Código fuente de Mozilla (Mercurial)

  • Enlace amigable (slug) de la revisión: Código_fuente_de_Mozilla_(Mercurial)
  • Título de la revisión: Código fuente de Mozilla (Mercurial)
  • Id de la revisión: 280621
  • Creada:
  • Creador: Mgjbot
  • ¿Es la revisión actual? No
  • Comentario en to xx bot of Mgjbot

Contenido de la revisión

{{wiki.template('Traducción', [ "inglés", "Mozilla_Source Code (Mercurial)", "en" ])}}


{{wiki.template(':es/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 Firefox 3/Mozilla 1.9 development to Mercurial for Firefox 4/Mozilla 2 development.

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

Client settings

Installing and configuring Mercurial

See Installing_Mercurial.

Autoconf 2.13

Mozilla 2 sources do not come with a generated configure script. You will need to have autoconf version 2.13 installed.

On Mac:
<tt>sudo port install autoconf213</tt>

On Fedora/RedHat Linux:
<tt>sudo yum install autoconf213</tt>

On Ubuntu Linux:
<tt>sudo apt-get install autoconf2.13</tt>

On other Linux distributions (like e.g. openSUSE):
either see if a package for this is provided or install it manually with the following commands (the last one might need root privileges):
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz
tar -xvzf autoconf-2.13.tar.gz
cd autoconf-2.13/
./configure --program-suffix=-2.13
make
make install

On Windows:
autoconf 2.13 comes with MozillaBuild
Note: You may also need to set the "AUTOCONF" variable in your <tt>.mozconfig</tt> file, as demonstrated in the "Building" section below.

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 Mozilla 2 development is mozilla-central. It contains the code needed by Firefox and XULRunner, which will be eventually released as Mozilla 2.

To check out from mozilla-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/mozilla-central/ src

cd src

python client.py checkout is deprecated - see bug 417635. 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 three things: * Pulls the correct version (by tag) of NSS and NSPR and places them in right locations in your source tree. This is required to build. * Pulls Tamarin code. This is not required (and it's only a pull, so it's harmless). Pass --no-tamarin to client.py to skip this. * Runs a 'hg pull' to pull changes. This is also not required (in fact, you may prefer to pull manually). Pass --hg=echo to client.py to skip this.

Building

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
echo '. $topsrcdir/browser/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

See also

  • The Mercurial page has information about creating diffs, committing changes, and publishing shared repositories.
{{ wiki.languages( { "fr": "fr/Code_source_de_Mozilla_(Mercurial)", "en": "en/Mozilla_Source_Code_(Mercurial)" } ) }}

Fuente de la revisión

<p>{{wiki.template('Traducción', [ "inglés", "Mozilla_Source Code (Mercurial)", "en" ])}}
</p><p><br>
{{wiki.template(':es/Build_Documentation/TOC')}}
</p><p><a href="es/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="es/Mozilla_Source_Code_(CVS)">CVS</a> for Firefox 3/Mozilla 1.9 development to Mercurial for Firefox 4/Mozilla 2 development.
</p><p>{{template.Note("If you want to contribute patches to Firefox 3 development, use &lt;a href=\"es/Mozilla_Source_Code_(CVS)\"&gt;CVS&lt;/a&gt;.")}}
</p>
<h3 name="Client_settings"> Client settings </h3>
<h4 name="Installing_and_configuring_Mercurial"> Installing and configuring Mercurial </h4>
<p>See <a href="es/Installing_Mercurial">Installing_Mercurial</a>.
</p>
<h4 name="Autoconf_2.13"> Autoconf 2.13 </h4>
<p>Mozilla 2 sources do not come with a generated configure script. You will need to have autoconf version 2.13 installed.
</p><p></p><dl>
<dt>On Mac:
</dt><dd><tt>sudo port install autoconf213</tt>
<p></p></dd><dt>On Fedora/RedHat Linux:
</dt><dd><tt>sudo yum install autoconf213</tt>
<p></p></dd><dt>On Ubuntu Linux:
</dt><dd><tt>sudo apt-get install autoconf2.13</tt>
<p></p></dd><dt>On other Linux distributions (like e.g. openSUSE):
</dt><dd>either see if a package for this is provided or install it manually with the following commands (the last one might need root privileges):

<pre class="eval">wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz
tar -xvzf autoconf-2.13.tar.gz
cd autoconf-2.13/
./configure --program-suffix=-2.13
make
make install
</pre>
<p></p></dd><dt>On Windows:
</dt><dd>autoconf 2.13 comes with <a href="es/Windows_Build_Prerequisites#MozillaBuild">MozillaBuild</a>
</dd></dl>
Note: You may also need to set the "AUTOCONF" variable in your <tt>.mozconfig</tt> file, as demonstrated in the <a href="#Building">"Building" section</a> below.

<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 Mozilla 2 development is <a href="es/Mozilla-central">mozilla-central</a>. It contains the code needed by Firefox and XULRunner, which will be eventually released as Mozilla 2.
</p><p>To check out from mozilla-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/mozilla-central/ src

cd src
</pre>
<p><span class="comment">python client.py checkout is deprecated - see bug 417635.  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 three things: * Pulls the correct version (by tag) of NSS and NSPR and places them in right locations in your source tree.  This is required to build. * Pulls Tamarin code.  This is not required (and it's only a pull, so it's harmless).  Pass --no-tamarin to client.py to skip this. * Runs a 'hg pull' to pull changes.  This is also not required (in fact, you may prefer to pull manually).  Pass --hg=echo to client.py to skip this.</span>
</p>
<h3 name="Building"> Building </h3>
<p><a href="es/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
echo '. $topsrcdir/browser/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>
<h3 name="See_also"> See also </h3>
<ul><li> The <a href="es/Mercurial">Mercurial</a> page has information about creating diffs, committing changes, and publishing shared repositories.
</li></ul>
<div class="noinclude">
</div>
{{ wiki.languages( { "fr": "fr/Code_source_de_Mozilla_(Mercurial)", "en": "en/Mozilla_Source_Code_(Mercurial)" } ) }}
Revertir a esta revisión