windows 编译webrtc 58版本库

Download dependencies

  1. Install Visual Studio 2015 Update 2 or later - Community Edition should work if its license is appropriate for you. Use the Custom Install option and select:

    • Visual C++, which will select three sub-categories including MFC
    • Universal Windows Apps Development Tools > Tools
    • Universal Windows Apps Development Tools > Windows 10 SDK (10.0.10586)
  2. Install the Chromium depot tolls

  3. Download depot_tools.zip and decompress it.

  4. Add depot_tools to the end of your PATH:

  • With Administrator access:

    • Control Panel > System and Security > System > Advanced system settings

    • Modify the PATH system variable to include depot_tools

  • Without Administrator access:

    • Control Panel > User Accounts > User Accounts > Change my environment variables

    • Add a PATH user variable: %PATH%;C:\path\to\depot_tools

  1. Run gclient from the cmd shell. The first time it is run, it will install its own copy various tools.

Download the source code

  1. Create a working directory, enter it, and run fetch webrtc:
mkdir webrtc-checkout
cd webrtc-checkout
fetch --nohooks webrtc
  1. Choose the stable release 58 rather than the most recent release by entering:
cd src
git branch -r
git checkout branch-heads/58
  1. Download the code
gclient sync

Note: The download will take a while, but it no longer downloads the Chromium repository after branch-head/56. Do not interrupt this step or you may need to start all over again (a new gclient sync may be enough, but you might also need wipe your webrtc_checkout\src folder and start over).

Update your checkout

To update an existing checkout, you can run

git rebase-update
gclient sync

The first command updates the primary Chromium source repository and rebases any of your local branches on top of tip-of-tree (aka the Git branch origin/master). If you don't want to use this script, you can also just use git pull or other common Git commands to update the repo.

The second command syncs the subrepositories to the appropriate versions and re-runs the hooks as needed.

Building WebRTC library

  1. After downloading the code, you can start building the WebRTC library(in working directory src/).

To build 64-bit libs, you need to run the following commands first:

gn gen out/Debug_x64

Then compile with:

Debug:

ninja -C out/Debug_x64

To create a 64 bit Release build you must edit the GN args and set is_debug = true, the default is x64 :

gn arg out/Release_x64
is_debug = false
target_cpu = "x64"
gn gen out/Release_x64
ninja -C out/Release_x64
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值