From 4f8198c9f1d91d11279ec89e0f24ad4a33bab159 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 12 Sep 2010 19:45:58 +0200 Subject: [PATCH] update OS X startup scripts to force a 32bit arch on SDL and OS X 10.5 or lower --- .../Xonotic-SDL.app/Contents/MacOS/xonotic-osx-sdl | 14 +++++++++++++- .../osx/Xonotic.app/Contents/MacOS/xonotic-osx-agl | 4 +++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/misc/buildfiles/osx/Xonotic-SDL.app/Contents/MacOS/xonotic-osx-sdl b/misc/buildfiles/osx/Xonotic-SDL.app/Contents/MacOS/xonotic-osx-sdl index 0620633f..6a204f0e 100755 --- a/misc/buildfiles/osx/Xonotic-SDL.app/Contents/MacOS/xonotic-osx-sdl +++ b/misc/buildfiles/osx/Xonotic-SDL.app/Contents/MacOS/xonotic-osx-sdl @@ -3,4 +3,16 @@ export DYLD_LIBRARY_PATH="${0%/*}" # same dir as the executable -exec "$0"-bin "$@" -notexturenonpoweroftwo +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 diff --git a/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/xonotic-osx-agl b/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/xonotic-osx-agl index 0620633f..baa88281 100755 --- a/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/xonotic-osx-agl +++ b/misc/buildfiles/osx/Xonotic.app/Contents/MacOS/xonotic-osx-agl @@ -3,4 +3,6 @@ export DYLD_LIBRARY_PATH="${0%/*}" # same dir as the executable -exec "$0"-bin "$@" -notexturenonpoweroftwo +set -- "$0"-bin "$@" -notexturenonpoweroftwo + +exec "$@" -- 2.39.2