webrtc在windows下的編譯


1、vpn

  不詳述

2、官方文檔地址

https://webrtc.org/native-code/development/ //官方編譯首頁
https://webrtc.org/native-code/development/prerequisite-sw/   //webrtc的依賴工具(包)
http://dev.chromium.org/developers/how-tos/install-depot-tools //下載depot-tools

https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md  //chrome 在windows下的編譯方案

3、下載depot-tools

  下載depot-tools之后解壓,把解壓目錄設置到環境變量里面 (PATH)

4、安裝vs2017

5、下載安裝windows 10 sdk

      目前我使用的版本 sdk 版本號 最好為 10.0.17134 ,同時記得安裝器debug tool, 設置路徑為 : 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.

  並配置環境變量 WINDOWSSDKDIR 指向 SDK 安裝目錄

6、修改系統語言

  Control Panel → System and Security → System → Advanced system settings

7、修改環境變量用於生成vs工程文件

  set DEPOT_TOOLS_WIN_TOOLCHAIN=0 

  set GYP_GENERATORS=ninja,msvs-ninja

  set GYP_MSVS_VERSION=2017

8、下載源碼

mkdir webrtc-checkout
cd webrtc-checkout
fetch --nohooks webrtc
gclient sync

9、生成解決方案

默認方案

gn gen --ide=vs out/Debug

ffmpeg h264的方案

gn gen --ide=vs out/Debug --args="rtc_use_h264=true is_component_ffmpeg=true"

 

10、遷徙工程

如果想把編譯好的工程遷徙到其他的電腦該怎么辦?

把1-9的步驟在新的電腦上重新做一遍(除了步驟8)

 

11、我遇到的異常,vs沒有安裝在系統盤里面

  修改 webrtc-code\src\build\vs_toolchain.py

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM