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
|
endif
|
||||||
|
|
||||||
MACHINE=$(shell PATH=$(PATH) $(CC) -dumpmachine 2>/dev/null)
|
MACHINE=$(shell PATH=$(PATH) $(CC) -dumpmachine 2>/dev/null)
|
||||||
|
ifdef KODEBUG
|
||||||
|
MACHINE:=$(MACHINE)-debug
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef TARGET
|
ifdef TARGET
|
||||||
DIST:=$(TARGET)
|
DIST:=$(TARGET)
|
||||||
|
|||||||
2
base
2
base
Submodule base updated: 6b5aeff49b...cd96fc105b
13
kodev
13
kodev
@@ -92,8 +92,11 @@ EOL
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setup_env() {
|
function setup_env() {
|
||||||
files=$(ls -d ./koreader-emulator-*/koreader)
|
if [ -n "${KODEBUG+x}" ]; then
|
||||||
assert_ret_zero $? "Emulator not found, please build it first."
|
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]}
|
export EMU_DIR=${files[0]}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -503,14 +506,18 @@ TARGET:
|
|||||||
if [ ! ${no_build} ]; then
|
if [ ! ${no_build} ]; then
|
||||||
echo "[*] Building KOReader for Android…"
|
echo "[*] Building KOReader for Android…"
|
||||||
kodev-release --ignore-translation android
|
kodev-release --ignore-translation android
|
||||||
|
assert_ret_zero $?
|
||||||
fi
|
fi
|
||||||
# clear logcat to get rid of useless cruft
|
# clear logcat to get rid of useless cruft
|
||||||
adb logcat -c
|
adb logcat -c
|
||||||
# uninstall existing package to make sure *everything* is gone from memory
|
# 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 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…
|
# there's no adb run so we do this…
|
||||||
adb shell monkey -p org.koreader.launcher -c android.intent.category.LAUNCHER 1
|
adb shell monkey -p org.koreader.launcher -c android.intent.category.LAUNCHER 1
|
||||||
|
assert_ret_zero $?
|
||||||
adb logcat
|
adb logcat
|
||||||
} || echo "Failed to find adb in PATH to interact with Android device."
|
} || echo "Failed to find adb in PATH to interact with Android device."
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user