depot tools

Install depot_tools

Chromium and Chromium OS use a package of scripts called depot_ tools to manage checkouts and code reviews.  If you want more details about depot_ tools, you can check the depot_tools information page.

The depot_ tools package includes gclient, gclgit-clrepo, and others.

Linux and Mac

  1. Make sure you have the necessary Chromium dependencies set up locally:

    1. On Linux: git is installed by default in normal configurations.
    2. On Mac: git is installed and available once Xcode is installed.  See our Mac build instructions for more info on Xcode.

  2. Fetch depot_toolsgit clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

  3. Add depot_tools to your PATH:
    1. $ export PATH=`pwd`/depot_tools:"$PATH"
      (Yes, you want to put depot_tools ahead of everything else, otherwise gcl will refer to the GNU Common Lisp compiler.)
    2. You may want to add this to your .bashrc file or your shell's equivalent so that you don’t need to reset your $PATH manually each time you open a new shell.

Windows (Cygwin and non-Cygwin)

Preamble

Chromium is mostly designed to be run using the native Windows tools and the Msys (Git for Windows) toolchain. You can also use Cygwin, but that is supported in a more ad-hoc manner. The cygwin tools do not interoperate with the native tools very well, so f irst decide if you want to use cygwin or not. Then, do not switch. If you use native svn on a cygwin's svn checkout and it blows up, you are on your own, e.g. you'll need to do a fresh checkout.

Instructions

If using Cygwin, you should have already installed cygwin by this point.
  1. Get a copy of depot_tools:
    • Cygwin: Check out the tools using the command in step (2) for Linux and Mac above.
      New versions of cygwin do not include root certs by default so you need to install a "ca-certificates-1.*-*" package!
    • Non-cygwin: Download depot_tools.zip and decompress it.
      • Do not use drag-n-drop or copy-n-paste extract from Explorer, this will not extract the hidden ".git" folder which is necessary for depot_tools to autoupdate itself. You can use "Extract all..." from the context menu though.
      • Do not extract to a path containing spaces. If you do, gclient will produce the error "update_depot_tools.bat was not expected at this time" or similar.
  2. Add depot_tools to the end (not start!) of your PATH:
    • With Administrator access:
      • Control Panel > System and Security > System > Advanced system settings
      • Modify the PATH system variable to include depot_tools
    • Without Administrator access:
      • Control Panel > User Accounts > User Accounts > Change my environment variables
      • Add a PATH user variable: %PATH%;C:\path\to\depot_tools
  3. Non-cygwin: Run gclient from the cmd shell. The first time it is run, it will install its own copy of svn and other tools. If you run gclient from a non-cmd shell, it may appear to run properly, but svn, python, and other tools may not get installed correctly (while it should work fine from a msys bash shell, you may still trip over bugs from time to time).
  4. Cygwin only: Close your shells, reopen a Cygwin shell, and ensure that which svn reports /usr/bin/svn If not, you either didn't install the svn package properly when installing Cygwin, or you put depot_tools on the front of your PATH instead of the back.  Fix this before checking out any code, as once you check out, you want to always use the same svn (Cygwin or depot_tools) to work with that checkout -- otherwise strange things can happen that are most easily fixed by completely wiping the checkout.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值