build_test_runtime_android.sh 766 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash -eu
  2. export LIBWEBRTC_DOWNLOAD_URL=https://github.com/Unity-Technologies/com.unity.webrtc/releases/download/M92/webrtc-android.zip
  3. export SOLUTION_DIR=$(pwd)/Plugin~
  4. export ARCH_ABI=arm64-v8a
  5. # Download LibWebRTC
  6. curl -L $LIBWEBRTC_DOWNLOAD_URL > webrtc.zip
  7. unzip -d $SOLUTION_DIR/webrtc webrtc.zip
  8. # Build UnityRenderStreaming Plugin
  9. pushd "$SOLUTION_DIR"
  10. cmake . \
  11. -B build \
  12. -D CMAKE_SYSTEM_NAME=Android \
  13. -D CMAKE_ANDROID_API_MIN=24 \
  14. -D CMAKE_ANDROID_API=24 \
  15. -D CMAKE_ANDROID_ARCH_ABI=$ARCH_ABI \
  16. -D CMAKE_ANDROID_NDK=$ANDROID_NDK \
  17. -D CMAKE_BUILD_TYPE=Debug \
  18. -D CMAKE_ANDROID_STL_TYPE=c++_static
  19. cmake \
  20. --build build \
  21. --target WebRTCLibTest
  22. popd
  23. mkdir build
  24. cp $SOLUTION_DIR/build/WebRTCPluginTest/WebRTCLibTest build