WebRTC development - Prerequisite software
WebRTC开发-必备软件
Depot Tools
Depot工具
1.Install the Chromium depot tools.
1.安装Chromium工具。
2.On Windows, depot tools will download a special version of Git during your first gclient sync
. On Mac and Linux, you'll need to install Git by yourself.
2.在Windows上,仓库工具将在第一次gclient同步期间下载一个特殊版本的Git。在Mac和Linux上,需要自己安装Git。
Linux (Ubuntu/Debian)
A script is provided for Ubuntu, which is unfortunately only available after your first gclient sync:
为Ubuntu提供了一个脚本,不幸的是,它只有在第一次gclient同步之后才可用:
$ ./build/install-build-deps.sh
Most of the libraries installed with this script are not needed since we now build using Debian sysroot images in build/linux, but there are still some tools needed for the build that are installed with install-build-deps.sh.
由于我们现在在build/linux中使用Debian sysroot映像进行构建,因此不需要使用此脚本安装的大多数库,但仍有一些构建所需的工具是使用install-build-deps.sh安装的。
You may also want to have a look at the Chromium Linux Build instructions if you experience any other problems building.
如果在构建过程中遇到任何其他问题,可能还要看看Chromium Linux构建说明。
Windows
Follow the Chromium's build instructions for Windows.
按照Chromium针对Windows的构建说明进行操作。
WebRTC requires Visual Studio 2017 to be used. If you only have version 2015 available, you might be able to keep using it for some time by setting GYP_MSVS_VERSION=2015
in your environment. Keep in mind that this is not a suppported configuration however.
WebRTC要求使用Visual Studio 2017。如果只有2015版可用,可以通过在环境中设置GYP_MSVS_VERSION
=2015来继续使用它一段时间。请记住,这不是一个支持的配置。
macOS
Xcode 12 or higher is required. Latest Xcode is recommended to be able to build all code. You may use xcode-select --install
to install it.
需要Xcode 12或更高版本。建议使用最新的Xcode来构建所有代码。您可以使用xcode select--install来安装它。
Absence of Xcode will cause errors like:
缺少Xcode会导致以下错误:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Android
You‘ll need a Linux development machine. WebRTC is using the same Android toolchain as Chrome (downloaded into third_party/android_tools
) so you won’t need to install the NDK/SDK separately.
需要一台Linux开发机器。WebRTC使用与Chrome相同的Android工具链(下载到third_party/Android_tools),因此不需要单独安装NDK/SDK。
1.Install Java OpenJDK as described in the Chromium Android prerequisites
1.按照Chromium Android先决条件中的说明安装Java OpenJDK
2.All set! If you don't run Ubuntu, you may want to have a look at Chromium's Linux prerequisites for distro-specific details.
2.一切就绪!如果你不运行Ubuntu,你可能想看看Chromium的Linux先决条件,了解发行版的具体细节。