折腾了不少时间,才成功部署webrtc win10的单步调试环境,记录此文章帮助理解记忆,也备着再次需要用到。
一,环境准备工作
参考链接:
https://github.com/open-webrtc-toolkit/owt-client-native
1.1,设置代理,
set http_proxy=http://127.0.0.1:7078
set https_proxy=http://127.0.0.1:7078
netsh winhttp set proxy proxy-server="http=127.0.0.1:7078"
git config --global user.name "yourname"
git config --global user.email "youremail"
git config --global core.autocrlf false
git config --global core.filemode false
//编辑并保存 d:\git\boto.cfg
[Boto]
proxy = 127.0.0.1
proxy_port = 7078
https_validate_certificate = True
1.2,下载安装 depot_tools
https://storage.googleapis.com/chrome-infra/depot_tools.zip
添加环境变量:
Control Panel → System and Security → System → Search for “Edit environment variables for your account”
DEPOT_TOOLS_WIN_TOOLCHAIN 0
NO_AUTH_BOTO_CONFIG d:\git\Boto.cfg
Path 添加:d:\git\depot_tools,并移动到最前面
// 确认depot_tools在最前面
C:\>where python
C:\git\depot_tools\python.bat
C:\Users\fang\AppData\Local\Microsoft\WindowsApps\python.exe
//更新gclient
gclient.bat
Note: 使用Power shell遇到问题;再次以管理员启动CMD 命令行,下载成功
1.3,安装visusl studio 2019
$ PATH_TO_INSTALLER.EXE ^
--add Microsoft.VisualStudio.Workload.NativeDesktop ^
--add Microsoft.VisualStudio.Component.VC.ATLMFC ^
--includeRecommended
NOTE: 经测试visual studio 2022也能编译调试本文的所以项目代码。推荐使用 visul studio 2022。需要将本文所有的2019变量替换成2022;
1.4,安装Windows 10 SDK 10.0.20348.0
Windows 10 SDK 需要安装有SDK Debugging Tools;
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.5, 下载编译OpenSSL 1.1.1k or higher
1.5.1 安装perl