2017-01-27 16:43:49 -05:00
|
|
|
================================================================================
|
|
|
|
|
|
|
|
SUPERTUXKART
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
SYSTEM REQUIREMENTS
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
To run SuperTuxKart on Android, you need a device that meets following
|
|
|
|
requirements:
|
|
|
|
|
|
|
|
- Android 4.4 or later
|
|
|
|
- Processor compatible with armv7 or x86
|
|
|
|
- GPU that supports OpenGL ES 3.0
|
|
|
|
- 1 GB RAM (STK uses ~150 MB in minimal configuration)
|
|
|
|
- 300 MB of free space on internal storage
|
|
|
|
- Touch screen or external keyboard
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
COMPILATION
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
The build scripts are designed to run under linux. They may work under cygwin
|
|
|
|
after some tweaks, but atm. only linux is supported.
|
|
|
|
|
|
|
|
Dependencies list (may be incomplete):
|
|
|
|
|
2019-06-04 16:28:24 -04:00
|
|
|
autoconf, automake, make, python, gradle, imagemagick, cmake,
|
2018-06-19 15:40:26 -04:00
|
|
|
vorbis-tools, pngquant
|
2017-01-27 16:43:49 -05:00
|
|
|
|
|
|
|
Additionally some dependencies for optimize_data script:
|
|
|
|
|
|
|
|
advancecomp, libjpeg-progs, optipng
|
|
|
|
|
|
|
|
Before compilation you must download the package with dependencies from:
|
|
|
|
https://github.com/supertuxkart/dependencies
|
|
|
|
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
|
2020-02-28 12:18:09 -05:00
|
|
|
Android NDK. Version r20 is recommended, because it's known that it works
|
|
|
|
without issues.
|
2017-01-27 16:43:49 -05:00
|
|
|
|
|
|
|
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
|
2018-03-18 16:56:36 -04:00
|
|
|
to the SDK and NDK.
|
2017-01-27 16:43:49 -05:00
|
|
|
|
|
|
|
Before running the compilation, run the generate_assets script, so that
|
|
|
|
selected assets will be copied to "assets" directory, and then included in the
|
|
|
|
apk file.
|
|
|
|
|
|
|
|
You can select different karts and tracks by setting KARTS and TRACKS variables
|
|
|
|
in the generate_assets.sh script at the beginning of file.
|
|
|
|
|
|
|
|
When you are creating the assets directory manually, note that the
|
|
|
|
directories.txt file is urgently needed and it is used by the application for
|
|
|
|
extracting assets.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
Basically if all dependencies are installed in the system, it should be enough
|
|
|
|
to just run:
|
|
|
|
|
|
|
|
export SDK_PATH=/path/to/your/android/sdk
|
|
|
|
export NDK_PATH=/path/to/your/android/ndk
|
|
|
|
./generate_assets.sh
|
|
|
|
./make.sh -j5
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-18 16:56:36 -04:00
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
ENVIRONMENT VARIABLES
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
2019-06-04 19:04:18 -04:00
|
|
|
COMPILE_ARCH - Allows one to choose CPU architecture for which the package will
|
2018-03-18 16:56:36 -04:00
|
|
|
be compiled.
|
|
|
|
Possible values: armv7, aarch64, x86, x86_64.
|
|
|
|
Default is: armv7.
|
|
|
|
|
2019-06-04 19:04:18 -04:00
|
|
|
BUILD_TYPE - Allows one to set build type.
|
2018-03-18 16:56:36 -04:00
|
|
|
Possible values: debug, release, beta.
|
|
|
|
Default is: debug.
|
|
|
|
|
|
|
|
BUILD_TOOLS_VER - Allows to override the SDK build-tools version.
|
|
|
|
|
|
|
|
SDK_PATH - Path to SDK directory
|
|
|
|
|
|
|
|
NDK_PATH - Path to NDK directory
|
|
|
|
|
2018-04-18 18:25:22 -04:00
|
|
|
PROJECT_VERSION - Set Supertuxkart version number, for example "0.9.3" or
|
2018-11-15 15:43:49 -05:00
|
|
|
"git20170409" or whatever. The version must match with file
|
|
|
|
assets/data/supertuxkart.$PROJECT_VERSION
|
|
|
|
and that file must exist, because it is used for extracting
|
|
|
|
and loading game data.
|
2018-04-18 18:25:22 -04:00
|
|
|
Default is: git.
|
|
|
|
|
|
|
|
PROJECT_CODE - Set Supertuxkart version code that is used in the manifest
|
|
|
|
file.
|
|
|
|
Default is: 1.
|
|
|
|
|
2018-03-18 16:56:36 -04:00
|
|
|
|
|
|
|
|
2017-04-09 15:48:15 -04:00
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
RELEASE BUILD
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
Making a release build is similar to typical compilation, but there are few
|
|
|
|
additional things to do.
|
|
|
|
|
2018-04-18 18:25:22 -04:00
|
|
|
You have to set PROJECT_VERSION variable. This is important, because assets
|
|
|
|
manager in STK checks that value and detects if already extracted data files are
|
2017-04-09 15:48:15 -04:00
|
|
|
up to date. So that when you will install new STK version, this will force new
|
|
|
|
data extraction automatically.
|
|
|
|
|
2018-04-18 18:25:22 -04:00
|
|
|
The PROJECT_CODE variable typically should be set to a value higher than for
|
|
|
|
previous release, so that users will receive the upgrade.
|
2017-04-09 15:48:15 -04:00
|
|
|
|
|
|
|
Before compilation you have to set:
|
|
|
|
|
|
|
|
export BUILD_TYPE=release
|
|
|
|
|
2020-08-27 04:28:13 -04:00
|
|
|
It's also needed to set STK_STOREPASS, STK_KEYSTORE and STK_ALIAS environment
|
|
|
|
variables, so that the apk files can be signed.
|
|
|
|
|
2017-04-09 15:48:15 -04:00
|
|
|
and then you make standard compilation with:
|
|
|
|
|
|
|
|
./generate_assets.sh
|
2020-08-27 04:28:13 -04:00
|
|
|
./make.sh -j $(($(nproc) + 1))
|