参考谷歌的教程
https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md
https://webrtc.org/native-code/development/prerequisite-sw/
开始安装前提条件:
1,、requires Visual Studio 2017 (>=15.7.2) or 2019 (>=16.0.0) to build
2,you must install the “Desktop development with C++” component and the “MFC/ATL support” sub-components
3,You must have the version 10.0.17763 or higher Windows 10 SDK installed
4,The SDK Debugging Tools must also be installed
(If the Windows 10 SDK was installed via the Visual Studio installer, then they can be installed by going to: Control Panel → Programs → Programs and Features → Select the “Windows Software Development Kit” → Change → Change → Check “Debugging Tools For Windows” → Change. Or, you can download the standalone SDK installer and use it to install the Debugging Tools)
工具安装的条件
1、Add depot_tools to the start of your PATH (must be ahead of any installs of Python). Assuming you unzipped the bundle to C:\src\depot_tools, open:Control Panel → System and Security → System → Advanced system settings
2,add a DEPOT_TOOLS_WIN_TOOLCHAIN system variable in the same way, and set it to 0
3、set GYP_GENERATORS=msvs-ninja,ninja
4、set GYP_MSVS_VERSION = 2017
以前都可以在系统环境变量中设置
获取代码:
mkdir webrtc #这是创建一个目录,创建之前最好cd到合适的地方
cd webrtc # 进入到我们刚刚创建的目录中
fetch --nohooks webrtc # 获取代码
gclient sync # 当过程中断时,我们可以使用该命令恢复并继续
如下图:
我是一次性成功的,大约大小有8G
生成VS2017的工程:
$ gn gen --ide=vs out\Default
$ devenv out\Default\all.sln
一直在失败,各种失败,莫名其妙
执行更新试一下
gclient sync
晚上回来再搞。。。。。。没时间了。
居然更新完之后好了,,完美。。。