How to build the chromium on ubuntu12.04

本文详细介绍如何从源码构建Chrome浏览器的过程,包括安装Ubuntu、配置depot_tools、同步到Chrome发布版本及生成Makefile等步骤。

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

不记得先前是否介绍过,不过刚好在邮箱中看到以前的笔记,贴出来供大家参考。
 
Prepare
Install Ubuntu 12.04 ( Only Ubuntu 10.04 through 12.04 are currently supported)
Install the depot_tools
Fetch depot_tools:
git:
git clone https://git.chromium.org/chromium/tools/depot_tools.git
svn:
svn co http://src.chromium.org/chrome/trunk/tools/depot_tools

Add depot_tools to your PATH:
export PATH="$PATH":`pwd`/depot_tools
You may want to add this to your .profile file or your shell's equivalent so that you don’t need to reset your $PATH manually each time you open a new shell.


wget http://chromium-browser-source.commondatastorage.googleapis.com/chromium.r197479.tgz
tar xzf chromium.r197479.tgz
mv home/chrome-svn/tarball/chromium ./
First Time Build Bootstrap (install dependencies packages)
cd chromium/src
./build/install-build-deps.sh
Sync to a Chrome Release Version
cd /path/to/your/chromium
注意当前应该是在chromium目录下, 此目录下应该有.gclient文件
cp .gclient gclient_backup

这里可以省略:
gclient config http://src.chromium.org/chrome/releases/32.0.1664.0

修改当前的 .gclient文件, 将下面内容添加到 .gclient的 custom_deps 节点内
      "src/third_party/WebKit/LayoutTests": None,
     "src/chrome_frame/tools/test/reference_build/chrome": 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,
sync...
gclient sync

Generate Makefile
cd srcX
./build/gyp_chromium -Ddisable_nacl=1
Disable nacl 是因为下载nacl sdk时经常遇到错误。

Build then...
make BUILDTYPE=Release chrome -j4
如果build成功, 可以找到out/Release/chrome. 运行测试...
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值