diff --git a/changeAppSettings.sh b/changeAppSettings.sh index beebe5a7e..d5bb07dda 100755 --- a/changeAppSettings.sh +++ b/changeAppSettings.sh @@ -146,11 +146,13 @@ echo "# Application user-visible version name (string)" >> AndroidAppSettings.cf echo AppVersionName=\"$AppVersionName\" >> AndroidAppSettings.cfg echo >> AndroidAppSettings.cfg echo "# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...'" >> AndroidAppSettings.cfg -echo "# If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu" >> AndroidAppSettings.cfg +echo "# If you'll start Description with '!' symbol it will be enabled by default, '!!' will also hide the entry from the menu, so it cannot be disabled" >> AndroidAppSettings.cfg echo "# If the URL in in the form ':dir/file.dat:http://URL/' it will be downloaded as binary BLOB to the application dir and not unzipped" >> AndroidAppSettings.cfg -echo "# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir -" >> AndroidAppSettings.cfg -echo "# these files are put inside .apk package by build system" >> AndroidAppSettings.cfg -echo "# You can specify Google Play expansion files in the form 'obb:main.12345' or 'obb:patch.12345' where 12345 is the app version, first associated with the file" >> AndroidAppSettings.cfg +echo "# If the URL does not contain 'http://' or 'https://', it is treated as file from 'project/jni/application/src/AndroidData' dir -" >> AndroidAppSettings.cfg +echo "# these files are put inside .apk package by the build system" >> AndroidAppSettings.cfg +echo "# You can specify Google Play expansion files in the form 'obb:main.12345' or 'obb:patch.12345' where 12345 is the app version for obb file" >> AndroidAppSettings.cfg +echo "# You can use .zip.xz archives for better compression, but you need to add 'lzma' to CompiledLibraries" >> AndroidAppSettings.cfg +echo "# Generate .zip.xz files like this: zip -0 -r data.zip your-data/* ; xz -8 data.zip" >> AndroidAppSettings.cfg echo AppDataDownloadUrl=\"$AppDataDownloadUrl\" >> AndroidAppSettings.cfg echo >> AndroidAppSettings.cfg echo "# Reset SDL config when updating application to the new version (y) / (n)" >> AndroidAppSettings.cfg @@ -393,7 +395,7 @@ 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-16 = Android 4.1, the earliest supported version in NDK r18." >> 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 @@ -740,7 +742,7 @@ for KEY in $RedefinedKeysFourthGamepad; do done if [ "$APP_PLATFORM" = "" ]; then - APP_PLATFORM=android-18 + APP_PLATFORM=android-16 fi if [ "$MultiABI" = "y" ] ; then diff --git a/project/app/build-template.gradle b/project/app/build-template.gradle index ed6ba96df..c659e53d5 100644 --- a/project/app/build-template.gradle +++ b/project/app/build-template.gradle @@ -1,14 +1,13 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 26 - buildToolsVersion "26.0.0" + compileSdkVersion 28 + buildToolsVersion "28.0.2" defaultConfig { applicationId "net.olofson.ballfield" - minSdkVersion 9 - minSdkVersion 14 // ==GOOGLEPLAYGAMESERVICES== - targetSdkVersion 26 + minSdkVersion 16 // Android-15 and older is not supported by NDK r18 anymore + targetSdkVersion 28 } buildTypes { diff --git a/project/jni/SettingsTemplate.mk b/project/jni/SettingsTemplate.mk index 6dd1311c8..de9c69bfb 100644 --- a/project/jni/SettingsTemplate.mk +++ b/project/jni/SettingsTemplate.mk @@ -67,4 +67,4 @@ SDL_VERSION := 1.2 # Latest GCC got better LTO support NDK_TOOLCHAIN_VERSION := clang -APP_PLATFORM := android-18 +APP_PLATFORM := android-16 diff --git a/project/jni/application/ballfield/AndroidAppSettings.cfg b/project/jni/application/ballfield/AndroidAppSettings.cfg index d0e4a7024..9f00da799 100644 --- a/project/jni/application/ballfield/AndroidAppSettings.cfg +++ b/project/jni/application/ballfield/AndroidAppSettings.cfg @@ -13,11 +13,13 @@ AppVersionCode=101 AppVersionName="1.01" # Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...' -# If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu +# If you'll start Description with '!' symbol it will be enabled by default, '!!' will also hide the entry from the menu, so it cannot be disabled # If the URL in in the form ':dir/file.dat:http://URL/' it will be downloaded as binary BLOB to the application dir and not unzipped -# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir - -# these files are put inside .apk package by build system -# You can specify Google Play expansion files in the form 'obb:main.12345' or 'obb:patch.12345' where 12345 is the app version, first associated with the file +# If the URL does not contain 'http://' or 'https://', it is treated as file from 'project/jni/application/src/AndroidData' dir - +# these files are put inside .apk package by the build system +# You can specify Google Play expansion files in the form 'obb:main.12345' or 'obb:patch.12345' where 12345 is the app version for obb file +# You can use .zip.xz archives for better compression, but you need to add 'lzma' to CompiledLibraries +# Generate .zip.xz files like this: zip -0 -r data.zip your-data/* ; xz -8 data.zip AppDataDownloadUrl="!!Game data is 1 Mb|ballfield3.zip" # Reset SDL config when updating application to the new version (y) / (n) @@ -260,7 +262,7 @@ AppMinimumRAM=0 NDK_TOOLCHAIN_VERSION=clang # Android platform version. -# android-9 = Android 2.3, the earliest supported version. +# android-16 = Android 4.1, the earliest supported version for NDK r18. # android-18 = Android 4.3, the first version supporting GLES3. # android-21 = Android 5.1, the first version with SO_REUSEPORT defined. APP_PLATFORM= diff --git a/readme.txt b/readme.txt index 91e03bcea..46cac66c1 100644 --- a/readme.txt +++ b/readme.txt @@ -1,7 +1,7 @@ -This is SDL 1.2 and 1.3 ported to Google Android (also bunch of other libs included). +This is SDL 1.2 ported to Google Android (also bunch of other libs included). Sources or patches of the individual games are in the directory project/jni/application. -The libsdl.org now has an official SDL 1.3/2.0 Android port, which is more recent and +The libsdl.org now has an official SDL 2 Android port, which is more recent and better suited for creating new applications from scratch, this port is focused mainly on SDL 1.2 and compiling existing applications, it's up to you to decide which port is better. Also this port is developed very slowly, although the same is true for an official port. @@ -11,12 +11,11 @@ Installation ============ Install latest Android SDK and NDK from http://developer.android.com/index.html -Add both to your PATH env variable 0 you should be able to run commands 'ndk-build' and 'android'. -You will need to install Gradle also. +Add NDK to your PATH env variable - you should be able to run commands 'ndk-build'. it is recommended to install OpenJDK and its development files. On RPM based distros they are usually called java-x.x.x-openjdk and java-x.x.x-openjdk-devel. On Debian or Ubuntu you install them like this: sudo apt-get install openjdk-8-jdk ant -The application will run on Android 2.3 and above, but will use features from Android 6.0 if available. +The application will run on Android 4.1 and above, but will use features from Android 9 if available. The most supported environment for this port is Linux, MacOs should be okay too. If you're developing under Windows, you will need to install some Linux environment, such as Bash shell on Windows 10, or Portable Ubuntu, then install Linux toolchain on it. @@ -61,7 +60,7 @@ Note that GL ES is NOT pure OpenGL - there are no glBegin() and glEnd() call and and generally it will take a lot of effort to port OpenGL application to GL ES. -Licensing issues when using gradle +Licensing issues when using gradle ================================== cd into android-sdk-linux/tools/bin