WebRTC Android version of the compiler

  This article briefly describes how on Ubuntu18.04, compiled WebRTC Android version.

Installation Tools

  Dept_tools need to use tools to download webrtc source.

Installation depot_tools

  git command to get depot_tools.

# git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

  Configuration bad environment variables:

# echo "export PATH=$PWD/depot_tools:$PATH" > $HOME/.bash_profile
# source $HOME/.bash_profile

  Detecting whether the configuration is successful:

$ echo $PATH

Download Source

The default master branch

  The default is to download the most current source, namely Master branch.

# mkdir webrtc
# cd webrtc
# fetch --nohooks webrtc_android
# gclient sync

Particular branch

  If you want to compile a specific branch, such as M74 branch, specify the particular branch for synchronization. Pulling branch M74 using the following command:

gclient Sync -r cc1b32545db7823b85f5a83a92ed5f85970492c9     
# the commit the above mentioned id can switch to that branch to view the git log, that record is the current top of the latest branch to submit records

Compile

Install build dependencies

  Official website only gives first suggested two commands are executed.

# ./src/build/install-build-deps.sh
# ./src/build/install-build-deps-android.sh

Compile

 Compiler can be specified with or without AppRTCMobile, with AppRTCMobile generated Debug directory smaller, more files without AppRTCMobile generated is greater.

# source build/android/envsetup.sh
# gn gen out/Debug --args='target_os="android" target_cpu="arm64"'
# ninja -C out/Debug AppRTCMobile

  Compilation process, if there is no error, that means compile successfully.

reference

  Android version of the compiler the WebRTC
    https://blog.csdn.net/ericbar/article/details/83114015
  compiled WebRTC iOS & OSX library
    http://www.enkichen.com/2017/05/12/webrtc-ios-build/

Guess you like

Origin www.cnblogs.com/Hi-blog/p/11311141.html