2:环境
安装vs2010 sp1补丁,下载地址
https://www.microsoft.com/en-us/download/details.aspx?id=23691
安装widows 8 sdk,(此时可能需要安装.net framework 4.5)下载地址
http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx
安装DirectX sdk,下载地址
http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=6812
安装补丁
KB articles: KB957912, KB958842, KB960075, KB967631, KB971092, and KB2519277.
然后我们需要让vs知道DirectX sdk的头文件及lib库的路径,这个在安装后不用设置。
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ExecutablePath>$(ExecutablePath)</ExecutablePath>
<IncludePath>$(DXSDK_DIR)\include;$(IncludePath)</IncludePath>
<ReferencePath>$(ReferencePath)</ReferencePath>
<LibraryPath>$(DXSDK_DIR)\lib\x86;$(LibraryPath)</LibraryPath>
<SourcePath>$(SourcePath)</SourcePath>
<ExcludePath>$(ExcludePath)</ExcludePath>
</PropertyGroup>
</Project>
下载代码
下载 depot_tools并解压到你想要的目录。然后将这个目录加到系统环境变量PATH
https://src.chromium.org/svn/trunk/tools/depot_tools.zip
下载源码的tar包
http://chromium-browser-source.commondatastorage.googleapis.com/chromium_tarball.html
并解压,可以用7zip。此时可以安装好python,subversion。
运行cmd,进入源码的chromium\src目录,执行gclient runhooks --force 生成源码。更新完成后就能看到chromium\src\chrome\chrome.sln了
3:编译
打开第一步里面的chrome.sln,找到chrome项目并把它设为启动项目,选择build chrome。然后开始编译吧。等待相当长一段时间。得到src\build\Debug\chrome.exe。