]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/buildfiles/osx/Xonotic.app/Contents/MacOS/xonotic-osx-sdl
remove the -agl build
[xonotic/xonotic.git] / misc / buildfiles / osx / Xonotic.app / Contents / MacOS / xonotic-osx-sdl
diff --git a/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/xonotic-osx-sdl b/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/xonotic-osx-sdl
new file mode 100755 (executable)
index 0000000..6a204f0
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+export DYLD_LIBRARY_PATH="${0%/*}"
+       # same dir as the executable
+
+set -- "$0"-bin "$@" -notexturenonpoweroftwo
+
+case "`sw_vers -productVersion`" in
+       # shell pattern for "10.6 and higher"
+       10.[6-9]*|10.[1-5][0-9]*|1[1-9]*|[2-9]*)
+               # no workaround needed on 10.6+
+               exec "$@"
+               ;;
+       *)
+               # need to force a 32bit arch on 10.5 and below
+               exec arch -arch i386 -arch ppc "$@"
+               ;;
+esac