编译Chrome详细步骤

 

文章来源:http://blog.csdn.net/allendale/article/details/9262833

参考:http://dev.chromium.org/developers/how-tos/build-instructions-windows

1      Chrome的代码量巨大,下载编译的过程一出错,可能就需要回头从来。工欲善其事,必先利其器,推荐电脑内存至少8G,否则会难以忍受的慢,当然是64位系统,您还需要设置显示文件后缀名。如图,将勾选去掉

2   然后安装Visual Studio 2010 Uitimate,安装路径默认。安装最全的,以后省心,然后顺序安装:

    以上都用默认安装路径
 
3  找到asyncinfo.h这个文件,用记事本打开,做如下修改:
Index: asyncinfo.h
===================================================================
--- asyncinfo.h
+++ asyncinfo.h
@@ -63,7 +63,7 @@
 #pragma once
 #ifdef __cplusplus
 namespace ABI { namespace Windows { namespace Foundation {
-enum class AsyncStatus {
+enum /*class*/ AsyncStatus {//修改
   Started = 0,
   Completed, 
   Canceled, 
意思是 把 class 注释掉,然后保存。
 
4  找到一个剩余空间大于50G的磁盘,例如D盘建立一个目录比方说 D:\ChromiumTrunk,
    然后从官网(http://dev.chromium.org/developers/how-tos/install-depot-tools)下载 depot_tools,将depot_tools解压到这个目录下,
    设置环境变量,为Path增加  D:\ChromiumTrunk\depot_tools;
    然后从运行启动控制台,输入gclient --help,这时候要保证联网,等待下载完python、 svn,经过一段时间最后出现
 

Usage: gclient.py <command> [options]

Commands are:

cleanup    Cleans up all working copies.

config     Create a .gclient file in the current directory.

diff       Displays local diff for every dependencies.

fetch      Fetches upstream commits for all modules.

help       Prints list of commands or help for a specific command.

hookinfo   Output the hooks that would be run by `gclientrunhooks`

pack       Generate a patch which can be applied at the root of the tree.

recurse    Operates on all the entries.

revertRevert all modifications in every dependencies.

revinfo    Output revision info mapping for the client and its dependencies.

runhooks   Runs hooks for files that have been modified in the local working copy.

status     Show modification status for every dependencies.

sync       Checkout/update all modules.

update     Alias for the sync command. Deprecated.

Prints list of commands or help for a specific command.

Options:

--version             show program's version number and exit

-h, --help            show this help message and exit

-j JOBS, --jobs=JOBS  Specify how many SCM commands can run in parallel;

default=8

-v, --verbose         Produces additional output for diagnostics. Can be

used up to three times for more logging info.

--gclientfile=CONFIG_FILENAME

Specify an alternate .gclient file

--spec=SPEC           create a gclient file containing the provided string.

Due to Cygwin/Python brokenness, it probably can't

contain any newlines.

代表depot_tools配置成功。
 
5下载chrome源码
    从命令行切换到工程目录(D:\ChromiumTrunk),
    输入:gclient config https://src.chromium.org/chrome/trunk/src
    这时候会生成一个文件.gclient,用记事本打开它,
 
solutions = [
  { "name"        : "src",
    "url"         : "https://src.chromium.org/chrome/trunk/src",
    "deps_file"   : "DEPS",
    "managed"     : True,
    "custom_deps" : {
      "src/webkit/data/layout_tests/LayoutTests":None,
      "src/third_party/WebKit/LayoutTests": None,
      "src/chrome_frame/tools/test/reference_build/chrome_win": None,
      "src/chrome/test/data/perf/canvas_bench": None,
      "src/chrome/test/data/perf/frame_rate/content": None,
      "src/chrome/tools/test/reference_build/chrome_mac": None,
      "src/chrome/tools/test/reference_build/chrome_win": None,
      "src/chrome/tools/test/reference_build/chrome_linux": None,
      'src/chrome/test/data/layout_tests/LayoutTests/fast/workers': None,
      'src/chrome/test/data/layout_tests/LayoutTests/platform/chromium/fast/workers': None,
      'src/chrome/test/data/layout_tests/LayoutTests/fast/js/resources': None,
      'src/chrome/test/data/layout_tests/LayoutTests/platform/chromium-mac/http/tests/workers': None,
      'src/chrome/test/data/layout_tests/LayoutTests/http/tests/resources': None,
      'src/chrome/test/data/layout_tests/LayoutTests/storage/domstorage': None,
      'src/chrome/test/data/layout_tests/LayoutTests/fast/events': None,
      'src/chrome/test/data/layout_tests/LayoutTests/http/tests/workers': None,
      'src/chrome/test/data/layout_tests/LayoutTests/http/tests/xmlhttprequest': None,
      'src/chrome/test/data/layout_tests/LayoutTests/platform/chromium-win/storage/domstorage': None,
      'src/chrome/test/data/layout_tests/LayoutTests/http/tests/appcache': None,
      'src/chrome/test/data/layout_tests/LayoutTests/platform/chromium-win/fast/events': None,
      'src/chrome/test/data/layout_tests/LayoutTests/platform/chromium-mac/fast/events': None,
      'src/chrome/test/data/layout_tests/LayoutTests/platform/chromium-mac/storage/domstorage': None,
      'src/chrome/test/data/layout_tests/LayoutTests/websocket/tests/workers': None,
      'src/chrome/test/data/layout_tests/LayoutTests/platform/chromium-win/fast/workers': None,
      'src/chrome/test/data/layout_tests/LayoutTests/platform/chromium-win/http/tests/workers': None,
      'o3d/samples': None,
    },
    "safesync_url": "",
  },
]
cache_dir = None
 
 
蓝色区域为需要增加的内容。
 
   弄好了这些,才能下载代码,在命令行输入 gclient sync。然后下载代码。经过很长时间后,代码下载完。
 
6 切到一个指定版本
 
      在工程目录下运行:gclient config https://src.chromium.org/chrome/releases/27.0.1453.116,意思是切到一个指定的release版本。之后,继续修改.gclient文件,仍然增加蓝色的内容。因为这时候.gclient文件被重写。
      然后再次运行 gclient sync,这时候会继续下载一些文件,等待文件下载完毕。
 
7   生成工程文件,编译
 
     运行 gclient runhooks --force,解析生成sln文件,然后打开编译。
 
 
 
 
chrome涉及的开源项目 
Chrome 采用了很多开源项目,这里把它们列出来以备后用,目前Chrome涉及25个开源代码: 
1、Google Breakpad 
/src/breakpad 
开源的跨开台程序崩溃报告系统。 
2、Google URL 
/src/googleurl 
Google小巧的URL解析整理库。 
3、Skia 
/src/skia 
矢量图引擎。 
4、Google v8 
/src/v8 
Google开源的javascript引擎。V8实现了ECMA-262第三版的ECMAscript规范,可运行于Windows XP 和 Vista Mac OS X 10.5 (Leopard) 及 Linux等基于IA-32 或 ARM 的系统之上。V8可单独运行也可嵌入到任何C++程序中。 
5、Webkit 
/src/webki 
开源的浏览器引擎 
6、Netscape Portable Runtime (NSPR) 
/src/base/third_party/nspr 
Netscape Portable Runtime (NSPR) 提供了系统级平台无关的API及类似libc的函数。 
7、Network Security Services (NSS) 
/src/base/third_party/nss 
Network Security Services (NSS) 一套用于支持服务器端与客户端安全开发的跨平台函数库。程序通过NSS可支持SSL v2 and v3 TLS PKCS #5 PKCS #7 PKCS #11 PKCS #12 S/MIME X.509 v3 认证及其它一些安全标准。 
8、Hunspell 
/src/chrome/third_party/hunspell 
Spell checker and morphological analyzer library and program designed for languages with rich morphology and complex word compounding or character encoding. 
9、Windows Template Library 
/src/chrome/third_party/wtl 
用于开发Windows程序与UI组件的C++ library。WTL扩展了ATL (Active Template Library) 并提供一套用于controls dialogs frame windows GDI objects等开发的类。 
10、Google C++ Testing framework 
/src/testing/gtest 
Google用于编写C++测试的基于xUnit架构的框架,可用于多种平台上:Linux Mac OS X Windows Windows CE and Symbian。支持自动测试发现,有一套丰富的Assertions断言,用于可自定义断言,death tests fatal and non-fatal failures various options for running the tests and XML test report generation. 
11、bsdiff 与 bspatch 
/src/third_party/bsdiff 及 /src/third_party/bspatch 
bsdiff 与 bspatch 用于为二进制文件生成补丁。 
12、bzip2 
/src/third_party/bzip2 
bzip2使用Burrows-Wheeler block sorting text compression 算法与Huffman编码压缩文件。 
13、International Components for Unicode (ICU) 
/src/third_party/icu38 
ICU是一套成熟并被广泛使用的C/C++ 及 Java 库,可为软件提供Unicode与全球化支持。 
14、libjpeg 
/src/third_party/libjpeg 
用于处理JPEG (JFIF)图像格式的库。 
15、libpng 
/src/third_party/libpng 
PNG图像格式库。支持绝大部分的PNG特性,可扩展。已经被广泛地使用了13年以上了。 
16、libxml 
/src/third_party/libxml 
C语言的XML解析库。 
17、libxslt 
/src/third_party/libxslt 
C语言的XSLT库。 
18、LZMA 
/src/third_party/lzma_sdk 
LZMA为7-Zip软件中7z格式压缩所使用的压缩算法,有很好的压缩效果。 
19、stringencoders 
/src/third_party/modp_b64 
一系列高性能的c-string转换函数,比如:base 64 encoding/decoding。通常比其标准实现快两倍以上。 
20、Netscape Plugin Application Programming Interface (NPAPI) 
/src/third_party/npapi 
多种浏览器使用的跨平台插件架构。 
21、Pthreads-w32 
/src/third_party/pthread 
用于编写多线程程序的API 
22、SCons - a software construction tool 
/src/third_party/scons 
开源的软件构建工具——下一代的编译工具。可以认为SCons是改进过的跨平台配上autoconf/automake与ccache的Make工具的子系统。 
23、sqlite 
/src/third_party/sqlite 
大名鼎鼎的嵌入式数据库引擎。自管理、零配置、无需服务器、支持事务。 
24、TLS Lite 
/src/third_party/tlslite 
SSL 3.0 TLS 1.0 and TLS 1.1的 Python免费实现库。TLS Lite支持这些安全验证方式:SRP shared keys and cryptoIDs in addition to X.509 certificates。注:Chrome并不包涵 Python。TLS Lite用于Chrome开发过程中的代码覆盖、依赖检查、网页加载时间测试及生成html结果比较等。 
25、zlib 
/src/third_party/zlib 
zlib为一套用于任意平台与机器的无损数据压缩的库,它免费、自由、无任何法律专利问题。

编译Chrome详细步骤的更多相关文章

  1. 下载编译Chrome详细步骤

    文章来源:http://blog.csdn.net/allendale/article/details/9262833 参考:http://dev.chromium.org/developers/ho ...

  2. mysql 5.6.25编译安装详细步骤

    简略步骤: mysql5.6.25编译安装步骤: 下载mysql准备用户和组yum安装依赖解压mysqlcmake编译mysqlmake && make install ----时间约 ...

  3. 01.LNMP架构-Nginx源码包编译部署详细步骤

    操作系统:CentOS_Server_7.5_x64_1804.iso 部署组件:Pcre+Zlib+Openssl+Nginx 操作步骤: 一.创建目录 [root@localhost ~]# mk ...

  4. 在WSL Ubuntu 下编译UPX详细步骤

    准备环境: 1. sudo apt-get update 2. sudo apt-get clang 3. apt-get install libstdc++-dev Reading package ...

  5. 编译Boost 详细步骤

    vs2008编译boost [一.Boost库的介绍] Boost库是一个经过千锤百炼.可移植.提供源代码的C++库,作为标准库的后备,是C++标准化进程的发动机之一. Boost库由C++标准委员会 ...

  6. 编译Boost 详细步骤 适用 VC6 VS2003 VS2005 VS2008 VS2010

    vs2008编译boost [一.Boost库的介绍] Boost库是一个经过千锤百炼.可移植.提供源代码的C++库,作为标准库的后备,是C++标准化进程的发动机之一.Boost库由C++标准委员会库 ...

  7. 03.LNMP架构-PHP源码包编译部署详细步骤

    一.环境准备 操作系统:CentOS_Server_7.5_x64_1804.iso 部署组件:yasm+libmcrypt+libvpx+tiff+libpng+freetype+jpeg+libg ...

  8. 02.LNMP架构-MySQL源码包编译部署详细步骤

    操作系统:CentOS_Server_7.5_x64_1804.iso 部署组件:Cmake+Boost+MySQL 操作步骤: 一.安装依赖组件 [root@localhost ~]# yum -y ...

  9. CentOS6-Linux内核编译 详细步骤

    CentOS6-Linux内核编译 详细步骤 背景 Win10用VMwareWorkstation搭的虚拟机 CentOS6.5,内核版本2.6.32-431.el6.x86_64 在该环境下升级至4 ...

随机推荐

  1. 解析Nuxt.js Vue服务端渲染摸索

    本篇文章主要介绍了详解Nuxt.js Vue服务端渲染摸索,写的十分的全面细致,具有一定的参考价值,对此有需要的朋友可以参考学习下.如有不足之处,欢迎批评指正. Nuxt.js 十分简单易用.一个简单 ...

  2. php程序Apache,IIS 7,nginx 伪静态配置方法总汇

    一,Apache 环境伪静态配置方法: 在根目录下放置一个.htaccess 文件,内容如下: <IfModule mod_rewrite.c> Options +FollowSymlin ...

  3. springboot中model,modelandview,modelmap的区别与联系

    springboot 中Model,ModelAndView,ModelMap的区别与联系 Model是一个接口,它的实现类为ExtendedModelMap,继承ModelMap类 public c ...

  4. 定义一个Book类,有书名,价格,作者等信息。定义相应的方法来改变这些属性的值。定义一个方法来显示Book的所有信息。

    package com.fs.test; public class Test { public static void main(String[] args) { // 先声明后赋值 book b;/ ...

  5. HTML-简单动画

    简单动画 (1)简单动画通常称之为“过渡transition” Transition-property:需要过渡的属性,但是并非所有的属性都支持过渡. Transition-duration:过渡的时 ...

  6. 更新 | 2019年9月计算机二级office模拟题库

    随着2019年上半年计算机二级考试的完美落幕,紧接着的便是9月份的考试了. 到目前为止,下半年9月份计算机二级考试报名开通时间在6月前后,现在也基本结束. 2019年9月(56次)全国计算机等级考试( ...

  7. oracle高水位降低法

    1.什么是高水位?(high water mark 简称:HWM)     所有的oracle段(segments,在此,为了理解方便,建议把segment作为表的一个同义词)都有一个在段内存放数据的 ...

  8. Codeforces 987 K预处理BFS 3n,7n+1随机结论题/不动点逆序对 X&Y=0连边DFS求连通块数目

    A /*Huyyt*/ #include<bits/stdc++.h> #define mem(a,b) memset(a,b,sizeof(a)) #define pb push_bac ...

  9. AI换脸教程:DeepFaceLab使用教程(2.训练及合成)

    如果前期工作已经准备完毕(DeepFaceLab下载(https://www.deepfacelabs.com/list-5-1.html),然后安装相应的显卡驱动,DeepFaceLab使用教程(1 ...

  10. 七、设备驱动中的阻塞与非阻塞 IO(一)

    7.1 阻塞与非阻塞 IO 阻塞操作是指在执行设备操作的时候,若不能获取资源,则挂起进程直到满足可操作的条件后再进行操作.被挂起的进程进入睡眠状态,被从调度器的运行队列移走,直到等待的条件被满足. 非 ...