其他分享
首页 > 其他分享> > 在AR云渲染服务中,尝试玩转webrtc的编译

在AR云渲染服务中,尝试玩转webrtc的编译

作者:互联网

1、depot_tools下载

下载depot_tools.zip并解压,将解压后的depot_tools文件夹路径加入到系统环境变量

        git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

管理员方式运行cmd运行

2、cmd中设置代理的方法为:

set http_proxy=http://10.34.192.82:808

set https_proxy=http://10.34.192.82:808

git config --global http.proxy http://10.34.192.82:808

git config --global https.proxy http://10.34.192.82:808

但是,我设置之后,依然在下载cpid的时候报错,看起来是访问这个地址chrome-infra-packages.appspot.com的时候没有走代理

,撸一下代码, 有一个脚本cipd_impl.ps1,找到下载cpid的代码,在$wc = (New-Object System.Net.WebClient)前面增加上设置代理的代码

  $proxy = (New-Object System.Net.WebProxy)

  $proxy.Address = "http://10.34.192.82:808"

  $proxy.useDefaultCredentials = $true

  $wc = (New-Object System.Net.WebClient)

  $wc.proxy = $proxy

  $wc.Headers.Add("User-Agent", $UserAgent)

3、拉取代码

set WINDOWSSDKDIR=C:\Program Files (x86)\Windows Kits\10

set DEPOT_TOOLS_WIN_TOOLCHAIN=0

set DEPOT_TOOLS_UPDATE=0

set GYP_MSVS_VERSION=2019

set GYP_MSVS_OVERRIDE_PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise

set GYP_GENERATORS=msvs-ninja,ninja

fetch --nohooks webrtc

gclient sync

剩下就是漫长的等待

4、编译

生成VS2019工程文件:

cd src

gn gen --ide=vs out/Default

可以在src\out\Default\ 下得到 all.sln解决方案文件。

如果不想使用默认编译参数,可以使用gn args out/Default --list查看当前编译参数,通过类似如下方式设置:

gn gen --ide=vs out/h264Debug --args="proprietary_codecs=true rtc_use_h264=true ffmpeg_branding=\"Chrome\" is_debug=true rtc_include_tests=false"

ninja -C out/h264Debug

5、FAQ:

[P5948 10:03:46.035 fs.go:531 W] fs: giving up trying to rename("D:\\depot_tools\\bootstrap-3_8_0_chromium_8_bin\\.cipd\\pkgs\\0\\F_E3fZLLqQZJ", "D:\\depot_tools\\bootstrap-3_8_0_chromium_8_bin\\.cipd\\pkgs\\0\\FT1KzTGakKWeUreqsiJRsxZtcTcPC7PUVSIIOPm08VgC") - Access is denied.

[P5948 10:03:46.035 fs.go:449 W] fs: failed to rename directory "D:\\depot_tools\\bootstrap-3_8_0_chromium_8_bin\\.cipd\\pkgs\\0\\F_E3fZLLqQZJ" - Access is denied.

[P5948 10:03:46.047 client.go:1711 E] Failed to install infra/3pp/tools/git/windows-amd64:FT1KzTGakKWeUreqsiJRsxZtcTcPC7PUVSIIOPm08VgC - Access is denied.

 

解决方法:

进入depot_tools\bootstrap-3_8_0_chromium_8_bin目录,找到.cipd文件夹,右键选中—>属性—>安全,选中你当前的登陆用户,然后点击编辑,把修改权限勾选上。

6、参考文献:

https://blog.csdn.net/gupar/article/details/78565677

https://webrtc.org.cn/mirror/

https://blog.csdn.net/freeabc/article/details/106451174

https://webrtc.org/native-code/development/

https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md

https://blog.jianchihu.net/windows-webrtc-build.html

 

 

 

 

标签:set,chromium,AR,proxy,https,depot,tools,webrtc,玩转
来源: https://blog.csdn.net/grace_yi/article/details/113735048