欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
Mozilla/developer
来自开放百科 - 灰狐
目录 |
Mozilla 2
Firefox4 源码的目录就是 firefox-4.0.source/mozilla-2.0
编译
需要安装的
- Microsoft Visual C++ Tools // VC7.1 (Visual Studio 2003), VC8 (Visual Studio 2005), VC9 (Visual Studio 2008)
- Microsoft Windows SDK(s)
- MozillaBuild
https://developer.mozilla.org/en/Windows_Build_Prerequisites
- http://developer.mozilla.org/en/docs/Build_Documentation
- http://developer.mozilla.org/en/docs/Creating_a_patch
安装好需要的软件后,进入c:\mozilla-build 目录:
- start-msvc8.bat or start-msvc8-x64.bat (VS 2005)
- start-msvc9.bat or start-msvc9-x64.bat (VS 2008)
- start-msvc10.bat or start-msvc10-x64.bat (VS 2010)
获得源码
配置Build选项
在 firefox-4.0.source/mozilla-2.0目录下创建:.mozconfig 文件,内容如下:
mk_add_options MOZ_CO_PROJECT=browser mk_add_options MOZ_MAKE_FLAGS="-j5" mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging" mk_add_options MOZ_PACKAGE_NSIS=1 ac_add_options --enable-application=browser ac_add_options --enable-update-channel=nightly ac_add_options --enable-optimize ac_add_options --disable-debug ac_add_options --disable-tests ac_add_options --enable-update-packaging --with-windows-version=600 // Windows SDK 版本为 6.0A
创建目录
dist\bin dist\host\bin 在dist\bin目录下创建 xpidl.exe.manifest、xpt_link.exe.manifest
在dist\host\bin目录下创建 mkdepend.exe.manifest,内容如下:
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity> </dependentAssembly> </dependency> </assembly>
或
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity> </dependentAssembly> </dependency> </assembly>
编译和安装
- 运行 start-msvc9.bat 并进入 mozilla-2.0 目录
- make -f client.mk build
- 编译成功后 mozilla-2.0\dist\bin 目录下会有firefox.exe生成
- 参考:Build and Install
图集
链接
- Mozilla开发者网络
- Mozilla Hacks
- Mozilla Developer Guide
- Creating Applications with Mozilla
- XUL Tutorial
- XUL Element Reference
- http://developer.mozilla.org/en/docs/Developing_Mozilla
- Hacking Firefox - http://developer.mozilla.org/en/docs/Hacking_Firefox
- Mozilla Firefox: Development Specifics
- Mozilla Source Code Directory Structure
<discussion>characters_max=300</discussion>
分享您的观点