Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2631|回复: 7
打印 上一主题 下一主题

fireshadow开源

[复制链接]

257

主题

354

帖子

1677

积分

金牌会员

Rank: 6Rank: 6

积分
1677
跳转到指定楼层
楼主
发表于 2016-12-7 19:13:12 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 jimu 于 2017-7-16 20:56 编辑

https://github.com/mozilla/gecko-dev

1.clone分支https://github.com/mozilla/gecko-dev.git

2.创建本地与服务端对应版本分支
右键 create Branch


回复

使用道具 举报

257

主题

354

帖子

1677

积分

金牌会员

Rank: 6Rank: 6

积分
1677
沙发
 楼主| 发表于 2016-12-7 19:38:49 | 只看该作者
本帖最后由 jimu 于 2016-12-14 20:26 编辑

start-shell-msvc2013.bat
问题1:

bolt@bolt-PC /d/zmkj/gecko-dev
$ mach build
0:04.64 c:\mozilla-build\mozmake\mozmake.EXE -f client.mk -s
0:06.84 client.mk:89: *** This source tree appears to have Windows-style line endings.
To convert it to Unix-style line endings, check "https://developer.mozilla.org/en-US/docs/Developer_Guide/Mozilla_build_FAQ\#Win32-specific_questions" for a workaround of this issue..  Stop.
0:06.86 0 compiler warnings present.
2

解决1:

就是回车(CR, ASCII 13, \r) 换行(LF, ASCII 10, \n)。

换行符的问题 autocrlf and safecrlf
Windows(\r\n)、Linux(\n)和MacOS(\r)三个主流系统的换行符各不相同,这样在跨平台合作的时候就容易出现换行符的问题。
Git提供了 autocrlf 和 safecrlf 两个参数来解决这个问题。但这两个参数如果没用好,就会影响开发。
例如,出现这种情况:
A和B两个开发人员,A使用LF(\n)做换行符,B使用CRLF(\r\n)做换行符,且都没有开启 autocrlf 参数,那么A在迁出B的文件,并使用自己的编辑器打开之后就会发现,虽然没有对文件做任何修改,但它的状态是modified。这是由于A的编辑器自动将B的文件中的所有换行符替换成了(LF),这与版本库中的(CRLF)不同。
让我们来看看 autocrlf 参数的作用:
  1. # 签出时将换行符转换成CRLF,签入时转换回 LF。
  2. git config --global core.autocrlf true

  3. #签出时不转换换行符,签入时转换回 LF
  4. git config --global core.autocrlf input

  5. #签出签入均不转换
  6. git config --global core.autocrlf false
复制代码
这些选项在TorgoiseGit中也可以设置。
我的建议是在无论在什么系统下编程,都把所有人的编辑器的换行符模式设置成Unix格式,然后把autocrlf设置成false,这样一劳永逸。
毕竟除了Windows记事本这类软件外,已经很少有文本编辑器不支持换行符设置了。
如果你把换行符搞乱了,在一个文件中既包含windows风格的换行符也包含unix风格换行符,那么 safecrlf 就可以发挥作用了:
  1. # 拒绝提交包含混合换行符的文件
  2. git config --global core.safecrlf true

  3. # 允许提交包含混合换行符的文件
  4. git config --global core.safecrlf false

  5. # 提交包含混合换行符的文件时候给出警示
  6. git config --global core.safecrlf warn
复制代码
auto CrLf(自动换行符转化)   设置为  false
safecrlf(检查换行)  设置为 warn


然后从日志中重新reset一下


回复 支持 反对

使用道具 举报

165

主题

269

帖子

957

积分

认证用户组

Rank: 5Rank: 5

积分
957
板凳
发表于 2017-2-8 13:21:00 | 只看该作者
本帖最后由 firemail 于 2017-2-14 18:46 编辑

mozconfig方法
https://developer.mozilla.org/en ... uring_Build_Options
  1. echo 'ac_add_options --enable-application=browser' > .mozconfig

  2. mk_add_options MOZ_CO_PROJECT=browser
  3. mk_add_options MOZ_MAKE_FLAGS="-j5"
  4. mk_add_options MOZ_CO_MODULE="mozilla/tools/update-packaging"
  5. mk_add_options MOZ_PACKAGE_NSIS=1
  6. ac_add_options --enable-application=browser
  7. ac_add_options --enable-update-channel=nightly
  8. ac_add_options --enable-optimize
  9. ac_add_options --disable-debug
  10. ac_add_options --disable-tests
  11. ac_add_options --enable-update-packaging

  12. mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj-@CONFIG_GUESS@
  13. ac_add_options --enable-libxul
  14. ac_add_options --disable-mochitest
  15. ac_add_options --with-valgrind
  16. ac_add_options --enable-safe-browsing
  17. ac_add_options --disable-crashreporter
  18. --------------------------------------------


  19. make -f client.mk build
