我必须为Android构建最新版本的chrome浏览器.我正在使用以下步骤,
创建一个Chromium根目录mkdir chromium; cd铬
下载并导出depot_tools的PATH
export PATH=$PATH:~/path/to/depot_tools/
检查了构建32.0.1665.2的源代码
gclient config https://src.chromium.org/chrome/releases/32.0.1665.2
4上面的命令在chrome根目录下创建一个.gclient文件,并在.gclient中添加目标android.
target_os = ['android']
要下载初始代码:
gclient sync
安装依赖项
6.1) cd /path/to/chromium/src 6.2) ./build/install-build-deps.sh
gclient runhooks调用GYP来生成特定于平台的文件.这应该给你一个完整的源代码树gclient runhooks
编译:
要构建ARM Android内容shell:
1)cd/path/to/chromium/src
2).建立/安卓/ envsetup.sh
3)android_gyp
4)ninja -C out/Release -j10 content_shell_apk
按照上面的命令后,我得到的是版本为chrome/19.77.34.5的content_shell.apk,我正在使用链接http://whatsmyuseragent.com查看chrome的版本,请帮我构建chrome 最新版本(32.0. 1665.2)在android上
Content shell does not display correct user agent version in android as well as linux (right now content_shell displays chrome/19.77.34.5).
This seems to be deliberate from src/content/content_shell.gypi
'variables': { 'content_shell_product_name': 'Content Shell', # The "19" is so that sites that sniff for version think that this is # something reasonably current; the "77.34.5" is a hint that this isn't a # standard Chrome. 'content_shell_version': '**19.77.34.5**',
You can always use chromium_testshell which will give correct version (which is currently Chrome/35.0.1879.0).