mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
[build] Add -debug suffix to KODEBUG builds (#3439)
This commit is contained in:
3
Makefile
3
Makefile
@@ -17,6 +17,9 @@ else ifeq ($(TARGET), pocketbook)
|
||||
endif
|
||||
|
||||
MACHINE=$(shell PATH=$(PATH) $(CC) -dumpmachine 2>/dev/null)
|
||||
ifdef KODEBUG
|
||||
MACHINE:=$(MACHINE)-debug
|
||||
endif
|
||||
|
||||
ifdef TARGET
|
||||
DIST:=$(TARGET)
|
||||
|
||||
2
base
2
base
Submodule base updated: 6b5aeff49b...cd96fc105b
13
kodev
13
kodev
@@ -92,8 +92,11 @@ EOL
|
||||
}
|
||||
|
||||
function setup_env() {
|
||||
files=$(ls -d ./koreader-emulator-*/koreader)
|
||||
assert_ret_zero $? "Emulator not found, please build it first."
|
||||
if [ -n "${KODEBUG+x}" ]; then
|
||||
KODEBUG_SUFFIX=-debug
|
||||
fi
|
||||
files=$(ls -d ./koreader-emulator-*${KODEBUG_SUFFIX}/koreader)
|
||||
assert_ret_zero $? "Emulator not found. Please build it first."
|
||||
export EMU_DIR=${files[0]}
|
||||
}
|
||||
|
||||
@@ -503,14 +506,18 @@ TARGET:
|
||||
if [ ! ${no_build} ]; then
|
||||
echo "[*] Building KOReader for Android…"
|
||||
kodev-release --ignore-translation android
|
||||
assert_ret_zero $?
|
||||
fi
|
||||
# clear logcat to get rid of useless cruft
|
||||
adb logcat -c
|
||||
# uninstall existing package to make sure *everything* is gone from memory
|
||||
# no assert_ret_zero; uninstall is allowed to fail if there's nothing to uninstall
|
||||
adb uninstall "org.koreader.launcher"
|
||||
adb install "koreader-android-${ANDROID_FULL_ARCH_APK}-${VERSION}.apk"
|
||||
adb install "koreader-android-${ANDROID_FULL_ARCH_APK}${KODEBUG_SUFFIX}-${VERSION}.apk"
|
||||
assert_ret_zero $?
|
||||
# there's no adb run so we do this…
|
||||
adb shell monkey -p org.koreader.launcher -c android.intent.category.LAUNCHER 1
|
||||
assert_ret_zero $?
|
||||
adb logcat
|
||||
} || echo "Failed to find adb in PATH to interact with Android device."
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user