关键词:
编译windows下chromium,时间:20170619,
官方地址:https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md
一. 系统要求:
1. 64位机器,至少8GB的内存,推荐16GB以上。(我用的Win10 64位虚拟机,内存按照8G来的);
2. 至少100GB的硬盘存储空间,格式为NTFS。FAT32不支持大于4GB的文件,而在git下载时的文件可能会有20GB+;
3. Visual studio 2015 update 3;
4. 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,然后解压,地址:https://storage.googleapis.com/chrome-infra/depot_tools.zip;
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是开启的,此时在下载完源码后会出现:
- Traceback (most recent call last):
- File "D:gitgoogledepot_toolsgclient_scm.py", line 965, in _Clone
- os.path.join(self.checkout_path, ‘.git‘))
- File "D:gitgoogledepot_toolsgclient_utils.py", line 158, in safe_rename
- os.rename(old, new)
- WindowsError: [Error 5]
- [0:22:25] _____ removing non-empty tmp dir D:google\_gclient_src_byzfvs
- ----------------------------------------
- Traceback (most recent call last):
- File "D:gitgoogledepot_toolsgclient.py", line 2378, in <module>
- sys.exit(main(sys.argv[1:]))
- File "D:gitgoogledepot_toolsgclient.py", line 2364, in main
- return dispatcher.execute(OptionParser(), argv)
- File "D:gitgoogledepot_toolssubcommand.py", line 252, in execute
- return command(parser, args[1:])
- File "D:gitgoogledepot_toolsgclient.py", line 2117, in CMDsync
- ret = client.RunOnDeps(‘update‘, args)
- File "D:gitgoogledepot_toolsgclient.py", line 1568, in RunOnDeps
- work_queue.flush(revision_overrides, command, args, options=self._options)
- File "D:gitgoogledepot_toolsgclient_utils.py", line 1112, in run
- self.item.run(*self.args, **self.kwargs)
- File "D:gitgoogledepot_toolsgclient.py", line 867, in run
- file_list)
- File "D:gitgoogledepot_toolsgclient_scm.py", line 166, in RunCommand
- return getattr(self, command)(options, args, file_list)
- File "D:gitgoogledepot_toolsgclient_scm.py", line 450, in update
- self._Clone(revision, url, options)
- File "D:gitgoogledepot_toolsgclient_scm.py", line 965, in _Clone
- os.path.join(self.checkout_path, ‘.git‘))
- File "D:gitgoogledepot_toolsgclient_utils.py", line 158, in safe_rename
- os.rename(old, new)
- WindowsError: [Error 5]
- Traceback (most recent call last):
- File "D:gitgoogledepot_tools\fetch.py", line 353, in <module>
- sys.exit(main())
- File "D:gitgoogledepot_tools\fetch.py", line 348, in main
- return run(options, spec, root)
- File "D:gitgoogledepot_tools\fetch.py", line 342, in run
- return checkout.init()
- File "D:gitgoogledepot_tools\fetch.py", line 142, in init
- self.run_gclient(*sync_cmd)
- File "D:gitgoogledepot_tools\fetch.py", line 76, in run_gclient
- return self.run(cmd_prefix + cmd, **kwargs)
- File "D:gitgoogledepot_tools\fetch.py", line 66, in run
- return subprocess.check_output(cmd, **kwargs)
- File "D:gitgoogledepot_toolspython276_binlibsubprocess.py", line 573, in check_output
- raise CalledProcessError(retcode, cmd, output=output)
- 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就好了,其他杀软或许有类似的情况,请注意,参考https://bugs.chromium.org/p/chromium/issues/detail?id=464132)
3. 源码下载成功后,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,顺利解决,参考https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/tQGuR7Ur0i8;
3. 编译好了,运行Default下的chrome.exe吧。
libevent学习之二:windows7(win7)下编译libevent
Linux下编译参考源码中的README文件即可,这里主要记录Windows下的编译。一.准备工作去官网下载最新的稳定发布版本libevent-2.0.22-stable官网地址:http://libevent.org/二.使用VS2012编译1.解压libevent到C:UserszhangDesktoplibevent-2.0.22-stable2.打开&l... 查看详情
在windows下编译lua
http://blog.csdn.net/yue7603835/article/details/41739085http://blog.csdn.net/birdflyto206/article/details/49403801 BuildingLuaonothersystemsIfyou‘renotusingtheusualUnixtools,thentheinstructionsfo 查看详情
windows下编译及使用libevent
Libevent官网:http://libevent.org/windows7下编译:编译环境: windows7+VS2010(1)解压libevent到F:libeventlibevent-2.0.21-stable(2)打开Microsoftvisualstudio2010命令行工具(3)修改以下三个文件,添加宏定义:在以下3个文件开头添加“#define_... 查看详情
[转]windows下编译及使用libevent
http://www.cnblogs.com/luxiaoxun/p/3603399.html Libevent官网:http://libevent.org/windows7下编译:编译环境: windows7+VS2010(1)解压libevent到F:libeventlibevent-2.0.21-stable(2)打开Microsoftvisualstud 查看详情
windows下编译libevent
1从github上gitclonehttps://github.com/nmathewson/Libevent.git或者直接下载zip包.然后找到vs2015命令行,打开2:3:等待结果 4使用demo测试包含目录 库目录附加依赖项: 查看详情
如何在windows上编译chromium(cef3)并加入mp3支持
...f版本号格式为X.YYYY.A.gHHHHHHHX为主版本号,当前只有3YYYY为chromium分支号A为递增的svn提交版本号HHHHHHH为7位git提交hash 此次编译cef版本为3.2704. 查看详情
Windows下编译Mongoose的hello.c
】Windows下编译Mongoose的hello.c【英文标题】:CompilingMongoose\'shello.cunderWindows【发布时间】:2013-03-2011:48:43【问题描述】:我正在尝试在Windows下从Mongoose编译包含的hello.c示例。我正在使用MicrosoftVisual命令提示符,并且已将mongoose.c和... 查看详情
windows下编译iconv
从http://www.gnu.org/software/libiconv/ 下载 libiconv-1.11.1,这是最后一个支持MSVC编译的版本。编译64位Lib命令行cmd执行amd64位脚本,D:ProgramFiles(x86)MicrosoftVisualStudio8VCinamd64vcvarsamd64.bat转移到libiconv-1.11. 查看详情
linux下编译cef源码及交叉编译(代码片段)
Linux下编译CEFchromium源码及交叉编译官方编译文档:https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart#markdown-header-linux-setup编译参数推荐:https://bitbucket.org/chromiumembedded/cef/wiki/AutomatedBuildSetup.md#markdown-header-linux-configuratio... 查看详情
windows下编译jcef(代码片段)
...文参考官方网站上的jcef编译过程编译成功的环境如下:windows1064bitJDK1.8.0_12164bitPython2.7.13gitversion2.12.1.windows.1cmakeversion3.12.0-rc1VisualStudio2015EnterpriseEdition以上的软件也是官网上要求安装的软件,不过版本稍有不同,官网上的版本要... 查看详情
linux与windows下编译工具
Linuxgccg++make使用makefile调用gccg++cmake使用CMakeLists文件生成makefile文件qmake使用Qt中pro文件生成makefile,调用makeBoost使用BJam可设置不同的编译器Windowsres.execl.exelink.exenmake与多线程版的jom使用makefilevs项目(vcxproj,sln 查看详情
linux与windows下编译工具
Linuxgccg++make使用makefile调用gccg++cmake使用CMakeLists文件生成makefile文件qmake使用Qt中pro文件生成makefile,调用makeBoost使用BJam可设置不同的编译器Windowsres.execl.exelink.exenmake与多线程版的jom使用makefilevs项目(vcxproj,sln 查看详情
在windows环境idea下编译运行elasticsearch7.14.1(代码片段)
文章目录在Windows环境中IDEA下编译运行Elasticsearch7.14.1环境准备操作步骤获取源码方式一:直接通过`gitbash`执行`gitclone`命令方式二:通过IDEA界面化操作编译源码本地运行遇到的问题1.权限问题2.版本问题3.geoip报... 查看详情
windows(msvc)下编译boost库
下载&解压从http://www.boost.org/上下载源码并解压打开vs的本机工具命令提示符cdboost_sourcecode_dirbootstrap如果需要编译boost.python需要在boost_sourcecode_dir oolsuildexampleuser-config.jam中添加如下内容:usingmsvc:14.0;usingpython:2.7: 查看详情
qt在windows下编译遇到的一些问题
软件是在linux上写的,然而搬到windows上来遇到了好多问题。。。。想跪。。。。 首先就是压根编译不了的问题。。。。这个问题困扰我好久了。。。。一直报错undefinedreferencetoRInside和deplicatesection....如贴:http://www.qter.org/forum... 查看详情
在 Windows (XP) 下编译 C/C++ makefile 文件
】在Windows(XP)下编译C/C++makefile文件【英文标题】:CompilngC/C++makefilefilesunderWindows(XP)【发布时间】:2009-07-1023:06:19【问题描述】:我正在尝试使用具有一些非Python必备库的Python库(pyMedia)。(libogg、libvorbis、liblame和libfaad2-这与具体... 查看详情
windows下编译skia(代码片段)
转载请说明原出处,谢谢~~:https://redrain.blog.csdn.net/article/details/111685123 目录准备环境1.配置代理2.下载depot_tools3.下载skia4.假如没有梯子开始编译1.args的参数说明2.生成项目文件3.删除多余的命令用LLVM编译Skia剪裁手动去掉... 查看详情
windows下编译skia(代码片段)
转载请说明原出处,谢谢~~:https://redrain.blog.csdn.net/article/details/111685123 目录准备环境1.配置代理2.下载depot_tools3.下载skia4.假如没有梯子开始编译1.args的参数说明2.生成项目文件3.删除多余的命令用LLVM编译Skia剪裁手动去掉... 查看详情