Build Instructions 编辑
The mechanism used to build Firefox for Android also has its own page.
The mechanism used to build Firefox for iOS also has its own github.
This page is about building Firefox Desktop
The Mozilla build system, like the rest of the Mozilla codebase, is cross-platform. It uses traditional Unix-style autoconf and make tools to build the various applications (even on non-unix operating systems).
Because the Mozilla codebase builds many different applications and has many options, it is complex to use and learn. Please read these instructions carefully before attempting a build.
These build pages are for the projects which use the autoconf-based build system: Firefox, Thunderbird, Mozilla Suite / SeaMonkey, XULRunner, Sunbird, and standalone Composer.
For build information on other Mozilla projects, visit their project or build page: Camino, NSPR, Spidermonkey, NSS, and Directory SDK for C.
If you are having build problems, please post questions to the newsgroup mozilla.dev.builds (access via Google Groups). Make your post as precise as possible, including details about your operating system, your mozconfig/configure flags, and the precise error you are experiencing.
You may also want to check the TreeHerder to make sure the product you are working with is currently compiling in your environment.
For the impatient
The quickest way to build Mozilla is to use the instructions at the simple build pages:
For more detail, see below.
Getting started
Build prerequisites
Before you try to build, make sure you have the correct tools, and have configured these tools correctly.
Get the source
- Download Mozilla Source Code
- Source code for releases is available for download. Use this if you're a Linux distribution.
- Mozilla Source Code via Mercurial
- Get the latest source code using Mercurial. Use this if you're casually interested in Firefox development or you want to work on Firefox.
- Mozilla Source Code via Git
- Get the latest source code using Git. (The steps may seem a little weird. You'll have to install a Git extension, git-cinnabar, so that
git
knows how to clone and pull commits from our Mercurial repository.) - Comm-central Source Code via Mercurial
- Those doing active development on Thunderbird/SeaMonkey/Firefox can check out the latest source using Mercurial. This method includes all the code for the applications mentioned, so you can work on Firefox development, and still build Thunderbird or SeaMonkey as well.
Configuring build options
Running configure and make with the default options will not give you a good working build. You should use a .mozconfig
file to obtain a reasonable release build. Please read Configuring Build Options carefully before building.
Build and install
After setting up your environment, downloading the source, and configuring the build, refer to the following per-app instructions on how to build:
Random FAQs and Developer Documentation
- Mozilla Build FAQ
- Adding Files to the Build
- Adding Components
- Creating a Release Tag
- Cross-Compiling Mozilla
- Compiling 32-bit Firefox on a Linux 64-bit OS
- Mozilla Release Checklist
- Clang Static Analysis
- Package Filename Convention
- Building with Profile-Guided Optimization
- Building Firefox with Debug Symbols
- Building only SpiderMonkey
- Building Firefox with Rust Code
- Notes on how mozilla.org does release builds (circa 2007)
- Building Firefox on Windows with clang-cl
Hacking the Build System
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论