官方地址

编译windows下chromium,时间:20170619,

法定地址:

 

意气风发. 种类需要:

  1. 六13人机器,最少8GB的内存,推荐16GB以上。(小编用的Win10
    陆十二人设想机,内部存款和储蓄器依照8G来的);

2.
足足100GB的硬盘存款和储蓄空间,格式为NTFS。FAT32不扶助胜出4GB的文件,而在git下载时的文书或然会有20GB+;

  1. Visual studio 2015 update 3;

  2. Win7+ (小编用的Win10编写翻译,此处只怕有个坑,下文介绍);

二. 系统结构:

  1. 设置Visual studio 2015 update3,并安装window sdk 14393,vs须求安装Visual
    C++的八个筛选包罗MFC,Universal Windows Apps Development Tools >
    Tools (1.4.1卡塔尔国 and Windows 10 SDK (10.0.14393State of Qatar;

  2. 14393的SDK安装时要设置Debugging Tools For
    Windows,小编风流倜傥开始设置的时候,不知为何未有安装那个,修复了下后,才有的;

三. 安装depot_tools:

  1. 下载depot_tools
    bundle,然后解压,地址:

  2. 将depot_tools放到PATH情形变量的启幕地点,最少在您安装的python和git的后面,因为depot_tools里面会下载python,要是在你安装的python前面包车型客车话,恐怕会出有个别不得预期的难题;

  3. 丰裕情况变量DEPOT_TOOLS_WIN_TOOLCHAIN,并设为0;

4.
开发cmd.exe,运营gclient,在第一遍运转的时候,gclient会安装python/msysgit等需求组件;

四. 获取源码:

  1. 开辟cmd,在您想放置源码的地点,创造chromium文件夹并步向,mkdir chromium && cd chromium;

  2. fetch chromium;

ps:这里有个难点,作者用的Win10带的暗中认可的windows
defender是翻开的,那时在下载完源码后会现身:

  1. Traceback (most recent call last):
  2. File “D:gitgoogledepot_toolsgclient_scm.py”, line 965, in
    _Clone
  3. os.path.join(self.checkout_path, ‘.git’))
  4. File “D:gitgoogledepot_toolsgclient_utils.py”, line 158,
    in safe_rename
  5. os.rename(old, new)
  6. WindowsError: [Error 5]
  7. [0:22:25] _____ removing non-empty tmp dir
    D:google_gclient_src_byzfvs

  8. Traceback (most recent call last):
  9. File “D:gitgoogledepot_toolsgclient.py”, line 2378, in
    <module>
  10. sys.exit(main(sys.argv[1:]))
  11. File “D:gitgoogledepot_toolsgclient.py”, line 2364, in main
  12. return dispatcher.execute(OptionParser(), argv)
  13. File “D:gitgoogledepot_toolssubcommand.py”, line 252, in
    execute
  14. return command(parser, args[1:])
  15. File “D:gitgoogledepot_toolsgclient.py”, line 2117, in
    CMDsync
  16. ret = client.RunOnDeps(‘update’, args)
  17. File “D:gitgoogledepot_toolsgclient.py”, line 1568, in
    RunOnDeps
  18. work_queue.flush(revision_overrides, command, args,
    options=self._options)
  19. File “D:gitgoogledepot_toolsgclient_utils.py”, line 1112,
    in run
  20. self.item.run(*self.args, **self.kwargs)
  21. File “D:gitgoogledepot_toolsgclient.py”, line 867, in run
  22. file_list)
  23. File “D:gitgoogledepot_toolsgclient_scm.py”, line 166, in
    RunCommand
  24. return getattr(self, command)(options, args, file_list)
  25. File “D:gitgoogledepot_toolsgclient_scm.py”, line 450, in
    update
  26. self._Clone(revision, url, options)
  27. File “D:gitgoogledepot_toolsgclient_scm.py”, line 965, in
    _Clone
  28. os.path.join(self.checkout_path, ‘.git’))
  29. File “D:gitgoogledepot_toolsgclient_utils.py”, line 158,
    in safe_rename
  30. os.rename(old, new)
  31. WindowsError: [Error 5]
  32. Traceback (most recent call last):
  33. File “D:gitgoogledepot_tools\fetch.py”, line 353, in
    <module>
  34. sys.exit(main())
  35. File “D:gitgoogledepot_tools\fetch.py”, line 348, in main
  36. return run(options, spec, root)
  37. File “D:gitgoogledepot_tools\fetch.py”, line 342, in run
  38. return checkout.init()
  39. File “D:gitgoogledepot_tools\fetch.py”, line 142, in init
  40. self.run_gclient(*sync_cmd)
  41. File “D:gitgoogledepot_tools\fetch.py”, line 76, in
    run_gclient
  42. return self.run(cmd_prefix + cmd, **kwargs)
  43. File “D:gitgoogledepot_tools\fetch.py”, line 66, in run
  44. return subprocess.check_output(cmd, **kwargs)
  45. File
    “D:gitgoogledepot_toolspython276_binlibsubprocess.py”,
    line 573, in check_output
  46. raise CalledProcessError(retcode, cmd, output=output)
  47. subprocess.CalledProcessError: Command
    ‘(‘D:\git\google\depot_tools\python276_bin\python.exe’,
    ‘D:\git\google\depot_tools\gclient.py’, ‘sync’,
    ‘–no-history’)’ returned non-zero exit status 1

如此这般的主题素材,首假设杀软拦截招致删除文件目录退步,禁止使用掉WinDefender就好了,别的杀软或者有左近的情事,请悉心,仿照效法

  1. 源码下载成功后,cd src,步向src目录;

五. 编译(最愿意的时候到了):

  1. 第后生可畏利用暗中同意的编写翻译方式啊,使用gn
    gen
    out/Default,会在src目录下开创out/Default目录,并配备些编写翻译须要的文件;

  2. 使用ninja -C outDefault
    chrome命令行编写翻译chrome,那时候亟需翘首以待长久的年月;

ps:在选用ninja编写翻译的时候,小编那边现身了

ninja: Entering directory `out/Default’
ninja: error:
‘../../native_client/toolchain/mac_x86/pnacl_newlib/bin/x86_64-nacl-objcopy’,
needed by
‘irt_x64/obj/ppapi/native_client/nacl_irt_debuglink.inputdeps.stamp’,
missing and no known rule to make it

这种类似的荒诞,在src目录下接纳cmd实行gclient
sync,顺遂扫除,参照他事他说加以考察

  1. 编译好了,运营Default下的chrome.exe吧。