简体   繁体   English

如何获取特定版本的 Chromium 源代码?

[英]How to obtain a particular version of Chromium source code?

I need to get the source code of Chromium 88 .我需要获取Chromium 88的源代码。 However, officially proposed $ fetch chromium in depot_tools automatically downloads source files from the master branch and does not allow to choose a particular version.但是,官方提出的depot_tools中的$ fetch chromium会自动从 master 分支下载源文件,并且不允许选择特定版本。 Is there a possibility to get (and successfully compile using depot_tools ninja ) the source code of Chromium 88, while Chromium 92 is the most recent build?是否有可能获得(并使用depot_tools ninja成功编译)Chromium 88 的源代码,而 Chromium 92 是最新版本?

That repo is mirrored in GitHub, where you can grab many branches and tags.该存储库镜像在 GitHub 中,您可以在其中获取许多分支和标签。

https://github.com/chromium/chromium https://github.com/chromium/chromium

Once you clone the repo, you can checkout versions by tag (build number).克隆存储库后,您可以按标签(内部版本号)签出版本。

git checkout 92.0.4482.3

The master branch of Chromium is not a stable version. Chromium 的 master 分支不是一个稳定的版本。 Chromium versions are represented by tags. Chromium 版本由标签表示。 After fetching Chromium source code, you will have to follow the following steps:获取 Chromium 源代码后,您必须执行以下步骤:

From src directory:src目录:

Fetch all the tags:获取所有标签:

git fetch --tags

Checkout the version you want:签出您想要的版本:

git checkout tags/88.0.4324.86

Pull third-party deps:拉取第三方deps:

gclient sync

Now, you should be able to compile Chromium:现在,您应该能够编译 Chromium:

gn gen out\YourBuildFolder
ninja -C out\YourBuildFolder

I have posted more info here在这里发布了更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM