Installing WebRTC has left many a good developer balder than at the outset, but hopefully this guide will see you through unscathed.
This guide is written specificaly for 64-bit Windows 10 to build WebRTC
Install Visual Studio
Install Visual Studio 2015 Update 3 or later. The 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)
Install the Chromium depot tools
Download depot_tools.zip and decompress it.
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:
- With Administrator access:
gclientfrom the cmd shell. The first time it is run, it will install its own copy various tools.
Download the source code
Create a working directory, enter it, and run fetch WebRTC. This guide assumes a specific working folder structure. This operation starts from a base directory, eg., workspace and proceeds from there.
mkdir webrtc-checkout cd webrtc-checkout fetch --nohooks webrtc
Choose the stable release 60 rather than the most recent release by entering:
cd src git branch -r git checkout branch-heads/60
Download the code
Note: The download will take a while. 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
After you downloading the code, you can start the build from the
The default configuration is for a 64-bit debug build:
gn gen out/x64/Debug --args="is_debug=true use_rtti=true target_cpu=\"x64\"" ninja -C out/x64/Debug boringssl field_trial_default protobuf_full p2p
To create a 64-bit release build you must add
is_debug=true to the GN args
gn gen out/x64/Release--args="is_debug=false use_rtti=true target_cpu=\"x64\"" ninja -C out/x64/Release boringssl field_trial_default protobuf_full p2p
For a fully optimized release build you can omit symbols and tests like by adding the following arguments
These instructions are derived from following links: