The Chromium Projects---Get the Code 留作备份,万一以后被墙了。。。
Get the Code目录1 Bootstrap using the tarball2 Check out the sources2.1 Windows2.2 Mac OS X2.3 Linux3 Check out the source for a specific release4 Staying G
·
Get the Code
The Chromium codebase consists of hundreds of thousands of files, which means that a checkout straight from the Subversion (SVN) repository can take a long time. To speed up the process, we have provided a tarball that you can use to bootstrap the download. Alternatively, you can skip the tarball and download straight from SVN (not recommended). If you know what you're doing, you can alternatively
Note: There is no advantage to checking out straight from SVN. The tarball includes SVN directories so that after you unpack the tarball, you can get up to the latest revision by using
gclient sync.
If you just want to see the code without checking it out, you can
browse SVN or use
Google Code Search for Chromium.
If you only want to look at the source code on your own machine, you'll need at least 1.6 GB of hard drive space available. (Somewhat less for Linux, since it already has some of the dependencies installed.) If you want to build it, you will need just under 10 GB of space, including all the object files and executables.
Bootstrap using the tarball
This should give you a complete source tree. But if you have any problems, first check that you've installed any prerequisites listed on the build instructions for your platform.
Bootstrap notes for
Ubuntu
:
Check out the sources
You'll use
gclient / depot tools to download the Chromium code from its subversion repository. The first time you execute
gclient, there will be a delay (a minute or so) while it updates the depot tools. Downloading the Chromium code takes about an hour.
The
gclient config <url> step only needs to be run once to set up your working directory. It creates a
.gclient file in your working directory that identifies the corresponding structure to pull from the repository. The
gclient sync step creates several subdirectories. To update your tree in the future, you only need to run
gclient sync from anywhere within your working directory.
NOTE: These instructions will pull a read-only tree. If you are a committer, and plan to make changes to source code, use the instructions given to you when you received commit access.
WindowsNote: It's not necessary to have Subversion or Python installed already: the first run of gclient will install them for you. On the other hand, if you do already have Subversion installed through Cygwin, you'll need to set up your PATH to have the depot_tools svn ahead of the cygwin svn, and use only the depot_tools svn, not Cygwin's, to check out Chromium.
Mac OS X
Linux
Check out the source for a specific release
Use the same steps for "Check out directly from SVN", except that as opposed to using gclient config on http://src.chromium.org/svn/trunk/src, you need to do a checkout for the specific version of Chromium that you are interested in:
For example, if you wanted the source for build 5.0.330.0, the following command would be appropriate:
Staying Green most of the timeWhen running gclient config, you can specify a second URL to be referenced when doing updates. Instead of pulling the most recent revision, the version number at this URL will be queried, allowing you to track the "most recent green" revision so you can spend less time debugging other people's issues or running builds only to find out that the waterfall was red. Chromium has two of these URLs:Continuous build
LKGR
SetupTo use one of these URLs, pass it when you run gclient config :$ cd ~/chromium $ gclient config http://src.chromium.org/svn/trunk/src http://chromium-status.appspot.com/lkgr Now whenever you call gclient sync , it will only sync as far as the configured URL specifies. To over-ride this, pass the --head parameter to gclient , e.g.: gclient sync --head
You can also add this directly to your .gclient file if you already have one:
solutions = [ Reducing the size of your checkoutYou can edit your .gclient file to avoid pulling down certain pieces of the checkout that you may not want. For example, inserting something like
"custom_deps": {
"src/third_party/WebKit/LayoutTests": None,
"src/chrome/tools/test/reference_build/chrome": None,
"src/chrome_frame/tools/test/reference_build/chrome": None,
"src/chrome/tools/test/reference_build/chrome_linux": None,
"src/chrome/tools/test/reference_build/chrome_mac": None,
"src/third_party/hunspell_dictionaries": None,
}
As of r48011, the following can definitely be removed if you just want to build Chromium:
src/third_party/WebKit/LayoutTests - All the WebKit layout tests.
src/chrome/tools/test/reference_build/chrome - Windows reference build for performance testing.
src/chrome_frame/tools/test/reference_build/chrome - Chrome Frame reference build for performance testing.
src/chrome/tools/test/reference_build/chrome_linux - Linux reference build for performance testing.
src/chrome/tools/test/reference_build/chrome_mac - Mac reference build for performance testing.
src/third_party/hunspell_dictionaries - spellchecker dictionaries used for unit tests.
Update to the latest revision
The first time you execute gclient, there will be a delay (a minute or so) while it updates the depot tools. How long the Chromium code update takes depends on how much has changed since you last updated (or since the bootstrap tarball was created).
gclient sync --revision src@####
and the DEPS file will make sure you get the other directories in their matching forms. Checking out subpart of the tree
Let's say you want to checkout
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/tutorials/getstarted/, simply run:
Note the difference in the url, namely
/viewvc/chrome was replaced with
/svn .
|
更多推荐
已为社区贡献1条内容
所有评论(0)