mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
kodev: two small fixes (#3575)
- kodev-run: fix use of $args - kodev-build: build the emulator in debug mode, for consistency with kodev-run - kodev build: add --debug / --no-debug options
This commit is contained in:
21
kodev
21
kodev
@@ -125,6 +125,8 @@ usage: build <OPTIONS> <TARGET>
|
||||
OPTIONS:
|
||||
|
||||
-v, --verbose Build in verbose mode.
|
||||
--debug include debugging symbols (default for emulator)
|
||||
--no-debug no debugging symbols (default for target devices)
|
||||
|
||||
TARGET:
|
||||
${SUPPORTED_TARGETS}"
|
||||
@@ -140,6 +142,14 @@ ${SUPPORTED_TARGETS}"
|
||||
echo "${BUILD_HELP_MSG}"
|
||||
exit 0
|
||||
;;
|
||||
--no-debug)
|
||||
export KODEBUG=
|
||||
KODEBUG_NO_DEFAULT=1
|
||||
;;
|
||||
--debug)
|
||||
export KODEBUG=1
|
||||
KODEBUG_NO_DEFAULT=1
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: unknown option \"$PARAM\""
|
||||
echo "${BUILD_HELP_MSG}"
|
||||
@@ -207,6 +217,10 @@ ${SUPPORTED_TARGETS}"
|
||||
assert_ret_zero $?
|
||||
;;
|
||||
*)
|
||||
if [ -z "${KODEBUG_NO_DEFAULT+x}" ]; then # no explicit --debug / --no-debug
|
||||
# builds a debug build by default, like kodev-run
|
||||
export KODEBUG=1
|
||||
fi
|
||||
make
|
||||
assert_ret_zero $? "Failed to build emulator! Try run with -v for more information."
|
||||
setup_env
|
||||
@@ -546,14 +560,14 @@ TARGET:
|
||||
CATCHSEGV=$(which catchsegv)
|
||||
fi
|
||||
|
||||
KOREADER_COMMAND="${CATCHSEGV} ./reader.lua -d ${args}"
|
||||
KOREADER_COMMAND="${CATCHSEGV} ./reader.lua -d"
|
||||
|
||||
if [ ! -z "${gdb}" ]; then
|
||||
KOREADER_COMMAND="${gdb} ./luajit reader.lua -d ${args}"
|
||||
KOREADER_COMMAND="${gdb} ./luajit reader.lua -d"
|
||||
fi
|
||||
|
||||
if [ ! -z "${valgrind}" ]; then
|
||||
KOREADER_COMMAND="${valgrind} ./luajit reader.lua -d ${args}"
|
||||
KOREADER_COMMAND="${valgrind} ./luajit reader.lua -d"
|
||||
fi
|
||||
|
||||
echo "[*] Running KOReader with arguments: $*..."
|
||||
@@ -564,6 +578,7 @@ TARGET:
|
||||
args="$*"
|
||||
[[ $args != /* ]] && args="${CURDIR}/${args}"
|
||||
fi
|
||||
KOREADER_COMMAND="$KOREADER_COMMAND ${args}"
|
||||
|
||||
RETURN_VALUE=85
|
||||
while [ $RETURN_VALUE -eq 85 ]; do
|
||||
|
||||
Reference in New Issue
Block a user