zap-stream-app/android.sh

29 lines
984 B
Bash
Raw Normal View History

2024-10-17 20:06:37 +01:00
#!/bin/bash
git clone https://github.com/v0l/ffmpeg-kit.git
export ANDROID_SDK_ROOT=$ANDROID_HOME
2024-10-17 22:05:53 +01:00
cd ffmpeg-kit && ./android.sh \
--disable-x86 \
--disable-x86-64 \
--disable-arm-v7a \
--disable-arm-v7a-neon \
--enable-openssl \
--api-level=28 \
--no-ffmpeg-kit-protocols \
--no-archive
2024-10-17 20:06:37 +01:00
NDK_VER="28.0.12433566"
ARCH="arm64"
PLATFORM="android"
TRIPLET="aarch64-linux-android"
export FFMPEG_DIR="$(pwd)/ffmpeg-kit/prebuilt/$PLATFORM-$ARCH/ffmpeg"
2024-10-17 22:05:53 +01:00
export PKG_CONFIG_SYSROOT_DIR="$(pwd)/ffmpeg-kit/prebuilt/$PLATFORM-$ARCH/pkgconfig"
2024-10-17 20:06:37 +01:00
# DIRTY HACK !!
cp "$ANDROID_HOME/ndk/$NDK_VER/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/$TRIPLET/35/libcamera2ndk.so" \
./target/x/debug/android/$ARCH/cargo/$TRIPLET/debug/deps
2024-10-17 22:05:53 +01:00
cp "$ANDROID_HOME/ndk/$NDK_VER/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/$TRIPLET/35/libcamera2ndk.so" \
./target/x/release/android/$ARCH/cargo/$TRIPLET/release/deps
2024-10-17 20:06:37 +01:00
2024-10-17 22:05:53 +01:00
x build --arch $ARCH --platform $PLATFORM --verbose --release