[英]How to download Chromium source code?
I'd like to download some Chromium source code.我想下载一些 Chromium 源代码。 In particular, the folder described at https://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/email_this_page/特别是https://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/email_this_page/ 中描述的文件夹
How can I do that?我怎样才能做到这一点?
I can't see the clone URL.我看不到克隆 URL。 I'm not even sure whether it's a git repo.我什至不确定它是否是 git repo。
Per https://chromium.googlesource.com/chromium/src根据https://chromium.googlesource.com/chromium/src
git clone https://chromium.googlesource.com/chromium/src
Easy peasy lemon squeezy简单的豌豆柠檬汁
As of today, you can get it from GitHub:截至今天,您可以从 GitHub 获取它:
The official GitHub mirror of the Chromium source : https://github.com/chromium/chromium Chromium源码官方GitHub镜像: https : //github.com/chromium/chromium
Cloning with git clone
is a tad slow.用git clone
有点慢。 See bolded text below.请参阅下面的粗体文本。
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/linux_build_instructions.md#get-the-code https://chromium.googlesource.com/chromium/src/+/lkcr/docs/linux_build_instructions.md#get-the-code
Create a chromium directory for the checkout and change to it (you can call this whatever you like and put it wherever you like, as long as the full path has no spaces):为结帐创建一个chromium目录并更改为它(你可以随意调用它并把它放在你喜欢的任何地方,只要完整路径没有空格):
$ mkdir ~/chromium && cd ~/chromium
Run the fetch tool from depot_tools to check out the code and its dependencies.从 depot_tools 运行 fetch 工具以检查代码及其依赖项。
$ fetch --nohooks chromium
If you don't want the full repo history, you can save a lot of time by adding the
--no-history
flag to fetch.如果您不想要完整的 repo 历史记录,可以通过添加--no-history
标志来获取,从而节省大量时间。Expect the command to take 30 minutes on even a fast connection, and many hours on slower ones .预计命令即使在快速连接上也需要30 分钟,而在较慢的连接上则需要数小时。
Remove the /viewvc
from url and clone (checkout) with svn checkout <url-without-viewvc>
从 url 中删除/viewvc
并使用svn checkout <url-without-viewvc>
克隆(结帐)
Not this: svn checkout http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/
不是这个: svn checkout http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/
But this: svn checkout http://src.chromium.org/chrome/trunk/src/chrome/common/extensions/docs/
但是这个: svn checkout http://src.chromium.org/chrome/trunk/src/chrome/common/extensions/docs/
The chromium page on googlesource.com has exact instructions for the same. googlesource.com 上的 Chromium 页面有相同的确切说明。
Page: https://chromium.googlesource.com/chromium/src页面:https://chromium.googlesource.com/chromium/src
git clone https://chromium.googlesource.com/chromium/src
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.