windows下面编译blink/blink/ chromium 浏览器


reference:

       http://dev.chromium.org/developers/how-tos/get-the-code


系统需求:
      http://dev.chromium.org/developers/how-tos/build-instructions-windows

     1, 64X, 

     2,  win7

     3, Visual Studio 2013




1, 下载 depot_tools

WINDOWS

Download the depot_tools bundle and extract it somewhere.

Warning
DO NOT use drag-n-drop or copy-n-paste extract from Explorer, this will not extract the hidden “.git” folder which is necessary fordepot_tools to autoupdate itself. You can use “Extract all…” from the context menu though.

Add depot_tools to the end of your PATH. Assuming you unzipped the bundle to C:\workspace\depot_tools:

With Administrator access:

Control Panel → System and Security → System → Advanced system settings

Modify the PATH system variable to include C:\workspace\depot_tools.

Without Administrator access:

Control Panel → User Accounts → User Accounts → Change my environment variables

Add a PATH user variable: %PATH%;C:\workspace\depot_tools.

From a cmd.exe shell, run the command gclient (without arguments). On first run, gclient will install all the Windows-specific bits needed to work with the code, including msysgit and python.

Note
  • If you run gclient from a non-cmd shell (e.g., cygwin, PowerShell), it may appear to run properly, but msysgit, python, and other tools may not get installed correctly.

  • If you see strange errors with the file system on the first run of gclient, you may want to disable Windows Indexing.

  • If you are running Windows XP and see errors like “The system cannot execute the specified program”, try installing the “Microsoft Visual C++ 2008 Redistributable Package”.

2, 添加环境变量到系统 环境变量中,

   C:\depot_tools



3, 从命令行 运行gclient

From a cmd.exe shell, run the command gclient (without arguments). On first run, gclient will install all the Windows-specific bits needed to work with the code, including msysgit and python.

Note
  • If you run gclient from a non-cmd shell (e.g., cygwin, PowerShell), it may appear to run properly, but msysgit, python, and other tools may not get installed correctly.

  • If you see strange errors with the file system on the first run of gclient, you may want to disable Windows Indexing.

  • If you are running Windows XP and see errors like “The system cannot execute the specified program”, try installing the “Microsoft Visual C++ 2008 Redistributable Package”.

Installing python 2.7.6...
Fetching from https://src.chromium.org/svn/trunk/tools/third_party/python276_bin
.zip
Installing git 1.9.0.chromium.5 (avg 1-2 min download) ...
Fetching from https://commondatastorage.googleapis.com/chrome-infra/git-1.9.0.ch
romium.5_bin.zip
[-] XMLHTTP 80072ee2: Cannot make HTTP request (操作超时


... Failed to checkout git automatically.
Please visit http://code.google.com/p/msysgit to download the latest git
client before continuing.
You can also get the "prebaked" version used at https://commondatastorage.google
apis.com/chrome-infra/git-1.9.0.chromium.5_bin.zip
Usage: gclient.py <command> [options]


Meta checkout manager supporting both Subversion and GIT.


Commands are:
  cleanup  cleans up all working copies
  config   creates a .gclient file in the current directory
  diff     displays local diff for every dependencies
  fetch    fetches upstream commits for all modules
  grep     greps through git repos managed by gclient
  help     prints list of commands or help for a specific command
  hookinfo outputs the hooks that would be run by `gclient runhooks`
  pack     generates a patch which can be applied at the root of the tree
  recurse  operates [command args ...] on all the dependencies
  revert   reverts all modifications in every dependencies
  revinfo  outputs revision info mapping for the client and its dependencies
  runhooks runs hooks for files that have been modified in the local working cop
y
  status   shows modification status for every dependencies
  sync     checkout/update all modules


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;
                        defaults to 8 on this machine
  -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 can't contain any
                        newlines.
  --no-nag-max          Ignored for backwards compatibility.


4, git 设置一些全局变量

$ git config --global user.name "John Doe"
$ git config --global user.email "jdoe@email.com"
$ git config --global core.autocrlf false
$ git config --global core.filemode false
$ # and for fun!
$ git config --global color.ui true

5, 下载源代码:(下载其中一个就可以了,非常巨大的文件, 15G 的相关src文件)

Pick an empty directory and run one of the following:

$ fetch chromium  # Basic checkout for desktop Chromium
$ fetch blink     # Chromium code with Blink checked out to tip-of-tree
$ fetch android   # Chromium checkout for Android platform
$ fetch ios       # Chromium checkout for iOS platform





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值