xref: /aosp_15_r20/external/webrtc/docs/native-code/development/prerequisite-sw/index.md (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1*d9f75844SAndroid Build Coastguard Worker# WebRTC development - Prerequisite software
2*d9f75844SAndroid Build Coastguard Worker
3*d9f75844SAndroid Build Coastguard Worker## Depot Tools
4*d9f75844SAndroid Build Coastguard Worker
5*d9f75844SAndroid Build Coastguard Worker1. [Install the Chromium depot tools][depot-tools].
6*d9f75844SAndroid Build Coastguard Worker
7*d9f75844SAndroid Build Coastguard Worker2. On Windows, depot tools will download a special version of Git during your
8*d9f75844SAndroid Build Coastguard Workerfirst `gclient sync`. On Mac and Linux, you'll need to install [Git][git] by
9*d9f75844SAndroid Build Coastguard Workeryourself.
10*d9f75844SAndroid Build Coastguard Worker
11*d9f75844SAndroid Build Coastguard Worker## Linux (Ubuntu/Debian)
12*d9f75844SAndroid Build Coastguard Worker
13*d9f75844SAndroid Build Coastguard WorkerA script is provided for Ubuntu, which is unfortunately only available after
14*d9f75844SAndroid Build Coastguard Workeryour first gclient sync:
15*d9f75844SAndroid Build Coastguard Worker
16*d9f75844SAndroid Build Coastguard Worker```
17*d9f75844SAndroid Build Coastguard Worker$ ./build/install-build-deps.sh
18*d9f75844SAndroid Build Coastguard Worker```
19*d9f75844SAndroid Build Coastguard Worker
20*d9f75844SAndroid Build Coastguard WorkerMost of the libraries installed with this script are not needed since we now
21*d9f75844SAndroid Build Coastguard Workerbuild using Debian sysroot images in build/linux, but there are still some tools
22*d9f75844SAndroid Build Coastguard Workerneeded for the build that are installed with
23*d9f75844SAndroid Build Coastguard Worker[install-build-deps.sh][install-build-deps].
24*d9f75844SAndroid Build Coastguard Worker
25*d9f75844SAndroid Build Coastguard WorkerYou may also want to have a look at the [Chromium Linux Build
26*d9f75844SAndroid Build Coastguard Workerinstructions][chromium-linux-build-instructions] if you experience any other problems building.
27*d9f75844SAndroid Build Coastguard Worker
28*d9f75844SAndroid Build Coastguard Worker## Windows
29*d9f75844SAndroid Build Coastguard Worker
30*d9f75844SAndroid Build Coastguard WorkerFollow the [Chromium's build instructions for Windows][chromium-win-build-instructions].
31*d9f75844SAndroid Build Coastguard Worker
32*d9f75844SAndroid Build Coastguard WorkerWebRTC requires Visual Studio 2017 to be used. If you only have version 2015
33*d9f75844SAndroid Build Coastguard Workeravailable, you might be able to keep using it for some time by setting
34*d9f75844SAndroid Build Coastguard Worker`GYP_MSVS_VERSION=2015` in your environment. Keep in mind that this is not a
35*d9f75844SAndroid Build Coastguard Workersuppported configuration however.
36*d9f75844SAndroid Build Coastguard Worker
37*d9f75844SAndroid Build Coastguard Worker## macOS
38*d9f75844SAndroid Build Coastguard Worker
39*d9f75844SAndroid Build Coastguard WorkerXcode 12 or higher is required. Latest Xcode is recommended to be able to build
40*d9f75844SAndroid Build Coastguard Workerall code. You may use `xcode-select --install` to install it.
41*d9f75844SAndroid Build Coastguard Worker
42*d9f75844SAndroid Build Coastguard WorkerAbsence of Xcode will cause errors like:
43*d9f75844SAndroid Build Coastguard Worker```
44*d9f75844SAndroid Build Coastguard Workerxcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
45*d9f75844SAndroid Build Coastguard Worker```
46*d9f75844SAndroid Build Coastguard Worker
47*d9f75844SAndroid Build Coastguard Worker## Android
48*d9f75844SAndroid Build Coastguard Worker
49*d9f75844SAndroid Build Coastguard WorkerYou'll need a Linux development machine. WebRTC is using the same Android
50*d9f75844SAndroid Build Coastguard Workertoolchain as Chrome (downloaded into `third_party/android_tools`) so you won't
51*d9f75844SAndroid Build Coastguard Workerneed to install the NDK/SDK separately.
52*d9f75844SAndroid Build Coastguard Worker
53*d9f75844SAndroid Build Coastguard Worker1. Install Java OpenJDK as described in the
54*d9f75844SAndroid Build Coastguard Worker[Chromium Android prerequisites][chromium-android-build-build-instructions]
55*d9f75844SAndroid Build Coastguard Worker2. All set! If you don't run Ubuntu, you may want to have a look at
56*d9f75844SAndroid Build Coastguard Worker[Chromium's Linux prerequisites][chromium-linux-prerequisites] for distro-specific details.
57*d9f75844SAndroid Build Coastguard Worker
58*d9f75844SAndroid Build Coastguard Worker
59*d9f75844SAndroid Build Coastguard Worker[depot-tools]: https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up
60*d9f75844SAndroid Build Coastguard Worker[git]: http://git-scm.com
61*d9f75844SAndroid Build Coastguard Worker[install-build-deps]: https://cs.chromium.org/chromium/src/build/install-build-deps.sh
62*d9f75844SAndroid Build Coastguard Worker[chromium-linux-build-instructions]: https://chromium.googlesource.com/chromium/src/+/main/docs/linux/build_instructions.md
63*d9f75844SAndroid Build Coastguard Worker[chromium-win-build-instructions]: https://chromium.googlesource.com/chromium/src/+/main/docs/windows_build_instructions.md
64*d9f75844SAndroid Build Coastguard Worker[chromium-linux-prerequisites]: https://chromium.googlesource.com/chromium/src/+/main/docs/linux/build_instructions.md#notes
65*d9f75844SAndroid Build Coastguard Worker[chromium-android-build-build-instructions]: https://chromium.googlesource.com/chromium/src/+/main/docs/android_build_instructions.md
66