From 2a51880efcffb80ae99596d0f65ee840729c48a8 Mon Sep 17 00:00:00 2001 From: Sergii Pylypenko Date: Tue, 4 Oct 2016 17:50:42 +0300 Subject: [PATCH] SDL: added APP_PLATFORM option to the AndroidAppSettings.cfg --- changeAppSettings.sh | 13 ++++++++++++- project/jni/SettingsTemplate.mk | 2 ++ .../jni/application/ninslash/AndroidAppSettings.cfg | 6 ++++++ project/jni/application/ninslash/src | 2 +- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/changeAppSettings.sh b/changeAppSettings.sh index 398cba3f5..fc33407b6 100755 --- a/changeAppSettings.sh +++ b/changeAppSettings.sh @@ -377,6 +377,12 @@ echo >> AndroidAppSettings.cfg echo "# GCC version, or 'clang' for CLANG" >> AndroidAppSettings.cfg echo NDK_TOOLCHAIN_VERSION=$NDK_TOOLCHAIN_VERSION >> AndroidAppSettings.cfg echo >> AndroidAppSettings.cfg +echo "# Android platform version." >> AndroidAppSettings.cfg +echo "# android-9 = Android 2.3, the earliest supported version." >> AndroidAppSettings.cfg +echo "# android-18 = Android 4.3, the first version supporting GLES3." >> AndroidAppSettings.cfg +echo "# android-21 = Android 5.1, the first version with SO_REUSEPORT defined." >> AndroidAppSettings.cfg +echo APP_PLATFORM=$APP_PLATFORM >> AndroidAppSettings.cfg +echo >> AndroidAppSettings.cfg echo "# Specify architectures to compile, 'all' or 'y' to compile for all architectures." >> AndroidAppSettings.cfg echo "# Available architectures: armeabi armeabi-v7a x86 mips arm64-v8a" >> AndroidAppSettings.cfg echo MultiABI=\'$MultiABI\' >> AndroidAppSettings.cfg @@ -697,6 +703,10 @@ for KEY in $RedefinedKeysGamepad; do KEY2=`expr $KEY2 '+' 1` done +if [ "$APP_PLATFORM" = "" ]; then + APP_PLATFORM=android-18 +fi + if [ "$MultiABI" = "y" ] ; then MultiABI="all" elif [ "$MultiABI" = "n" ] ; then @@ -947,7 +957,8 @@ cat project/jni/SettingsTemplate.mk | \ sed "s^APPLICATION_BUILD_EXCLUDE :=.*^APPLICATION_BUILD_EXCLUDE := $AppBuildExclude^" | \ sed "s^APPLICATION_CUSTOM_BUILD_SCRIPT :=.*^APPLICATION_CUSTOM_BUILD_SCRIPT := $CustomBuildScript^" | \ sed "s^SDL_VERSION :=.*^SDL_VERSION := $LibSdlVersion^" | \ - sed "s^NDK_TOOLCHAIN_VERSION :=.*^NDK_TOOLCHAIN_VERSION := $NDK_TOOLCHAIN_VERSION^" >> \ + sed "s^NDK_TOOLCHAIN_VERSION :=.*^NDK_TOOLCHAIN_VERSION := $NDK_TOOLCHAIN_VERSION^" | \ + sed "s^APP_PLATFORM :=.*^APP_PLATFORM := $APP_PLATFORM^" >> \ project/jni/Settings.mk echo Patching strings.xml diff --git a/project/jni/SettingsTemplate.mk b/project/jni/SettingsTemplate.mk index 04b5b2402..851a50b87 100644 --- a/project/jni/SettingsTemplate.mk +++ b/project/jni/SettingsTemplate.mk @@ -58,3 +58,5 @@ SDL_VERSION := 1.2 #APP_LDFLAGS := -flto # Latest GCC got better LTO support NDK_TOOLCHAIN_VERSION := clang + +APP_PLATFORM := android-18 diff --git a/project/jni/application/ninslash/AndroidAppSettings.cfg b/project/jni/application/ninslash/AndroidAppSettings.cfg index a3265698c..bbcbeea42 100644 --- a/project/jni/application/ninslash/AndroidAppSettings.cfg +++ b/project/jni/application/ninslash/AndroidAppSettings.cfg @@ -244,6 +244,12 @@ AppMinimumRAM=0 # GCC version, or 'clang' for CLANG NDK_TOOLCHAIN_VERSION=clang +# Android platform version. +# android-9 = Android 2.3, the earliest supported version. +# android-18 = Android 4.3, the first version supporting GLES3. +# android-21 = Android 5.1, the first version with SO_REUSEPORT defined. +APP_PLATFORM=android-21 + # Specify architectures to compile, 'all' or 'y' to compile for all architectures. # Available architectures: armeabi armeabi-v7a x86 mips arm64-v8a MultiABI='armeabi-v7a' diff --git a/project/jni/application/ninslash/src b/project/jni/application/ninslash/src index 85fd31e23..20be74bc6 160000 --- a/project/jni/application/ninslash/src +++ b/project/jni/application/ninslash/src @@ -1 +1 @@ -Subproject commit 85fd31e23ac6bfc79e74f6ec8a2fbd6e5047b03c +Subproject commit 20be74bc6dc9625915d1db6c13ff8805865d4c68