summaryrefslogtreecommitdiff
path: root/package/linux
diff options
context:
space:
mode:
authorMatthew Cline2011-07-12 17:25:27 -0700
committerMatthew Cline2011-07-12 17:25:27 -0700
commita30a4a27202807f5d51b336265b2f75ffb237381 (patch)
treef58116848ab8d34d1fada9ed9b69d4ecd04da89e /package/linux
parentb5a6087da599f85ef1ab663358aa06463948d653 (diff)
downloaddfhack-a30a4a27202807f5d51b336265b2f75ffb237381.tar.gz
dfhack-a30a4a27202807f5d51b336265b2f75ffb237381.tar.bz2
dfhack-a30a4a27202807f5d51b336265b2f75ffb237381.tar.xz
CMake linux: copy LD_PRELOAD script
Copy package/linux/dfhack to the games directory; it's the same as the normal df script, but sets LD_PRELOAD properly. Also, CMAkeLists.txt now checks to see that the output directory is set to the game directory, and fatally fails if it isn't.
Diffstat (limited to 'package/linux')
-rwxr-xr-xpackage/linux/dfhack13
1 files changed, 13 insertions, 0 deletions
diff --git a/package/linux/dfhack b/package/linux/dfhack
new file mode 100755
index 00000000..8484a3e5
--- /dev/null
+++ b/package/linux/dfhack
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# NOTE: This is dfhack's modification of the normal invocation script,
+# changed to properly set LD_PRELOAD so as to run DFHACK.
+
+DF_DIR=$(dirname "$0")
+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
+
+./libs/Dwarf_Fortress $* # Go, go, go! :)