We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7088efa commit 8e95702Copy full SHA for 8e95702
1 file changed
src/xr_3da/xr_3da.sh
@@ -0,0 +1,30 @@
1
+#!/bin/sh
2
+
3
+SCRIPT_NAME=$(basename "$0")
4
+GAMEROOT=$(dirname -- "$(readlink -f -- "$0")")
5
+if [ -z "$GAMEEXE" ]; then
6
+ GAMEEXE=${SCRIPT_NAME%.*} # strip extension(not required, but do anyway)
7
+fi
8
9
+#determine platform
10
+UNAME=$(uname)
11
+if [ "$UNAME" = "Darwin" ]; then
12
+ # prepend our lib path to DYLD_LIBRARY_PATH
13
+ export DYLD_LIBRARY_PATH=${GAMEROOT}:$DYLD_LIBRARY_PATH
14
+else
15
+ # prepend our lib path to LD_LIBRARY_PATH
16
+ export LD_LIBRARY_PATH=${GAMEROOT}:$LD_LIBRARY_PATH
17
18
19
+# and launch the game
20
+if ! cd "$GAMEROOT"; then
21
+ echo "Failed cd to $GAMEROOT"
22
+ exit
23
24
25
+STATUS=42
26
+while [ $STATUS -eq 42 ]; do
27
+ ${DEBUGGER} "${GAMEROOT}"/"${GAMEEXE}" "$@"
28
+ STATUS=$?
29
+done
30
+exit $STATUS
0 commit comments