mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
Make macOS Universal Bundle target 10.6 for x86 and x86_64
SDL 2.0.5 dropped support for macOS 10.5 so target 10.6 instead. The PPC build uses SDL 2.0.1 so it still targets 10.5. macOS 10.5 (x86, x86_64) should automatically run the PPC build using Rosetta. Revert MAN-AT-ARMS' change to SDL 2.0.8 SDL_platform.h that allowed targeting macOS 10.5 for the sake of PPC. It also incorrectly allowed x86 and x86_64 to target 10.5 as well. (Also macOS PPC uses separate headers now.)
This commit is contained in:
parent
92935df37b
commit
9a0ee67e04
4 changed files with 77 additions and 20 deletions
|
@ -83,10 +83,9 @@
|
|||
/* if not compiling for iOS */
|
||||
#undef __MACOSX__
|
||||
#define __MACOSX__ 1
|
||||
/* modified to 1050 for PPC Build*/
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
|
||||
# error SDL for Mac OS X only supports deploying on 10.5 and above.
|
||||
#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1050 */
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
|
||||
# error SDL for Mac OS X only supports deploying on 10.6 and above.
|
||||
#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */
|
||||
#endif /* TARGET_OS_IPHONE */
|
||||
#endif /* defined(__APPLE__) */
|
||||
|
||||
|
|
|
@ -283,7 +283,9 @@ fi
|
|||
cp code/libs/macosx/*.dylib "${BUILT_PRODUCTS_DIR}/${EXECUTABLE_FOLDER_PATH}"
|
||||
cp ${ICNSDIR}/${ICNS} "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$ICNS" || exit 1;
|
||||
echo -n ${PKGINFO} > "${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/PkgInfo" || exit 1;
|
||||
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
|
||||
|
||||
# create Info.Plist
|
||||
PLIST="<?xml version=\"1.0\" encoding=\"UTF-8\"?>
|
||||
<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
|
||||
<plist version=\"1.0\">
|
||||
<dict>
|
||||
|
@ -310,14 +312,44 @@ echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
|
|||
<key>CGDisableCoalescedUpdates</key>
|
||||
<true/>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>"
|
||||
|
||||
if [ -n "${MACOSX_DEPLOYMENT_TARGET_PPC}" ] || [ -n "${MACOSX_DEPLOYMENT_TARGET_X86}" ] || [ -n "${MACOSX_DEPLOYMENT_TARGET_X86_64}" ]; then
|
||||
PLIST="${PLIST}
|
||||
<key>LSMinimumSystemVersionByArchitecture</key>
|
||||
<dict>"
|
||||
|
||||
if [ -n "${MACOSX_DEPLOYMENT_TARGET_PPC}" ]; then
|
||||
PLIST="${PLIST}
|
||||
<key>ppc</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET_PPC}</string>"
|
||||
fi
|
||||
|
||||
if [ -n "${MACOSX_DEPLOYMENT_TARGET_X86}" ]; then
|
||||
PLIST="${PLIST}
|
||||
<key>i386</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET_X86}</string>"
|
||||
fi
|
||||
|
||||
if [ -n "${MACOSX_DEPLOYMENT_TARGET_X86_64}" ]; then
|
||||
PLIST="${PLIST}
|
||||
<key>x86_64</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET_X86_64}</string>"
|
||||
fi
|
||||
|
||||
PLIST="${PLIST}
|
||||
</dict>"
|
||||
fi
|
||||
|
||||
PLIST="${PLIST}
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>QUAKE III ARENA Copyright © 1999-2000 id Software, Inc. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
||||
" > "${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Info.plist"
|
||||
"
|
||||
echo -e "${PLIST}" > "${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Info.plist"
|
||||
|
||||
# action takes care of generating universal binaries if lipo is available
|
||||
# otherwise, it falls back to using a simple copy, expecting the first item in
|
||||
|
|
|
@ -37,12 +37,33 @@ if [ -d /Developer/SDKs/MacOSX10.5.sdk ]; then
|
|||
PPC_MACOSX_VERSION_MIN="10.5"
|
||||
fi
|
||||
|
||||
# SDL 2.0.5+ (x86, x86_64) only supports MacOSX 10.6 and later
|
||||
if [ -d /Developer/SDKs/MacOSX10.6.sdk ]; then
|
||||
X86_64_SDK=/Developer/SDKs/MacOSX10.6.sdk
|
||||
X86_64_CFLAGS="-isysroot /Developer/SDKs/MacOSX10.6.sdk"
|
||||
X86_64_MACOSX_VERSION_MIN="10.6"
|
||||
|
||||
X86_SDK=/Developer/SDKs/MacOSX10.6.sdk
|
||||
X86_CFLAGS="-isysroot /Developer/SDKs/MacOSX10.6.sdk"
|
||||
X86_MACOSX_VERSION_MIN="10.6"
|
||||
else
|
||||
# Don't try to compile with 10.5 version min
|
||||
X86_64_SDK=
|
||||
X86_SDK=
|
||||
fi
|
||||
# end SDL 2.0.5
|
||||
|
||||
if [ -z $X86_64_SDK ] || [ -z $X86_SDK ] || [ -z $PPC_SDK ]; then
|
||||
echo "\
|
||||
ERROR: This script is for building a Universal Binary. You cannot build
|
||||
for a different architecture unless you have the proper Mac OS X SDKs
|
||||
installed. If you just want to to compile for your own system run
|
||||
'make-macosx.sh' instead of this script."
|
||||
'make-macosx.sh' instead of this script.
|
||||
|
||||
In order to build a binary with maximum compatibility you must
|
||||
build on Mac OS X 10.6 and have the MacOSX10.5 and MacOSX10.6
|
||||
SDKs installed from the Xcode install disk Packages folder."
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -51,15 +72,6 @@ echo "Building X86 Client/Dedicated Server against \"$X86_SDK\""
|
|||
echo "Building PPC Client/Dedicated Server against \"$PPC_SDK\""
|
||||
echo
|
||||
|
||||
if [ "$X86_64_SDK" != "/Developer/SDKs/MacOSX10.5.sdk" ] || \
|
||||
[ "$X86_SDK" != "/Developer/SDKs/MacOSX10.5.sdk" ]; then
|
||||
echo "\
|
||||
WARNING: in order to build a binary with maximum compatibility you must
|
||||
build on Mac OS X 10.5 using Xcode 3.1 and have the MacOSX10.5
|
||||
SDKs installed from the Xcode install disk Packages folder."
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
# For parallel make on multicore boxes...
|
||||
NCPU=`sysctl -n hw.ncpu`
|
||||
|
||||
|
@ -89,4 +101,7 @@ echo
|
|||
|
||||
# use the following shell script to build a universal application bundle
|
||||
export MACOSX_DEPLOYMENT_TARGET="10.5"
|
||||
export MACOSX_DEPLOYMENT_TARGET_PPC="$PPC_MACOSX_VERSION_MIN"
|
||||
export MACOSX_DEPLOYMENT_TARGET_X86="$X86_MACOSX_VERSION_MIN"
|
||||
export MACOSX_DEPLOYMENT_TARGET_X86_64="$X86_64_MACOSX_VERSION_MIN"
|
||||
"./make-macosx-app.sh" release
|
||||
|
|
|
@ -43,10 +43,18 @@ unset ARCH_SDK
|
|||
unset ARCH_CFLAGS
|
||||
unset ARCH_MACOSX_VERSION_MIN
|
||||
|
||||
if [ -d /Developer/SDKs/MacOSX10.5.sdk ]; then
|
||||
# SDL 2.0.1 (ppc) supports MacOSX 10.5
|
||||
# SDL 2.0.5+ (x86, x86_64) supports MacOSX 10.6 and later
|
||||
if [ $BUILDARCH = "ppc" ]; then
|
||||
if [ -d /Developer/SDKs/MacOSX10.5.sdk ]; then
|
||||
ARCH_SDK=/Developer/SDKs/MacOSX10.5.sdk
|
||||
ARCH_CFLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
|
||||
fi
|
||||
ARCH_MACOSX_VERSION_MIN="10.5"
|
||||
elif [ -d /Developer/SDKs/MacOSX10.6.sdk ]; then
|
||||
ARCH_SDK=/Developer/SDKs/MacOSX10.6.sdk
|
||||
ARCH_CFLAGS="-isysroot /Developer/SDKs/MacOSX10.6.sdk"
|
||||
ARCH_MACOSX_VERSION_MIN="10.6"
|
||||
else
|
||||
ARCH_MACOSX_VERSION_MIN="10.7"
|
||||
fi
|
||||
|
@ -71,4 +79,7 @@ NCPU=`sysctl -n hw.ncpu`
|
|||
|
||||
# use the following shell script to build an application bundle
|
||||
export MACOSX_DEPLOYMENT_TARGET="${ARCH_MACOSX_VERSION_MIN}"
|
||||
export MACOSX_DEPLOYMENT_TARGET_PPC=
|
||||
export MACOSX_DEPLOYMENT_TARGET_X86=
|
||||
export MACOSX_DEPLOYMENT_TARGET_X86_64=
|
||||
"./make-macosx-app.sh" release ${BUILDARCH}
|
||||
|
|
Loading…
Reference in a new issue