firemail
标题: firefox编译 [打印本页]
作者: jimu 时间: 2016-11-2 23:03
标题: firefox编译
本帖最后由 jimu 于 2016-11-7 19:05 编辑
https://developer.mozilla.org/en ... imple_Firefox_build
https://developer.mozilla.org/en ... ndows_Prerequisites
Firefox 48 and later build with Visual Studio 2015 in our official releases. You should be using Visual Studio 2015 to build all current versions of Firefox.
Firefox 37 through 47 build with Visual Studio 2013 (VC12) and possibly Visual Studio 2015 (although Visual Studio 2015 may not build every revision).
Earlier versions of Firefox build with older versions of Visual Studio.
Installing the build prerequisites
- Make sure your system is up-to-date through Windows Update.
- Install Visual Studio Community 2015 (free). Be sure to install the "Common Tools for Visual C++ 2015", which requires a customized installation in Visual Studio 2015. Alternatively, you can also use a paid version of Visual Studio. The optional parts of the VS2015 Community install - including the Microsoft Foundation Classes for C++ - are not necessary to build Firefox. Earlier versions of Visual Studio are not supported; the Firefox codebase relies on C++ features that are not supported in VS2012 or earlier.
- Optionally, in addition to VS2015, you may want to also install Visual C++ 2008 Express (free) to compile some Python extensions used in the build system, because Python 2.7.x on Windows is built with that compiler by default. Note, if you want to use "mach resource-usage", "mach doctor", "mach android-emulator", or run talos tests locally, you should install it for building psutil.
- Download and install the MozillaBuild package, containing additional build tools. If you have Cygwin installed, read the note in the tips section. (After MozillaBuild's installer exits, if you see a Windows error dialog giving you the option to re-install with the 'correct settings', choose that option and after that all should be well.) More information about MozillaBuild and links to newer versions are available at https://wiki.mozilla.org/MozillaBuild.
作者: jimu 时间: 2016-11-17 19:16
To recreate a release build (all versions of Visual Studio):
- Install the June 2010 DirectX SDK. This is only needed so that the build can package an older version of the D3D compiler DLL (d3dcompiler_43.dll) from it, which is required for the builds to run on Windows XP.
作者: jimu 时间: 2016-11-17 19:18
By default, the package installs to c:\mozilla-build. It is recommended to use the default path. Don't use a path that contains spaces. The installer does not modify the Windows registry. Note that some binaries may require Visual C++ Redistributable package to run.
作者: jimu 时间: 2016-11-17 19:24
本帖最后由 jimu 于 2016-11-17 19:33 编辑
Opening a MozillaBuild command promptAfter the prerequisites are installed, launch one of the following batch files using the Windows command prompt in the directory to which you installed MozillaBuild (c:\mozilla-build by default):
start-shell-msvc2015.bat (32-bit build for Visual Studio 2015 - for new contributors, this is the one you want.)
Create a directory for the source
cd c:/; mkdir mozilla-source; cd mozilla-source
Simple Firefox build (Get_the_source),
作者: jimu 时间: 2016-11-17 19:31
本帖最后由 jimu 于 2016-11-18 11:19 编辑
Get the source
hg clone https://hg.mozilla.org/mozilla-central
(if this error persists, consider contacting the server operator or disable clon
e bundles via "--config ui.clonebundles=false")
hg --config ui.clonebundlefallback=true clone https://hg.mozilla.org/mozilla-central
hg --config ui.clonebundlefallback=false --config ui.clonebundles=false clone https://hg.mozilla.org/mozilla-central
Build configuration (optional)cd /path/to/mozilla-centraltouch mozconfig
For more on configuration options, see the page on configuring build options.
export MOZCONFIG=~/mozilla/mozconfig-firefox
ac_add_options --enable-application=browser
Building
export NO_MERCURIAL_SETUP_CHECK=1
./mach mercurial-setup
./mach build
欢迎光临 firemail (http://firemail.wang:8088/) |
Powered by Discuz! X3 |