复制代码
相关平台下配置信息
\gecko-dev\browser\config


问题
  1. bolt@bolt-PC /d/zhaomokeji_zm/gecko-dev
  2. $ make -f client.mk build
  3. /d/zhaomokeji_zm/gecko-dev/config/baseconfig.mk:28: *** MSYS make is not supported.  Stop.
复制代码
回复 支持 反对

使用道具 举报

165

主题

269

帖子

957

积分

认证用户组

Rank: 5Rank: 5

积分
957
地板
发表于 2017-2-8 13:21:50 | 只看该作者
本帖最后由 firemail 于 2017-2-8 20:27 编辑

http://www.cnblogs.com/michaellee/archive/2009/08/06/1540467.html

编译好的程序放在了 E:\mozilla\dist\bin 下面,趁热双击Firefox.exe 看一看新鲜出炉的成果。
源代码编译出来的Firefox都是英文版本的,而且人家也不叫Firefox 而是Gran Paradiso。下面介绍一下给Firefox打语言包的方法:
1) 到ftp://ftp.mozilla.org/pub/firefox/releases/版本号/win32/xpi/ 目录下下载简体中文语言包插件zh-CN.xpi 到E:\Mozilla\dist\bin 目录下(别忘了把"版本号"替换成真正的版本号)。
2) 使用命令控制台(cmd.exe)转到E:\Mozilla\dist\bin 目录下, 运行firefox -install-global-extension zh-CN.xpi 安装语言包插件。
3) 启动Firefox,在地址栏输入 about:config 回车,设置Firefox的默认语言。

4) 将general.useragent.locale 的值由en变为zh-CN。重启Firefox。


5) 至此Firefox已经变为中文版本。



https://hg.mozilla.org/

https://dxr.mozilla.org/
回复 支持 反对

使用道具 举报

165

主题

269

帖子

957

积分

认证用户组

Rank: 5Rank: 5

积分
957
5#
发表于 2017-2-8 20:44:34 | 只看该作者
本帖最后由 firemail 于 2017-2-9 19:38 编辑

zzzzzzzzzz
回复 支持 反对

使用道具 举报

165

主题

269

帖子

957

积分

认证用户组

Rank: 5Rank: 5

积分
957
6#
发表于 2017-2-9 19:37:34 | 只看该作者
本帖最后由 firemail 于 2017-2-14 18:54 编辑

首次编译
  1. bolt@bolt-PC /d/zhaomokeji_zm/gecko-dev
  2. $ mach build
  3. 0:01.92 c:\mozilla-build\mozmake\mozmake.EXE -f client.mk -s
  4. 0:07.03 client.mk:202: d:/zhaomokeji_zm/gecko-dev/obj-i686-pc-mingw32/.mozconfi
  5. g.mk: No such file or directory
  6. 0:10.46 Clobber not needed.
  7. 0:22.48 Adding client.mk options from :
  8. 0:22.48     MOZ_OBJDIR=d:/zhaomokeji_zm/gecko-dev/obj-i686-pc-mingw32
  9. 0:22.48     OBJDIR=d:/zhaomokeji_zm/gecko-dev/obj-i686-pc-mingw32
  10. 0:27.65 cd d:/zhaomokeji_zm/gecko-dev/obj-i686-pc-mingw32
  11. 0:27.71 d:/zhaomokeji_zm/gecko-dev/configure
复制代码
重复编译
  1. bolt@bolt-PC /d/zhaomokeji_zm/gecko-dev
  2. $ mach build
  3. 0:01.82 c:\mozilla-build\mozmake\mozmake.EXE -f client.mk -s
  4. 0:12.80 Adding client.mk options from :
  5. 0:12.80     MOZ_OBJDIR=d:/zhaomokeji_zm/gecko-dev/obj-i686-pc-mingw32
  6. 0:12.80     OBJDIR=d:/zhaomokeji_zm/gecko-dev/obj-i686-pc-mingw32
  7. 0:15.93 From dist/branding: Kept 15 existing; Added/updated 0; Removed 0 files
  8. and 0 directories.
  9. 0:16.21 From dist/idl: Kept 1151 existing; Added/updated 0; Removed 0 files and
  10. 0 directories.
