chromium tarball编译步骤

本文详细介绍了如何编译Chromium的tarball源代码,包括下载tarball、解压缩、设置depot_tools环境变量、配置gclient、运行hooks、安装依赖库以及使用ninja进行编译的步骤。

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

下载tarball

在Chromium官网的Get the Code页面可以找到tarball下载链接
http://chromium-browser-source.commondatastorage.googleapis.com/chromium_tarball.html

解压缩

使用

tar -xzvf chromium.r####.tgz

解压到当前目录

使用git下载depot_tools

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

添加depot_tools到环境变量

修改~/.bashrc

export PATH=$PATH:{your depot_tools location}

配置gclient

在chromium目录下执行

gclient config http://src.chromium.org/svn/trunk/src

runhooks

在chromium目录下执行

#配置ninja
export GYP_GENERATORS=ninja
gclient runhooks

安装所有依赖的库

sudo ./src/build/install-build-deps.sh

需要安装的库特别多,可能需要比较长的时间。

使用ninja编译

编译需要在src目录下

#Debug版
ninja -C out/Debug chrome
#Release版
ninja -C out/Release chrome
#编译sandbox
ninja -C out/Debug sand_box
 
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值