Mac O X 下编译Chromium

论坛 期权论坛 脚本     
匿名技术用户   2020-12-23 17:14   11   0

最近尝试着在Mac OS X下编译了Chromium,记录如下。

一. 环境配置

1. OS 10.10.4

2. Xcode 6.4,安装Command Line Tools(Xcode menu -> Preferences -> Downloads -> Components -> Command Line Tools)

3. VPN

4. 下载depot_tools。进入准备存放代码的目录

 $ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

 $ export PATH=$PATH:/path/to/depot_tools

二.下载代码

1.获取主干代码

fetch --nohooks chromium

这个过程很慢.

2.切换到稳定版

进入源码目录

git checkout -b chrome_44.0.2403.125_local_branch 44.0.2403.125

3.生成工程文件

export GYP_GENERATORS=ninja,xcode-ninja

export GYP_DEFINES=component=shared_library

gclient runhooks


三.编译

1.ninja -C out/Debug chrome


四.调试

  1. Open the most specific .xcodeproj file that contains the source file in which you want to put a breakpoint.
  2. Find the file in the file list on the left, apply your desired breakpoints.
  3. Launch Chromium.
  4. In Xcode, select Debug > Attach to Process > Chromium.
  5. Switch to Chromium, do whatever triggers the breakpoint.
  6. The Xcode debugger will come to the front. Proceed to debug.
参考
1. http://www.chromium.org
2. http://my.oschina.net/ghost045/blog/391787
3. http://blog.csdn.net/echoes19761976/article/details/11847015

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:7942463
帖子:1588486
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP