Downloading Source Archives

  • Revision slug: Developer_Guide/Source_Code/Downloading_Source_Archives
  • Revision title: Downloading Source Archives
  • Revision id: 46426
  • Created:
  • Creator: Poningru
  • Is current revision? No
  • Comment

Revision Content

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

The Mozilla source code can be obtained either by downloading a source archive, or by using a CVS (source control) client. If you are just starting out, or you wish to build a particular Mozilla product release, downloading a source archive is recommended. Otherwise, get the Mozilla Source Code Via CVS.

Before attempting a build, please review the system requirements and build instructions.

License

This code is covered by the Netscape Public License and Mozilla Public License. Please read the terms of these licenses before altering or copying the source code.

Export Restrictions

This source code is subject to the U.S. Export Administration Regulations and other U.S. law, and may not be exported or re-exported to certain countries (currently Cuba, Iran, Libya, North Korea, Sudan and Syria) or to persons or entities prohibited from receiving U.S. exports (including those (a) on the Bureau of Industry and Security Denied Parties List or Entity List, (b) on the Office of Foreign Assets Control list of Specially Designated Nationals and Blocked Persons, and (c) involved with missile technology or nuclear, chemical or biological weapons).

Download

Releases

The source code for a release can be found on the FTP server in the "source" subdirectory of the release you want to acquire. The directory structure on the FTP server is as follows:

PROJECT/releases/RELEASE/source/

where names not in all uppercase are verbatim. PROJECT has to be replaced by e.g. firefox or thunderbird, and RELEASE by e.g. 1.5.0.3 or bonecho. The base for such a path is ftp.mozilla.org/pub/mozilla.org/. Some projects do not provide source code via FTP e.g. bonsai - in this case, you should use CVS (if possible).

The easiest way to find the source code of the release you want is to start at , and navigate your way through to it, bearing in mind the directory structure convention listed above. To navigate the FTP server, use either a browser like e.g. Firefox or an FTP client of your choice.

For example, the Firefox 1.5.0.2 source code can be found in .

The entire source tree is not available for download over FTP.

Nightlies

At the moment, source tarballs of the nightly snapshots are not provided. Currently we don't have nightly source tarballs: You can download a trunk nightly source tarball from http://ftp.mozilla.org/pub/mozilla.org where? This tarball will have the CVS files prepopulated so that the tarball can be updated from anonymous CVS.

Unpack

Source tarballs are packaged as bzipped tarballs. To unpack a tarball from a unix-like shell (or the cygwin shell), type:

tar -xjf <source-file.tar.bz2>

Or, if you want to see the files extracted,

tar xjfv <source-file.tar.bz2>

Note for Windows users: using WinRAR or WinZip to unpack source archives will not work. WinZip does not support *.bz2 files, and the archive contains zero-length files which are not unpacked properly. For windows, use for example 7 zip software.


interwiki link

{{ wiki.languages( { "fr": "fr/T\u00e9l\u00e9chargement_du_code_source_de_Mozilla", "ja": "ja/Download_Mozilla_Source_Code" } ) }}

Revision Source

<p>
{{wiki.template(':en/Build_Documentation/TOC')}}
</p><p>The Mozilla source code can be obtained either by downloading a source archive, or by using a CVS (source control) client. If you are just starting out, or you wish to build a particular Mozilla product release, downloading a source archive is recommended. Otherwise, get the <a href="en/Mozilla_Source_Code_Via_CVS">Mozilla Source Code Via CVS</a>.
</p><p>Before attempting a build, please review the <a href="en/Build_Documentation">system requirements and build instructions</a>.
</p>
<h2 name="License">License</h2>
<p>This code is covered by the <a class="external" href="http://www.mozilla.org/MPL/">Netscape Public License and Mozilla Public License</a>. Please read the terms of these licenses before altering or copying the source code.
</p>
<h2 name="Export_Restrictions">Export Restrictions</h2>
<p>This source code is subject to the U.S. Export Administration Regulations and other U.S. law, and may not be exported or re-exported to certain countries (currently Cuba, Iran, Libya, North Korea, Sudan and Syria) or to persons or entities prohibited from receiving U.S. exports (including those (a) on the Bureau of Industry and Security Denied Parties List or Entity List, (b) on the Office of Foreign Assets Control list of Specially Designated Nationals and
Blocked Persons, and (c) involved with missile technology or nuclear, chemical or biological weapons).
</p>
<h2 name="Download">Download</h2>
<h3 name="Releases">Releases</h3>
<p>The source code for a release can be found on the <a class="external" href="ftp://ftp.mozilla.org/pub/mozilla.org/">FTP server</a> in the "<code>source</code>" subdirectory of the release you want to acquire. The directory structure on the FTP server is as follows:
</p>
<pre class="eval">PROJECT/releases/RELEASE/source/
</pre>
<p>where names not in all uppercase are verbatim. <code>PROJECT</code> has to be replaced by e.g. <code>firefox</code> or <code>thunderbird</code>, and <code>RELEASE</code> by e.g. <code>1.5.0.3</code> or <code>bonecho</code>. The base for such a path is <code>ftp.mozilla.org/pub/mozilla.org/</code>. Some projects do not provide source code via FTP e.g. <code>bonsai</code> - in this case, you should use <a href="en/Mozilla_Source_Code_Via_CVS">CVS</a> (if possible).
</p><p>The easiest way to find the source code of the release you want is to start at <a class="external" href="ftp://ftp.mozilla.org/pub/mozilla.org/">, and navigate your way through to it, bearing in mind the directory structure convention listed above. To navigate the FTP server, use either a browser like e.g. Firefox or an FTP client of your choice.
</a></p><p><a class="external" href="ftp://ftp.mozilla.org/pub/mozilla.org/">For example, the Firefox 1.5.0.2 source code can be found in </a><a class="external" href="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5.0.2/source/">.
</a></p><p><a class="external" href="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5.0.2/source/">The entire source tree is not available for download over FTP.
</a></p><a class="external" href="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5.0.2/source/">
<h3 name="Nightlies">Nightlies</h3>
<p>At the moment, source tarballs of the nightly snapshots are not provided.
<span class="comment">Currently we don't have nightly source tarballs:  You can download a trunk nightly source tarball from http://ftp.mozilla.org/pub/mozilla.org where?  This tarball will have the CVS files prepopulated so that the tarball can be updated from anonymous CVS.</span>
</p>
<h2 name="Unpack">Unpack</h2>
<p>Source tarballs are packaged as bzipped tarballs. To unpack a tarball from a unix-like shell (or the cygwin shell), type:
</p>
<pre class="eval">tar -xjf &lt;source-file.tar.bz2&gt;
</pre>
<p>Or, if you want to see the files extracted,
</p>
<pre class="eval">tar xjfv &lt;source-file.tar.bz2&gt;
</pre>
</a><p><a class="external" href="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5.0.2/source/"><b>Note for Windows users:</b> using WinRAR or WinZip to unpack source archives will not work. WinZip does not support *.bz2 files, and the archive contains zero-length files which are not unpacked properly. For windows, use for example </a><a class="external" href="http://www.7-zip.org/">7 zip software</a>.
</p><p><br>
<span class="comment">interwiki link</span>
</p>{{ wiki.languages( { "fr": "fr/T\u00e9l\u00e9chargement_du_code_source_de_Mozilla", "ja": "ja/Download_Mozilla_Source_Code" } ) }}
Revert to this revision