From 6dc057ebf734f21c99d1014405ed392e57c351de Mon Sep 17 00:00:00 2001 From: skyjake Date: Tue, 26 Mar 2013 12:56:26 +0200 Subject: [PATCH] Mac OS X|Builder: Added a new build for OS X Mountain Lion (10.8) It turned out to be quite difficult to get Qt 4.8.4 in the Snow Leopard build, so now there is a OS X 10.8 build with Qt 4.8.4 (64-bit only). --- distrib/platform_release.py | 5 +++-- doomsday/config.pri | 1 + doomsday/config_macx.pri | 22 ++++++++++++---------- doomsday/postbuild/bundleapp.sh | 21 ++++++++++++++++----- 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/distrib/platform_release.py b/distrib/platform_release.py index 97700f1590..a9f56564a3 100755 --- a/distrib/platform_release.py +++ b/distrib/platform_release.py @@ -100,7 +100,8 @@ def mac_os_version(): def mac_target_ext(): - if mac_os_version() == '10.6': return '.dmg' + if mac_os_version() == '10.8': return '.dmg' + if mac_os_version() == '10.6': return '_mac10_6.dmg' return '_32bit.dmg' @@ -337,7 +338,7 @@ def main(): try: if sys.platform == "darwin": - print "Mac OS X" + print "Mac OS X (%s)" % mac_os_version() mac_release() elif sys.platform == "win32": print "Windows" diff --git a/doomsday/config.pri b/doomsday/config.pri index a9568ef874..7002d783ad 100644 --- a/doomsday/config.pri +++ b/doomsday/config.pri @@ -25,6 +25,7 @@ # - deng_nosnowberry (Unix) Exclude Snowberry from installation # - deng_notools Do not build and deploy the tools # - deng_openal Build the OpenAL sound driver +# - deng_qtautoselect (Mac) Select OS X SDK based on Qt version # - deng_nopackres Do not package the Doomsday resources # - deng_rangecheck Parameter range checking/value assertions # - deng_snowberry (Unix) Include Snowberry in installation diff --git a/doomsday/config_macx.pri b/doomsday/config_macx.pri index d2cc547751..bfd3f62ee1 100644 --- a/doomsday/config_macx.pri +++ b/doomsday/config_macx.pri @@ -9,7 +9,7 @@ DEFINES += MACOSX CONFIG += deng_nofixedasm deng_embedfluidsynth # The native SDK option assumes the build is not for distribution. -!deng_nativesdk { +deng_qtautoselect:!deng_nativesdk { contains(QT_VERSION, ^4\\.[0-6]\\..*) { # 4.6 or earlier, assume Tiger with 32-bit Universal Intel/PowerPC binaries. CONFIG += deng_macx4u_32bit @@ -31,11 +31,7 @@ CONFIG += deng_nofixedasm deng_embedfluidsynth # Apply deng_* Configuration ------------------------------------------------- -deng_nativesdk { - echo(Using native SDK.) - DEFINES += MACOSX_NATIVESDK -} -else:deng_macx8_64bit { +deng_macx8_64bit { echo(Using Mac OS 10.8 SDK.) CONFIG -= x86 CONFIG += x86_64 @@ -75,15 +71,21 @@ else:deng_macx4u_32bit { QMAKE_CFLAGS_WARN_ON -= -fdiagnostics-show-option } +else:deng_nativesdk { + echo(Using native SDK.) + DEFINES += MACOSX_NATIVESDK +} else { error(Unspecified SDK configuration.) } # Adjust Qt paths as needed. -qtbase = $$(QTDIR) -isEmpty(qtbase):!isEmpty(QMAKE_MAC_SDK) { - QMAKE_INCDIR_QT = $${QMAKE_MAC_SDK}$$QMAKE_INCDIR_QT - QMAKE_LIBDIR_QT = $${QMAKE_MAC_SDK}$$QMAKE_LIBDIR_QT +!deng_macx8_64bit { + qtbase = $$(QTDIR) + isEmpty(qtbase):!isEmpty(QMAKE_MAC_SDK) { + QMAKE_INCDIR_QT = $${QMAKE_MAC_SDK}$$QMAKE_INCDIR_QT + QMAKE_LIBDIR_QT = $${QMAKE_MAC_SDK}$$QMAKE_LIBDIR_QT + } } # What's our arch? diff --git a/doomsday/postbuild/bundleapp.sh b/doomsday/postbuild/bundleapp.sh index 5553cadcdf..0530c231c9 100755 --- a/doomsday/postbuild/bundleapp.sh +++ b/doomsday/postbuild/bundleapp.sh @@ -55,11 +55,16 @@ $CP tools/md2tool/md2tool $APPDIR/Resources if [ -e plugins/fluidsynth/audio_fluidsynth.bundle ]; then $CP plugins/fluidsynth/audio_fluidsynth.bundle $PLUGDIR/ + GLIB_VER=`pkg-config --modversion glib-2.0` + GETTEXT_VER=`ls /usr/local/Cellar/gettext` + echo "Installing deps for audio_fluidsynth..." + echo "- glib version: $GLIB_VER" + echo "- gettext version: $GETTEXT_VER" FWDIR=$BUILDDIR/Doomsday.app/Contents/Frameworks cp /usr/local/lib/libglib-2.0.0.dylib $FWDIR cp /usr/local/lib/libgthread-2.0.0.dylib $FWDIR - cp /usr/local/Cellar/gettext/0.18.1.1/lib/libintl.8.dylib $FWDIR + cp /usr/local/Cellar/gettext/$GETTEXT_VER/lib/libintl.8.dylib $FWDIR chmod u+w $FWDIR/libglib-2.0.0.dylib $FWDIR/libgthread-2.0.0.dylib $FWDIR/libintl.8.dylib # IDs @@ -68,13 +73,17 @@ if [ -e plugins/fluidsynth/audio_fluidsynth.bundle ]; then install_name_tool -id @executable_path/../Frameworks/libintl.8.dylib $FWDIR/libintl.8.dylib # glib-2.0.0 - install_name_tool -change /usr/local/Cellar/gettext/0.18.1.1/lib/libintl.8.dylib \ + install_name_tool -change /usr/local/Cellar/gettext/$GETTEXT_VER/lib/libintl.8.dylib \ + @executable_path/../Frameworks/libintl.8.dylib $FWDIR/libglib-2.0.0.dylib + install_name_tool -change /usr/local/opt/gettext/lib/libintl.8.dylib \ @executable_path/../Frameworks/libintl.8.dylib $FWDIR/libglib-2.0.0.dylib # gthread-2.0.0 - install_name_tool -change /usr/local/Cellar/glib/2.32.3/lib/libglib-2.0.0.dylib \ + install_name_tool -change /usr/local/Cellar/glib/$GLIB_VER/lib/libglib-2.0.0.dylib \ @executable_path/../Frameworks/libglib-2.0.0.dylib $FWDIR/libgthread-2.0.0.dylib - install_name_tool -change /usr/local/Cellar/gettext/0.18.1.1/lib/libintl.8.dylib \ + install_name_tool -change /usr/local/Cellar/gettext/$GETTEXT_VER/lib/libintl.8.dylib \ + @executable_path/../Frameworks/libintl.8.dylib $FWDIR/libgthread-2.0.0.dylib + install_name_tool -change /usr/local/opt/gettext/lib/libintl.8.dylib \ @executable_path/../Frameworks/libintl.8.dylib $FWDIR/libgthread-2.0.0.dylib # audio_fluidsynth @@ -83,7 +92,9 @@ if [ -e plugins/fluidsynth/audio_fluidsynth.bundle ]; then @executable_path/../Frameworks/libglib-2.0.0.dylib $DSFS install_name_tool -change /usr/local/lib/libgthread-2.0.0.dylib \ @executable_path/../Frameworks/libgthread-2.0.0.dylib $DSFS - install_name_tool -change /usr/local/Cellar/gettext/0.18.1.1/lib/libintl.8.dylib \ + install_name_tool -change /usr/local/Cellar/gettext/$GETTEXT_VER/lib/libintl.8.dylib \ + @executable_path/../Frameworks/libintl.8.dylib $DSFS + install_name_tool -change /usr/local/opt/gettext/lib/libintl.8.dylib \ @executable_path/../Frameworks/libintl.8.dylib $DSFS fi