webrtc 编译--终极版

需要翻墙下载代码(也可设置代理)

1、depot_tools:
https://chromium.googlesource.com/chromium/tools/depot_tools.git
环境变量配置: depot_tools、【python 2.7.6】 注意环境变量
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   (注:否则可能出现: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中运行gclient
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)
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容