kodev: Add $ANDROID_ARCH to enable x86 build (#3353)

You'll still have to call it with `ANDROID_ARCH=x86 ./kodev build/release/run android`.

Don't forget to `./mk-luajit.sh clean` in luajit-launcher when changing architectures.

* Bump android-luajit-launcher
  This includes the fix for Android 8. Fixes #3126.
* Bump base
This commit is contained in:
Frans de Jonge
2017-10-13 21:43:58 +02:00
committed by GitHub
parent 561caadc5c
commit b4bb32254a
3 changed files with 15 additions and 4 deletions

2
base

Submodule base updated: 709ca9e1e0...f0cad8faa0

15
kodev
View File

@@ -3,6 +3,17 @@
CURDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
VERSION=$(git describe HEAD)
# Default Android build to arm.
ANDROID_ARCH=${ANDROID_ARCH:-arm}
if [ -z "${ANDROID_FULL_ARCH+x}" ]; then
if [ "$ANDROID_ARCH" = arm ]; then
ANDROID_FULL_ARCH_APK="${ANDROID_FULL_ARCH_APK:-arm-linux-androideabi}"
elif [ "$ANDROID_ARCH" = x86 ]; then
ANDROID_FULL_ARCH_APK="${ANDROID_FULL_ARCH_APK:-i686-linux-android}"
else
ANDROID_FULL_ARCH_APK="${ANDROID_ARCH}"
fi
fi
# Default to Android 4.0+; required for NDK 15 but with a custom NDK the strict minimum is 9.
NDKABI=${NDKABI:-14}
export NDKABI
@@ -165,7 +176,7 @@ ${SUPPORTED_TARGETS}"
export NDK="${CURDIR}/base/toolchain/android-ndk-r15c"
fi
fi
[ -e "${CURDIR}/base/toolchain/android-toolchain/bin/arm-linux-androideabi-gcc" ] || {
[ -e "${CURDIR}/base/toolchain/android-toolchain-${ANDROID_ARCH}/bin/" ] || {
{ [ -e "${NDK}" ] || make -C "${CURDIR}/base/toolchain" android-ndk; }
make android-toolchain
assert_ret_zero $?
@@ -449,7 +460,7 @@ TARGET:
adb logcat -c
# uninstall existing package to make sure *everything* is gone from memory
adb uninstall "org.koreader.launcher"
adb install "koreader-android-arm-linux-androideabi-${VERSION}.apk"
adb install "koreader-android-${ANDROID_FULL_ARCH_APK}-${VERSION}.apk"
# there's no adb run so we do this…
adb shell monkey -p org.koreader.launcher -c android.intent.category.LAUNCHER 1
adb logcat