test_plugin_android.sh 685 B

12345678910111213141516171819202122232425
  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. cd "$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