diff options
Diffstat (limited to 'package/linux/dfhack')
| -rwxr-xr-x | package/linux/dfhack | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/package/linux/dfhack b/package/linux/dfhack index 3b6708f9..d5d22187 100755 --- a/package/linux/dfhack +++ b/package/linux/dfhack @@ -10,31 +10,31 @@ cd "${DF_DIR}" export SDL_DISABLE_LOCK_KEYS=1 # Work around for bug in Debian/Ubuntu SDL patch. #export SDL_VIDEO_CENTERED=1 # Centre the screen. Messes up resizing. -export LD_PRELOAD=./libdfhack.so - case "$1" in -g | --gdb) shift - gdb ./libs/Dwarf_Fortress $* + echo "set environment LD_PRELOAD=./libdfhack.so" > gdbcmd.tmp + gdb -x gdbcmd.tmp ./libs/Dwarf_Fortress $* + rm gdbcmd.tmp ret=$? ;; -h | --helgrind) shift - valgrind --tool=helgrind --log-file=helgrind.log ./libs/Dwarf_Fortress $* + LD_PRELOAD=./libdfhack.so valgrind --tool=helgrind --log-file=helgrind.log ./libs/Dwarf_Fortress $* ret=$? ;; -v | --valgrind) shift - valgrind --log-file=valgrind.log ./libs/Dwarf_Fortress $* + LD_PRELOAD=./libdfhack.so valgrind --log-file=valgrind.log ./libs/Dwarf_Fortress $* ret=$? ;; *) - ./libs/Dwarf_Fortress $* + LD_PRELOAD=./libdfhack.so ./libs/Dwarf_Fortress $* ret=$? ;; esac # Reset terminal to sane state in case of a crash -reset -I +reset exit $ret |
