How to build the chromium on ubuntu12.04

谭越
2023-12-01
不记得先前是否介绍过,不过刚好在邮箱中看到以前的笔记,贴出来供大家参考。
 
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. 运行测试...
 类似资料:

相关阅读

相关文章

相关问答