惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Troy Hunt's Blog
T
The Exploit Database - CXSecurity.com
Microsoft Security Blog
Microsoft Security Blog
V
Visual Studio Blog
F
Fortinet All Blogs
博客园_首页
P
Proofpoint News Feed
V
Vulnerabilities – Threatpost
The Cloudflare Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
H
Heimdal Security Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
AI
AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
S
Security Affairs
The Register - Security
The Register - Security
S
Security @ Cisco Blogs
Hugging Face - Blog
Hugging Face - Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
Schneier on Security
Schneier on Security
WordPress大学
WordPress大学
Google DeepMind News
Google DeepMind News
GbyAI
GbyAI
T
Tailwind CSS Blog
Hacker News: Ask HN
Hacker News: Ask HN
W
WeLiveSecurity
D
Docker
L
LangChain Blog
B
Blog RSS Feed
The Last Watchdog
The Last Watchdog
Cloudbric
Cloudbric
TaoSecurity Blog
TaoSecurity Blog
N
Netflix TechBlog - Medium
酷 壳 – CoolShell
酷 壳 – CoolShell
I
InfoQ
The Hacker News
The Hacker News
AWS News Blog
AWS News Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
宝玉的分享
宝玉的分享
I
Intezer
云风的 BLOG
云风的 BLOG
V2EX - 技术
V2EX - 技术
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

博客园 - surfer

金山开源安全卫士全套代码编译指南 TabControl添加关闭按钮 string、wstring、cstring、 char、 tchar、int、dword转换方法 string,wstring,CString,TCHAR,char*之间常用转换 QT + VS2008安装配置 用于多媒体应用的无窗口ATL ActiveX控件 临界区,互斥量,信号量,事件的区别(线程同步) GuiToolKit的编译 在VC程序中调用exe文件或者批处理文件方法总结 可在U盘或光盘上运行的LINUX(自带强大软件包和开发工具) 用VC纯资源dll制作多语言界面程序 - surfer - 博客园 没有完美的外汇经纪商和交易平台 外汇交易时段 MB Trading 订单类型 外汇炒单速成法 外汇高手的顺势理论 外汇点值计算 外汇交易商排名 explorer无法随Windows 7启动原因
在VS 2008下成功编译Chrome
surfer · 2011-10-23 · via 博客园 - surfer

源码之前了无秘密 - 侯捷的《STL源码分析》
他这里的源码主要是指阅读源码,基于这个定义,个人将这句话稍作修改:源码 + 调试之前了无秘密。
抱着研究的态度,今天用VC++ 2008编译了Chrome的源码(现在机器上的VC++版本只剩2008了),现将编译流程描述如下:

1.   TortoiseSVN下载最新的Chrome源码,假设下载到了目录“G:/Chrome/src/”下,以后的目录布局都基于这个假设

2.   准备Chrome依赖的源码

a)   无需下载的
   
编译时,Chrome依赖的第三方代码都应该在“G:/Chrome/src/src/third_party”,但是很奇怪,Chrome将六个项目放在了“G:/Chrome/src/deps/third_party”下。网上有同仁也提出了这个问题,他们的解决方法是将这六个项目copy一份到“G:/Chrome/src/src/third_party”,相当管用。但本人本着节约型社会,硬盘虽大,仍需节省利用的原则,使用了微软的官方工具junction通过创建软链接解决了这个问题,所使用命令如下 (注意:命令是在目录G:/Chrome/src/下执行):
   junction src/third_party/icu38 G:/Chrome/src/deps/third_party/icu38
   junction src/third_party/cygwin G:/Chrome/src/deps/third_party/cygwin
   junction src/third_party/cygwin_src G:/Chrome/src/deps/third_party/cygwin_src
   junction src/third_party/python_24 G:/Chrome/src/deps/third_party/python_24
   junction src/third_party/WebKit G:/Chrome/src/deps/third_party/WebKit
   junction src/third_party/svn G:/Chrome/src/deps/third_party/svn
  
   junction
的下载地址是http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx

b)       需要重新下载的
  
还有五个项目需要重新下载,分别是open-vcdiffgtestgoogleurlv8breakpad
    
利用TortoiseSVN下载open-vcdiff的地址是http://src.chromium.org/svn/branches/official/build_154.9/src/sdch
    
下载到本地目录G:/Chrome/branches/build_154.9/src/sdch
    
利用TortoiseSVN下载gtest的地址是http://googletest.googlecode.com/svn/trunk
    
下载到本地目录G:/Chrome/gtest/trunk
    
利用TortoiseSVN下载googleurl的地址是http://google-url.googlecode.com/svn/trunk
    
下载到本地目录G:/Chrome/google-url/src
    
利用TortoiseSVN下载v8的地址是http://v8.googlecode.com/svn/trunk
    
下载到本地目录G:/Chrome/v8/trunk
    
利用TortoiseSVN下载breakpad的地址是http://google-breakpad.googlecode.com/svn/trunk
    
下载到本地目录G:/Chrome/google-breakpad/trunk
   
    
创建软链接所使用命令如下:
      junction src/sdch/open-vcdiff ../branches/build_154.9/src/sdch/open_vcdiff/depot/opensource/open-vcdiff
      junction src/testing/gtest ../gtest/trunk
      junction src/googleurl ../google-url/src
      junction src/v8 ../v8/trunk
      junction src/breakpad/src ../google-breakpad/trunk/src

c)         编译v8项目
     
VS 2008打开和编译G:/Chrome/v8/trunk/tools/visual_studio/v8.sln,打开时会提示你转换项目,直接转换,没有问题,编译后顺利的话应该在目录G:/Chrome/v8/trunk/tools/visual_studio/Debug/lib下生成v8.lib

3.   修改Chrome项目

a)    修改G:/Chrome/src/src/build/debug.vsprops,将 
         <Tool
  Name="VCLinkerTool"
  LinkIncremental="2"
   />
       
修改成

         <Tool
  Name="VCLinkerTool"
  LinkIncremental="2"
  AdditionalDependencies="$(SolutionDir)../v8/tools/visual_studio/Debug/lib/v8.lib"
    />

b)   打开G:/Chrome/src/src/chrome/chrome.sln,将文件G:/Chrome/src/src/testing/gtest/src/gtest-test-part.cc文件添加到项目test/gtest

4.   开始编译吧 :),喝杯开水,看看paper,静候成功

5.   运行G:/Chrome/src/src/chrome/Debug/chrome.exe看看编译的成果吧 :)