澳门在线威尼斯官方 > 电脑操作 > 【澳门在线威尼斯官方】笔录windows下编写翻译

原标题:【澳门在线威尼斯官方】笔录windows下编写翻译

浏览次数:127 时间:2019-09-26

编译windows下chromium,时间:20170619,

官方地址:

 

一. 系统要求:

  1. 64位机器,至少8GB的内存,推荐16GB以上。(我用的Win10 64位虚拟机,内存按照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.14393);

  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吧。

 

本文由澳门在线威尼斯官方发布于电脑操作,转载请注明出处:【澳门在线威尼斯官方】笔录windows下编写翻译

关键词:

上一篇:【澳门在线威尼斯官方】mounty11挂载不成功

下一篇:没有了