The Mozilla build process and code base have evolved considerably over the past few years. This has resulted in many caveats and tips being added to the MDN documentation for building older versions of the code base or dealing with older build tools. These tips, while helpful, are jarring and superfluous to the majority of new Mozilla builders who are mainly interested in building the latest version of Firefox. Therefore, instead of deleting all these nuggets of information, it's best to collect them all here and remove them from the majority happy path documentation. Each piece of information should mention the page and the section it originally came from. You can copy in the original text and bold out what has been removed.
From Simple_Firefox_build
Install a version of Visual Studio that supports C++ development: VS 2012 for Windows Desktop Pro or Express (free), or VC++ 2010 Pro or Express (free), or VC++ 2008 Pro or Express with SP1 (free) (Warning ! From Firefox 10, the compilator is Visual Studio 2010; if you want to use it, you must use a previous version of it !), or 2005 Professional
From Build_Instructions
This note below seems redundant as this is true by default https://msdn.microsoft.com/en-us/library/dh8che7s%28v=vs.110%29.aspx
Note: Starting with Gecko 7.0, you should no longer include "-Zc:wchar_t-" in the command line when building on Windows. If you're using Visual Studio, go to Project Properties > C/C++ > Language > Treat wchar_t as Built-in Type and set it to "yes".
Code for the Firefox 4.0 (Gecko 2.0) release lives in releases/mozilla-2.0. To get this code, do the following:
# Pull the Mozilla source to the folder 20src/ - may take a while # as hundreds of megabytes of history is downloaded to .hg hg clone https://hg.mozilla.org/releases/mozilla-2.0/ 20src cd 20src
Code for the Firefox 3.6 (Gecko 1.9.2) release lives in releases/mozilla-1.9.2. To get this code, do the following:
# Pull the Mozilla source to the folder 192src/ - may take a while # as hundreds of megabytes of history is downloaded to .hg hg clone https://hg.mozilla.org/releases/mozilla-1.9.2/ 192src cd 192src
Code for the Firefox 3.5 (Gecko 1.9.1) release lives in releases/mozilla-1.9.1. To get this code, do the following:
# Pull the Mozilla source to the folder 191src/ - may take a while # as hundreds of megabytes of history is downloaded to .hg hg clone https://hg.mozilla.org/releases/mozilla-1.9.1/ 191src cd 191src
Note: Starting with Gecko 5.0, you can actually build Firefox without a .mozconfig
file. By default, a similar-to-release build is done.
From Windows_SDK_versions
Download and install the Windows 7 SDK. Note that you need Service Pack 1--for the Express edition it is a separate download.
These versions are not supported and the Windows 7 SDK will not work with them. You need to upgrade to one of the newer Visual C++ versions above.
For Gecko 11 or below: you could also download the Windows Vista SDK and follow the instructions there to allow you to build against it.
Starting with Gecko 12.0, this SDK is necessary.
Note: While this configuration will probably build on mozilla-1.9.1 and mozilla-1.9.0, it is not supported.
Note: This SDK is not used since Gecko 12.0.
This is the SDK that mozilla-1.9.1 (Firefox 3.5) builds used to be built against. Features that depend on this SDK include:
There are two ways to obtain it:
Gecko 1.9.2 through 11: If you would like to use this SDK, add ac_add_options --with-windows-version=600
to your .mozconfig.
Note: This SDK is not used since Gecko 12.0.
This is your only option if you're on Windows 2000. This also used to be necessary for building a default Gecko 1.9.2 through 8 with Visual C++ Express editions (see atlbase.h for more).
You can download the SDK from the Microsoft Download Center.
Gecko 1.9.2 through 11: If you're building with this SDK, you will need to add ac_add_options --with-windows-version=502
to your .mozconfig.
ac_add_options --disable-vista-sdk-requirements
to your .mozconfig instead.The Windows SDK for Windows Server 2008 is not supported, and has been found to cause the following problems:
If you have the Windows Server 2008 SDK installed, uninstall it. The SDK will break builds even if you try to use other SDKs.
Other possible workarounds:
SDKs older than the Server 2003 R2 Platform SDK aren't supported either.
From Windows build prerequisites [en-US]
Depending on what you're building, you will need to use one of several available versions of Microsoft Visual C++ (MSVC) and/or Microsoft Visual Studio. See the chart at the top of this page to ensure that the version you've selected is compatible with the branch you want to build.
From Configuring Build Options [en-US]
Note: Starting with Gecko 5.0, building Firefox has become extremely simple. The default application is now Firefox, so you can build Firefox by doing configure && make
(for standalone source tarballs) or make -f client.mk
(for code from the Mercurial repository); this will build something roughly the same as the shipped version of Firefox corresponding to the code you have. You only need to follow the steps below if you want to customize the build (e.g., to create a debug build or a release build with debug symbols), you want to build something other than Firefox, or you want to build pre-gecko 5.0 source.
If you are building Mozilla source code from before Firefox 5, then you must first select the Mozilla application that you want to build (see below), and you will probably also need to set at least some of the other basic configuration options (such as whether to build a debug build or not) to get the type of build that you need.
If you are building from an older project branch that still uses CVS, you will need to set MOZ_CO_PROJECT to the appropriate value or values, using a comma-separated list, such as "mk_add_options MOZ_CO_PROJECT=browser,mail,calendar,suite,xulrunner
". This setting is ignored by most Mozilla project branches, which now use mercurial instead of CVS for source control.
Note: Starting in Gecko 2.0, objdir builds are enabled by default. If you do not specify a MOZ_OBJDIR it will be automatically set to @TOPSRCDIR@/obj-@CONFIG_GUESS@
Alternatively, you can run client.mk
directly from your objdir, using make -f <path_to_srcdir>/client.mk.
Note: Starting in Gecko 5.0, if you don't specify an application, --enable-application=browser
is assumed, thereby building Firefox.