Mac O X 下编译Chromium

本文详细记录了在MacOSX环境下使用Xcode6.4编译Chromium的过程,包括环境配置、代码下载、编译及调试步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

最近尝试着在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.youkuaiyun.com/echoes19761976/article/details/11847015

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值