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 Mercurial.
Before attempting a build, please review the system requirements and build instructions.
This source code is subject to the U.S. Export Administration Regulations and other U.S. laws, 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).
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). Specific versions of the applications are accessible with specific CVS Tags.
The easiest way to find the source code of the release you want is to start at 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 Firefox or an FTP client of your choice.
For example, the project Firefox release 2.0.0.4 source code can be found in ftp://ftp.mozilla.org/pub/mozilla.or....0.0.4/source/. That combines the base URL, ftp://ftp.mozilla.org/pub/mozilla.org/ with the PROJECT = firefox, /releases/, RELEASE= 2.0.0.4 and finally /source/.
The entire source tree is not available for download over FTP.
Should the ftp links fail, try the HTTP server.
Source code is packaged as bzipped tarballs. This means that you must have tar along with bzip2 installed, since the -j flag in the commands listed below means the archive is first being unpacked with bzip2. 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.
Page last modified 21:43, 1 Sep 2008 by Steffen