复制代码
mach build 这种方法可以即mozmake.EXE -f client.mk -s
  1. 61:48.14 Processing config: c:\mozilla-build\nsis-3.0b3\nsisconf.nsh
  2. 61:48.23 Processing script file: "webapp-uninstaller.nsi" (ACP)
  3. 61:48.60
  4. 61:48.60 Processed 1 file, writing output (x86-ansi):
  5. 61:48.60 warning: Uninstall page instfiles not used, no sections will be execute
  6. d!
  7. 61:48.61
  8. 61:48.61 Output: "d:\zhaomokeji_zm\gecko-dev\obj-i686-pc-mingw32\webapprt\win\in
  9. stgen\webapp-uninstaller.exe"
  10. 61:48.61 Install: 0 pages (0 bytes), 1 section (2072 bytes), 66 instructions (18
  11. 48 bytes), 53 strings (865 bytes), 1 language table (162 bytes).
  12. 61:48.61 Uninstall: 0 pages (64 bytes), 0 sections (0 bytes), 903 instructions (
  13. 25284 bytes), 180 strings (2375 bytes), 1 language table (178 bytes).
  14. 61:48.61
  15. 61:48.61 Using zlib compression.
  16. 61:48.61
  17. 61:48.61 EXE header size:               35840 / 36864 bytes
  18. 61:48.61 Install code:                   1036 / 4251 bytes
  19. 61:48.61 Install data:                   6430 / 11276 bytes
  20. 61:48.61 Uninstall code+data:           36912 / 37411 bytes
  21. 61:48.61 CRC (0x0A10EC9A):                  4 / 4 bytes
  22. 61:48.61
  23. 61:48.61 Total size:                    80222 / 89806 bytes (89.3%)
  24. 61:48.61
  25. 61:48.61 1 warning:
  26. 61:48.61   Uninstall page instfiles not used, no sections will be executed!
  27. 61:51.58 Processing config: c:\mozilla-build\nsis-3.0b3\nsisconf.nsh
  28. 61:51.58 Processing script file: "uninstaller.nsi" (ACP)
  29. 61:53.32
  30. 61:53.32 Processed 1 file, writing output (x86-unicode):
  31. 61:53.33
  32. 61:53.33 Output: "d:\zhaomokeji_zm\gecko-dev\obj-i686-pc-mingw32\browser\install
  33. er\windows\instgen\helper.exe"
  34. 61:53.33 Install: 1 page (64 bytes), 1 section (2072 bytes), 5082 instructions (
  35. 142296 bytes), 2878 strings (22112 bytes), 1 language table (226 bytes).
  36. 61:53.33 Uninstall: 4 pages (320 bytes), 1 section (2072 bytes), 2564 instructio
  37. ns (71792 bytes), 2263 strings (18626 bytes), 1 language table (306 bytes).
  38. 61:53.33
  39. 61:53.33 Using zlib compression.
  40. 61:53.33
  41. 61:53.33 EXE header size:               62976 / 38400 bytes
  42. 61:53.33 Install code:                 167214 / 167210 bytes
  43. 61:53.33 Install data:                 184588 / 184596 bytes
  44. 61:53.33 Uninstall code+data:          465303 / 465295 bytes
  45. 61:53.33 CRC (0x838262B7):                  4 / 4 bytes
  46. 61:53.33
  47. 61:53.33 Total size:                   880085 / 855505 bytes (102.8%)
  48. 61:54.55 Processing config: c:\mozilla-build\nsis-3.0b3\nsisconf.nsh
  49. 61:54.55 Processing script file: "maintenanceservice_installer.nsi" (ACP)
  50. 61:54.88
  51. 61:54.88 Processed 1 file, writing output (x86-unicode):
  52. 61:54.88
  53. 61:54.88 Output: "d:\zhaomokeji_zm\gecko-dev\obj-i686-pc-mingw32\browser\install
  54. er\windows\instgen\maintenanceservice_installer.exe"
  55. 61:54.88 Install: 1 page (64 bytes), 1 section (2072 bytes), 549 instructions (1
  56. 5372 bytes), 718 strings (4448 bytes), 1 language table (210 bytes).
  57. 61:54.88 Uninstall: 2 pages (192 bytes), 1 section (2072 bytes), 176 instruction
  58. s (4928 bytes), 735 strings (6088 bytes), 1 language table (250 bytes).
  59. 61:54.88
  60. 61:54.88 Using zlib compression.
  61. 61:54.88
  62. 61:54.88 EXE header size:               63488 / 38400 bytes
  63. 61:54.88 Install code:                  22610 / 22606 bytes
  64. 61:54.88 Install data:                  11780 / 11788 bytes
  65. 61:54.88 Uninstall code+data:           50982 / 50974 bytes
  66. 61:54.88 CRC (0x8D3786DE):                  4 / 4 bytes
  67. 61:54.88
  68. 61:54.88 Total size:                   148864 / 123772 bytes (120.2%)
  69. 62:28.16 Packaging specialpowers@mozilla.org.xpi...
  70. 62:28.57 Packaging quitter@mozilla.org.xpi...
  71. 62:29.22 240 compiler warnings present.
  72. 62:38.03 We know it took a while, but your build finally finished successfully!
  73. To view resource usage of the build, run |mach resource-usage|.
  74. To take your build for a test drive, run: |mach run|
  75. For more information on what to do now, see https://developer.mozilla.org/docs/D
  76. eveloper_Guide/So_You_Just_Built_Firefox

  77. bolt@bolt-PC /d/zhaomokeji_zm/gecko-dev
  78. $ mach resource-usage
  79. Cannot get browser specified, trying the default instead.
  80. Hit CTRL+c to stop server.
  81. 127.0.0.1 - - [09/Feb/2017 19:30:25] "GET / HTTP/1.1" 200 -
  82. 127.0.0.1 - - [09/Feb/2017 19:30:28] "GET /list HTTP/1.1" 200 -
  83. 127.0.0.1 - - [09/Feb/2017 19:30:28] "GET /resources/last HTTP/1.1" 200 -
  84. 127.0.0.1 - - [09/Feb/2017 19:30:28] code 404, message Not Found
  85. 127.0.0.1 - - [09/Feb/2017 19:30:28] "GET /favicon.ico HTTP/1.1" 404 -

  86. bolt@bolt-PC /d/zhaomokeji_zm/gecko-dev
  87. $ mach run
  88. 0:01.35 d:\zhaomokeji_zm\gecko-dev\obj-i686-pc-mingw32\dist\bin\firefox.exe -no
  89. -remote -profile d:\zhaomokeji_zm\gecko-dev\obj-i686-pc-mingw32\tmp\scratch_user
