Fix #6565: streamline android build configuration
authorChristian Plattner <ccpp@gmx.at>
Sun, 15 Nov 2020 03:10:41 +0000 (04:10 +0100)
committerakallabeth <akallabeth@posteo.net>
Wed, 2 Dec 2020 08:06:10 +0000 (09:06 +0100)
(cherry picked from commit 0270932d96b6dd9a6c6c57e6c48eb5081fd122ef)

scripts/android-build-32.conf
scripts/android-build-64.conf
scripts/android-build-freerdp.sh
scripts/android-build-release.conf [new file with mode: 0644]
scripts/android-build.conf

index 8d15d0e..6b6ac79 100644 (file)
 #       create seperate configurations for each NDK API level
 #       and architecture you want to support.
 WITH_JPEG=0
-WITH_OPENH264=0
+WITH_OPENH264=1
 WITH_OPENSSL=1
 BUILD_DEPS=1
 DEPS_ONLY=0
-NDK_TARGET=14
+NDK_TARGET=21
 
 JPEG_TAG=master
-OPENH264_TAG=v1.8.0
-OPENSSL_TAG=OpenSSL_1_1_1f
+OPENH264_TAG=v1.8.0  # NOTE: NDK r15c or earlier needed in --openh624-ndk for v1.8.0
+OPENSSL_TAG=OpenSSL_1_1_1h
 
 SRC_DIR=$SCRIPT_PATH/..
 BUILD_DST=$SCRIPT_PATH/../client/Android/Studio/freeRDPCore/src/main/jniLibs
index 45e4136..7a59a47 100644 (file)
 #       create seperate configurations for each NDK API level
 #       and architecture you want to support.
 WITH_JPEG=0
-WITH_OPENH264=0
+WITH_OPENH264=1
 WITH_OPENSSL=1
 BUILD_DEPS=1
 DEPS_ONLY=0
 NDK_TARGET=21
 
 JPEG_TAG=master
-OPENH264_TAG=v1.8.0
-OPENSSL_TAG=OpenSSL_1_1_1f
+OPENH264_TAG=v1.8.0  # NOTE: NDK r15c or earlier needed in --openh624-ndk for v1.8.0
+OPENSSL_TAG=OpenSSL_1_1_1h
 
 SRC_DIR=$SCRIPT_PATH/..
 BUILD_DST=$SCRIPT_PATH/../client/Android/Studio/freeRDPCore/src/main/jniLibs
index b27fa6c..ebb7612 100755 (executable)
@@ -37,6 +37,11 @@ do
                        WITH_OPENH264=1
                        shift
                        ;;
+               --openh264-ndk)
+                       shift
+                       ANDROID_NDK_OPENH264=$1
+                       shift
+                       ;;
                --openssl)
                        WITH_OPENSSL=1
                        shift
@@ -107,11 +112,19 @@ do
     fi
     if [ $WITH_OPENH264 -ne 0 ];
     then
+        if [ -z "$ANDROID_NDK_OPENH264" ]
+        then
+            echo
+            echo "Warning: Missing openh264-ndk, using $ANDROID_NDK" >&2
+            echo
+            ANDROID_NDK_OPENH264=$ANDROID_NDK
+        fi
         if [ $BUILD_DEPS -ne 0 ];
         then
             common_run bash $SCRIPT_PATH/android-build-openh264.sh \
                 --src $BUILD_SRC/openh264 --dst $BUILD_DST \
-                --ndk $ANDROID_NDK \
+                --sdk "$ANDROID_SDK" \
+                --ndk "$ANDROID_NDK_OPENH264" \
                 --arch $ARCH \
                 --target $NDK_TARGET \
                 --tag $OPENH264_TAG
@@ -126,6 +139,7 @@ do
         then
             common_run bash $SCRIPT_PATH/android-build-openssl.sh \
                 --src $BUILD_SRC/openssl --dst $BUILD_DST \
+                --sdk "$ANDROID_SDK" \
                 --ndk $ANDROID_NDK \
                 --arch $ARCH \
                --target $NDK_TARGET \
diff --git a/scripts/android-build-release.conf b/scripts/android-build-release.conf
new file mode 100644 (file)
index 0000000..e3a77bd
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/bash
+#
+# Android build confguration
+#
+# Note: This is a simple configuration to build all
+#       architectures in one rush.
+#       Since android 64 bit support was introduced with NDK API 21
+#       this is the minimal common denominator.
+#       If you require support for older NDK API levels,
+#       create seperate configurations for each NDK API level
+#       and architecture you want to support.
+WITH_JPEG=0
+WITH_OPENH264=1
+WITH_OPENSSL=1
+BUILD_DEPS=1
+DEPS_ONLY=0
+NDK_TARGET=26
+
+JPEG_TAG=master
+OPENH264_TAG=v1.8.0  # NOTE: NDK r15c or earlier needed in --openh624-ndk for v1.8.0
+OPENSSL_TAG=OpenSSL_1_1_1h
+
+SRC_DIR=$SCRIPT_PATH/..
+BUILD_DST=$SCRIPT_PATH/../client/Android/Studio/freeRDPCore/src/main/jniLibs
+BUILD_SRC=$SRC_DIR/build
+
+CMAKE_BUILD_TYPE=Release
+
+BUILD_ARCH="armeabi-v7a x86 arm64-v8a x86_64"
index cd07da0..b69de86 100644 (file)
 #       create seperate configurations for each NDK API level
 #       and architecture you want to support.
 WITH_JPEG=0
-WITH_OPENH264=0
+WITH_OPENH264=1
 WITH_OPENSSL=1
 BUILD_DEPS=1
 DEPS_ONLY=0
 NDK_TARGET=26
 
 JPEG_TAG=master
-OPENH264_TAG=v1.8.0
-OPENSSL_TAG=OpenSSL_1_1_1f
+OPENH264_TAG=v1.8.0  # NOTE: NDK r15c or earlier needed in --openh624-ndk for v1.8.0
+OPENSSL_TAG=OpenSSL_1_1_1h
 
 SRC_DIR=$SCRIPT_PATH/..
 BUILD_DST=$SCRIPT_PATH/../client/Android/Studio/freeRDPCore/src/main/jniLibs