Allow to create x86_64 android package.

64-bit packages will be required by google.
This commit is contained in:
Deve 2018-03-18 21:56:36 +01:00
parent 203d045485
commit 900beae4b2
2 changed files with 61 additions and 35 deletions

View File

@ -44,13 +44,12 @@ and extract it to stk-code/lib. It contains sources of libraries that are used
in STK, but are not availiable in stk-code repository (curl, freetype, openal).
You need also Android SDK for android-19 platform (the API for Android 4.4) and
Android NDK. Note that NDK >= r15b is atm. not supported. Version r12b is
Android NDK. Note that NDK >= r15 is atm. not supported. Version r12b is
strongly recommended, because it's known that it works without issues.
You need to create proper "android-sdk" and "android-ndk" symlinks in the
directory with Android project, so that the compilation script will have access
to the SDK and NDK. These paths can be also set in SDK_PATH and NDK_PATH
environmental variables.
to the SDK and NDK.
Before running the compilation, run the generate_assets script, so that
selected assets will be copied to "assets" directory, and then included in the
@ -67,22 +66,6 @@ If the assets directory is already prepared, you can run "./make.sh" command to
build the project and create an apk file. Note that all arguments are passed to
the make command, so that you can run "./make.sh -j5" for multi-threaded build.
If you want to prepare a package for particular architecture, you can choose it
by setting the COMPILE_ARCH environmental variable. At this stage, supported
architectures are "armv7", "x86" and "aarch64". The default is "armv7".
You can choose build type by setting BUILD_TYPE environment variable to "debug"
or "release". The default is debug build. Note that if you choose release build,
you have to manually sign the apk with your key and run zipalign.
Additionally you can choose the build tool by setting BUILD_TOOL environment
variable to "gradle" or "ant". Note that ant has been already removed from
Android SDK, so you have to use SDK <= 25.2.5 for building with ant. By default
the BUILD_TOOL is set to "gradle".
You can override the SDK build-tools version by setting the BUILD_TOOLS_VER
environment variable.
Basically if all dependencies are installed in the system, it should be enough
to just run:
@ -93,6 +76,33 @@ to just run:
--------------------------------------------------------------------------------
ENVIRONMENT VARIABLES
--------------------------------------------------------------------------------
COMPILE_ARCH - Allows to choose CPU architecture for which the package will
be compiled.
Possible values: armv7, aarch64, x86, x86_64.
Default is: armv7.
BUILD_TYPE - Allows to set build type.
Possible values: debug, release, beta.
Default is: debug.
BUILD_TOOL - Allows to choose a tool that is used for creating package.
Note that ant has been already removed from Android SDK, so
you have to use SDK <= 25.2.5 for building with ant.
Possible values: ant, gradle.
Default is: gradle.
BUILD_TOOLS_VER - Allows to override the SDK build-tools version.
SDK_PATH - Path to SDK directory
NDK_PATH - Path to NDK directory
--------------------------------------------------------------------------------
RELEASE BUILD
--------------------------------------------------------------------------------

View File

@ -26,6 +26,14 @@ export MIN_SDK_VERSION_ARMV7=19
export TARGET_SDK_VERSION_ARMV7=21
export COMPILE_SDK_VERSION_ARMV7=21
export NDK_ABI_AARCH64=arm64-v8a
export ARCH_AARCH64=arm64
export HOST_AARCH64=aarch64-linux-android
export NDK_PLATFORM_AARCH64=android-21
export MIN_SDK_VERSION_AARCH64=21
export TARGET_SDK_VERSION_AARCH64=21
export COMPILE_SDK_VERSION_AARCH64=21
export NDK_ABI_X86=x86
export ARCH_X86=x86
export HOST_X86=i686-linux-android
@ -34,13 +42,13 @@ export MIN_SDK_VERSION_X86=19
export TARGET_SDK_VERSION_X86=21
export COMPILE_SDK_VERSION_X86=21
export NDK_ABI_AARCH64=arm64-v8a
export ARCH_AARCH64=arm64
export HOST_AARCH64=aarch64-linux-android
export NDK_PLATFORM_AARCH64=android-21
export MIN_SDK_VERSION_AARCH64=21
export TARGET_SDK_VERSION_AARCH64=21
export COMPILE_SDK_VERSION_AARCH64=21
export NDK_ABI_X86_64=x86_64
export ARCH_X86_64=x86_64
export HOST_X86_64=x86_64-linux-android
export NDK_PLATFORM_X86_64=android-21
export MIN_SDK_VERSION_X86_64=21
export TARGET_SDK_VERSION_X86_64=21
export COMPILE_SDK_VERSION_X86_64=21
export APP_NAME_RELEASE="SuperTuxKart"
export PACKAGE_NAME_RELEASE="org.supertuxkart.stk"
@ -105,14 +113,6 @@ if [ "$COMPILE_ARCH" = "armv7" ]; then
export MIN_SDK_VERSION=$MIN_SDK_VERSION_ARMV7
export TARGET_SDK_VERSION=$TARGET_SDK_VERSION_ARMV7
export COMPILE_SDK_VERSION=$COMPILE_SDK_VERSION_ARMV7
elif [ "$COMPILE_ARCH" = "x86" ]; then
export NDK_PLATFORM=$NDK_PLATFORM_X86
export NDK_ABI=$NDK_ABI_X86
export ARCH=$ARCH_X86
export HOST=$HOST_X86
export MIN_SDK_VERSION=$MIN_SDK_VERSION_X86
export TARGET_SDK_VERSION=$TARGET_SDK_VERSION_X86
export COMPILE_SDK_VERSION=$COMPILE_SDK_VERSION_X86
elif [ "$COMPILE_ARCH" = "aarch64" ]; then
export NDK_PLATFORM=$NDK_PLATFORM_AARCH64
export NDK_ABI=$NDK_ABI_AARCH64
@ -121,9 +121,25 @@ elif [ "$COMPILE_ARCH" = "aarch64" ]; then
export MIN_SDK_VERSION=$MIN_SDK_VERSION_AARCH64
export TARGET_SDK_VERSION=$TARGET_SDK_VERSION_AARCH64
export COMPILE_SDK_VERSION=$COMPILE_SDK_VERSION_AARCH64
elif [ "$COMPILE_ARCH" = "x86" ]; then
export NDK_PLATFORM=$NDK_PLATFORM_X86
export NDK_ABI=$NDK_ABI_X86
export ARCH=$ARCH_X86
export HOST=$HOST_X86
export MIN_SDK_VERSION=$MIN_SDK_VERSION_X86
export TARGET_SDK_VERSION=$TARGET_SDK_VERSION_X86
export COMPILE_SDK_VERSION=$COMPILE_SDK_VERSION_X86
elif [ "$COMPILE_ARCH" = "x86_64" ]; then
export NDK_PLATFORM=$NDK_PLATFORM_X86_64
export NDK_ABI=$NDK_ABI_X86_64
export ARCH=$ARCH_X86_64
export HOST=$HOST_X86_64
export MIN_SDK_VERSION=$MIN_SDK_VERSION_X86_64
export TARGET_SDK_VERSION=$TARGET_SDK_VERSION_X86_64
export COMPILE_SDK_VERSION=$COMPILE_SDK_VERSION_X86_64
else
echo "Unknow COMPILE_ARCH: $COMPILE_ARCH. Possible values are: " \
"armv7, aarch64, x86"
"armv7, aarch64, x86, x86_64"
exit
fi