需要的工具:
1. 可以翻墙的网络
2.Visual Studio Community 2015 Update 3
设置git代理:
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
1. git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
2. Add depot_tools
to the start (not end!) 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: C:\path\to\depot_tools;%PATH%
3. Rungclient
from the cmd shell. The first time it is run, it will install its own copy of various tools. If you run gclient from a non-cmd shell, it may appear to run properly, but 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).
- If you see strange errors with the file system on the first run of gclient, you may want to disable Windows Indexing.
- If you see errors like "The system cannot execute the specified program", try installing "Microsoft Visual C++ 2008 Redistributable Package".
- If it complains that it can't find python, make sure you don't already have a .gclient file in the same directory.
- 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
- With Administrator access:
GYP_GENERATORS
tomsvs
(other options includeninja
andmake
)GYP_MSVS_VERSION
to2015
On Linux and MacOS:
GYP_GENERATORS
toninja
(defaults to 'make' that pollutes your source directory)
Download the ANGLE source by running the following commands:
git clone https://chromium.googlesource.com/angle/angle
cd angle
python scripts/bootstrap.py
gclient sync
git checkout master
开始的时候git没有设置代理,直接在github上面下载的zip的源码,执行python scripts/bootstrap.py, 报:[P13856 15:30:40.589 remote.go:95 W] cipd: connectivity error (Get https://chrom
e-infra-packages.appspot.com/_ah/api/repo/v1/instance/resolve?package_name=infra
%2Ftools%2Fcipd%2Fwindows-386&version=git_revision%3A05f9a685b72ee556899506ffd96
5dca91bd60efa: dial tcp 93.46.8.89:443: connectex: A connection attempt failed b
ecause the connected party did not properly respond after a period of time, or e
stablished connection failed because connected host has failed to respond.)
[P13856 15:30:40.589 remote.go:95 W] cipd: retrying request to https://chrome-in
fra-packages.appspot.com/_ah/api/repo/v1/instance/resolve?package_name=infra%2Ft
ools%2Fcipd%2Fwindows-386&version=git_revision%3A05f9a685b72ee556899506ffd965dca
91bd60efa
访问不了的错误,急了,直接运行python gyp/gyp_angle, 报了一堆:Warning: Missing input files:
src\tests\..\..\third_party\libpng\pngread.c
src\tests\..\..\third_party\zlib\inflate.h
src\tests\..\..\third_party\libpng\pngwtran.c
src\tests\..\..\third_party\zlib\inflate.c
src\tests\..\..\third_party\zlib\simd_stub.c
src\tests\..\..\third_party\libpng\pngpread.c
src\tests\..\..\third_party\libpng\pngwrite.c
src\..\third_party\vulkan-validation-layers\src\layers\windows\VkLayer_swapchain
.json
src\tests\..\..\third_party\zlib\gzclose.c
src\tests\..\..\third_party\zlib\compress.c
src\..\third_party\glslang-angle\src\glslang\MachineIndependent\preprocessor\PpS
ymbols.cpp
src\tests\..\..\testing\gmock\src\gmock-all.cc
src\tests\..\..\third_party\libpng\pngwio.c
src\tests\..\..\third_party\zlib\deflate.h
src\tests\..\..\third_party\libpng\pngmem.c
src\tests\..\..\third_party\zlib\deflate.c
src\tests\..\..\third_party\zlib\crc32.c
src\tests\..\..\third_party\zlib\gzlib.c
src\tests\..\..\third_party\libpng\pngget.c
src\tests\..\..\third_party\zlib\inffast.c
src\tests\..\..\third_party\zlib\crc32.h
src\tests\..\..\third_party\libpng\pngrutil.c
src\tests\..\..\third_party\zlib\inffast.h
src\..\third_party\vulkan-validation-layers\src\layers\swapchain.h
src\tests\..\..\third_party\zlib\trees.h
src\tests\..\..\third_party\zlib\infback.c
src\..\third_party\spirv-tools-angle\src\source\extinst-1.0.opencl.std.grammar.j
son
src\tests\..\..\third_party\zlib\zconf.h
src\tests\..\..\third_party\libpng\pngtrans.c
到git上面把第3方的全部下载到third_party,vs2015打开ANGLE.sln 编译,报了n多错误,我才意识到我到git上面下载third_party可能跟我的angle版本不匹配,还是老老实实解决网络问题。
设置git代理后
python scripts/bootstrap.py
还是会报[P13856 15:30:40.589 remote.go:95 W] cipd: connectivity error (Get https://chrom e-infra-packages.appspot.com/_ah/api/repo/v1/instance/resolve?package_name=infra %2Ftools%2Fcipd%2Fwindows-386&version=git_revision%3A05f9a685b72ee556899506ffd96 5dca91bd60efa: dial tcp 93.46.8.89:443: connectex: A connection attempt failed b ecause the connected party did not properly respond after a period of time, or e stablished connection failed because connected host has failed to respond.) [P13856 15:30:40.589 remote.go:95 W] cipd: retrying request to https://chrome-in fra-packages.appspot.com/_ah/api/repo/v1/instance/resolve?package_name=infra%2Ft ools%2Fcipd%2Fwindows-386&version=git_revision%3A05f9a685b72ee556899506ffd965dca 91bd60efa 心理想完了过不去了,去上了个厕所回来发现完成了,vs2015打开也能编译过了,运气啊。