复制代码
回复 支持 反对

使用道具 举报

165

主题

269

帖子

957

积分

认证用户组

Rank: 5Rank: 5

积分
957
7#
发表于 2017-4-14 19:39:13 | 只看该作者
本帖最后由 firemail 于 2017-6-9 09:25 编辑

问题:
configure: error: This version (18.00.21005) of the MSVC compiler is unsupported.
You must install Visual C++ 2013 Update 3 or newer in order to build.
See https://developer.mozilla.org/en/Windows_Build_Prerequisites.


解决:https://support.microsoft.com/en ... tudio-2013-update-3



Note This table includes both released and prerelease Visual Studio 2013 updates.
KB article number
Release Date
Description
July 20, 2015Visual Studio 2013 Update 5 is available
November 12, 2014Visual Studio 2013 Update 4 is available
August 4, 2014Visual Studio 2013 Update 3 is available
May 12, 2014Visual Studio 2013 Update 2 is available
January 20, 2014Visual Studio 2013 Update 1 is available


Visual Studio 2013 Update 5  下载 链接:http://pan.baidu.com/s/1jIGBD3K 密码:ow1c


回复 支持 反对

使用道具 举报

165

主题

269

帖子

957

积分

认证用户组

Rank: 5Rank: 5

积分
957
8#
发表于 2017-4-19 08:46:13 | 只看该作者
本帖最后由 firemail 于 2017-4-19 11:58 编辑

问题 :
RuntimeError: File "necko.properties" not found in e:/zhaomokeje/gecko-dev/l10n/zh-CN\netwerk
解决:https://hg.mozilla.org/releases/l10n/mozilla-release/zh-CN/tags

hg源码树浏览:
https://hg.mozilla.org/
源码下载  http://releases.mozilla.org/pub/mozilla.org/    http://releases.mozilla.org/pub/
FTP:ftp://ftp.mozilla.org/pub/thunderbird/releases/
HTTP:http://releases.mozilla.org/pub/mozilla.org/firefox/releases/
CSV:

回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-20 12:26 , Processed in 0.068251 second(s), 21 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

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