安装depot tools

GET DEPOT TOOLS

LINUX / MAC

Clone the depot_tools repository:

$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

Add depot_tools to the front of your PATH (you will probably want to put this in your ~/.bashrc or ~/.zshrc). Assuming you cloned depot_tools to /path/to/depot_tools:

$ export PATH=/path/to/depot_tools:$PATH

WINDOWS

Download the depot_tools bundle and extract it somewhere.

Warning

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.

Add depot_tools to the front of your PATH (must be ahead of any installs of Python). Assuming you unzipped the bundle to C:\workspace\depot_tools:

With Administrator access:

Control Panel → System and Security → System → Advanced system settings

Modify the PATH system variable to include C:\workspace\depot_tools.

Without Administrator access:

Control Panel → User Accounts → User Accounts → Change my environment variables

Add a PATH user variable: C:\workspace\depot_tools;%PATH%.

From a cmd.exe shell, run the command gclient (without arguments). On first run, gclient will install all the Windows-specific bits needed to work with the code, including msysgit and python.

Note

  • If you run gclient from a non-cmd shell (e.g., cygwin, PowerShell), it may appear to run properly, but msysgit, python, and other tools may not get installed correctly.

  • If you see strange errors with the file system on the first run of gclient, you may want to disable Windows Indexing.

  • After running gclient open a command prompt and type where python and confirm that the depot_tools python.bat comes ahead of any copies of python.exe. Failing to ensure this can lead to overbuilding when using gn - see crbug.com/611087.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值