需要翻墻下載代碼(也可設(shè)置代理)
1话原、depot_tools:
https://chromium.googlesource.com/chromium/tools/depot_tools.git
環(huán)境變量配置: depot_tools、【python 2.7.6】 注意環(huán)境變量
a诲锹、把depot_tools目錄加入PATH:export PATH=`pwd`/depot_tools:"$PATH"
b稿静、安裝”Visual Studio 2015 Update 3“,zh。
c辕狰、set DEPOT_TOOLS_WIN_TOOLCHAIN=0
set GYP_GENERATORS=msvs-ninja,ninja
set GYP_MSVS_VERSION=2015
set GYP_MSVS_OVERRIDE_PATH=D:\Program Files (x86)\Microsoft Visual Studio 14.0 (注:否則可能出現(xiàn):Exception: D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat is missing - make sure VC++ tools are installed.)
###set WindowsSdkDir=C:\Program Files (x86)\Windows Kits\8.1
2改备、cmd.exe中運行g(shù)client
3、配置git
git config --global user.name "My Name"
git config --global user.email "my-name@chromium.org"
git config --global core.autocrlf false
git config --global core.filemode false
git config --global branch.autosetuprebase always
4蔓倍、建立文件夾 mkdir webrtc-checkout && cd webrtc-checkout
5悬钳、拉取代碼 fetch --nohooks webrtc
6、gclient sync
7偶翅、進入源碼目錄 cd src
8默勾、git checkout master (git pull)
9、gclient sync
10聚谁、gn gen out/Default
release:gn gen out/Default --args='is_debug=false'
11母剥、ninja -C out/Default
如果要生成vs項目工程,則:
$ gn gen --ide=vs out\Default
$ devenv out\Default\all.sln
gn ls out/Default
To update an existing checkout, you can run
$ git rebase-update$ gclient sync
錯誤解決:
Exception: dbgcore.dll not found in "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\dbgcore.dll"
Exception: dbghelp.dll not found in "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\dbghelp.dll"
You must install the "Debugging Tools for Windows" feature from the Windows 10 SDK.
ERROR at //build/toolchain/win/BUILD.gn:39:3: Script returned non-zero exit code exec_script("../../vs_toolchain.py",
e:\opensource\webrtc\webrtc-checkout\src\third_party\gflags\src\src\windows_port.h(54): fatal error C1083: 無法打開包括文件: “windows.h”: No such file or directory
需要下載安裝:Windows 10 SDK (ver. 10.0.14393.795)
https://developer.microsoft.com/en-us/windows/downloads/sdk-archive
可以參考:
http://blog.csdn.net/yangzhenping/article/details/52399897
Checking out and Building Chromium for Windows
https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md#Get-the-code
https://webrtc.org/native-code/development/
[http://www.chromium.org/developers/how-tos/get-the-code](http://www.chromium.org/developers/how-tos/get-the-code)
http://blog.csdn.net/chinabinlang/article/details/71673732
http://blog.csdn.net/siyu77/article/details/50916320 !!!!!!!!
https://github.com/fanfeilong/cefutil/blob/master/doc/chromium_build_guid.md !!!!!!!!
https://github.com/sukinull/libwebrtc/wiki/Build-the-code-on-Windows-10-(Visual-Studio-2013-Professional)