diff --git a/build.sh b/build.sh index d46dded74..c88e8292e 100755 --- a/build.sh +++ b/build.sh @@ -70,11 +70,6 @@ if [ "$#" -gt 0 -a "$1" = "-h" ]; then exit 0 fi -[ -e project/local.properties ] || { - android update project -p project || exit 1 - rm -f project/src/Globals.java -} - NDK_TOOLCHAIN_VERSION=$GCCVER [ -z "$NDK_TOOLCHAIN_VERSION" ] && NDK_TOOLCHAIN_VERSION=4.9 @@ -95,6 +90,11 @@ else sed -i 's/android:debuggable="false"/android:debuggable="true"/g' project/AndroidManifest.xml fi +[ -e project/local.properties ] || { + android update project -p project -t android-23 || exit 1 + rm -f project/src/Globals.java +} + MYARCH=linux-x86_64 if [ -z "$NCPU" ]; then NCPU=4 diff --git a/project/jni/application/ninslash/readme.txt b/project/jni/application/ninslash/readme.txt index 7104071e5..545387b61 100644 --- a/project/jni/application/ninslash/readme.txt +++ b/project/jni/application/ninslash/readme.txt @@ -1,11 +1,8 @@ -Quick compilation guide for Debian/Ubuntu (Windows is not supported, MacOsX should be okay though): -Download SDL Git repo from https://github.com/pelya/commandergenius, -install latest Java, Android SDK, Android NDK, and "ant" tool (sudo apt-get install ant openjdk-8-jdk), -then launch commands: - git submodule update --init project/jni/application/ninslash/src - rm project/jni/application/src # ignore the error - ln -s ninslash project/jni/application/src - ./changeAppSettings.sh -a - android update project -p project -t android-23 - ./build.sh -That should do it. +To compile Android version: +1. Use Debian or Ubuntu or MacOsX. Windows is not supported. +2. Install Android SDK: https://developer.android.com/studio/index.html#downloads +3. Install Android NDK: https://developer.android.com/ndk/downloads/index.html +4. Install Java and Ant: sudo apt-get install ant openjdk-8-jdk build-essential +5. Download SDL Git repo: git clone https://github.com/pelya/commandergenius +6. git submodule update --init project/jni/application/ninslash/src +7. ./build.sh ninslash