Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2913|回复: 4

firefox编译

[复制链接]

257

主题

354

帖子

1677

积分

金牌会员

Rank: 6Rank: 6

积分
1677
发表于 2016-11-2 23:03:34 | 显示全部楼层 |阅读模式
本帖最后由 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.

回复

使用道具 举报

257

主题

354

帖子

1677

积分

金牌会员

Rank: 6Rank: 6

积分
1677
 楼主| 发表于 2016-11-17 19:16:13 | 显示全部楼层
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.
回复 支持 反对

使用道具 举报

257

主题

354

帖子

1677

积分

金牌会员

Rank: 6Rank: 6

积分
1677
 楼主| 发表于 2016-11-17 19:18:09 | 显示全部楼层
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.
回复 支持 反对

使用道具 举报

257

主题

354

帖子

1677

积分

金牌会员

Rank: 6Rank: 6

积分
1677
 楼主| 发表于 2016-11-17 19:24:05 | 显示全部楼层
本帖最后由 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),

回复 支持 反对

使用道具 举报

257

主题

354

帖子

1677

积分

金牌会员

Rank: 6Rank: 6

积分
1677
 楼主| 发表于 2016-11-17 19:31:04 | 显示全部楼层
本帖最后由 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

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|firemail ( 粤ICP备15085507号-1 )

GMT+8, 2024-3-28 18:12 , Processed in 0.062341 second(s), 19 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表