]> git.xonotic.org Git - xonotic/xonotic.git/blob - misc/buildfiles/osx/Xonotic.app/Contents/MacOS/xonotic-osx-sdl
Fix macOS SDL2 framework permissions
[xonotic/xonotic.git] / misc / buildfiles / osx / Xonotic.app / Contents / MacOS / xonotic-osx-sdl
1 #!/bin/sh
2
3 # if we ever want to remove this script, install_name_tool can be used to replace the DYLD_LIBRARY_PATH hack
4 export DYLD_LIBRARY_PATH="${0%/*}"
5         # same dir as the executable
6
7 set -- "$0"-bin "$@" -notexturenonpoweroftwo
8
9 case "`sw_vers -productVersion`" in
10         # OSX Lion up to 10.7.2 has problems with SDL and running fullscreen, hence we force windowed mode
11         10.7.[0-2])
12                 exec "$@" +vid_fullscreen 0
13                 ;;
14         # shell pattern for "10.6 and higher"
15         10.[6-9]*|10.[1-5][0-9]*|1[1-9]*|[2-9]*)
16                 # no workaround needed on 10.6+
17                 exec "$@"
18                 ;;
19         *)
20                 # need to force a 32bit arch on 10.5 and below
21                 exec arch -arch i386 -arch ppc "$@"
22                 ;;
23 esac