[Scummvm-git-logs] scummvm master -> 9955f721601ff9e6ef40e82849748fcdcec3aec2
criezy
criezy at scummvm.org
Sat Mar 28 19:05:19 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9955f72160 MACOSX: Add detection of target OS version in configure
Commit: 9955f721601ff9e6ef40e82849748fcdcec3aec2
https://github.com/scummvm/scummvm/commit/9955f721601ff9e6ef40e82849748fcdcec3aec2
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-03-28T19:04:29Z
Commit Message:
MACOSX: Add detection of target OS version in configure
This is used for two purposes:
1. Use the new legacy icon when targeting 10.5 or older. This fixes
bug #11261 MAC OS X: App icon doesnât display on OS X 10.5.8.
2. Do not attempt to compile the dock plugin in 32 bits when
targeting 10.14 or newer. This fixes the bundle target as support
for compiling 32 bits binaries was removed in SDK 10.14.
This commit also removes the bundle64 target as it is no longer
needed.
Changed paths:
A icons/scummvm_legacy.icns
configure
ports.mk
diff --git a/configure b/configure
index c8bea07f26..72ae37ca21 100755
--- a/configure
+++ b/configure
@@ -2775,6 +2775,38 @@ case $_host_os in
fi
fi
+ # When building for MacOS X 10.5 we need to use the legacy icon
+ echocheck "macOS SDK target version at least 10.6"
+ _macos_atleast_10_6=no
+ cat > $TMPC << EOF
+#include "AvailabilityMacros.h"
+#if !defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6
+error
+#endif
+int main(int argc, char *argv[]) { return 0; }
+EOF
+ cc_check && _macos_atleast_10_6=yes
+ echo ${_macos_atleast_10_6}
+ if test "$_macos_atleast_10_6" = no ; then
+ add_line_to_config_mk 'MACOSX_USE_LEGACY_ICONS = 1'
+ fi
+
+ # When building with SDK 10.14 or above, we cannot compile the 32 bits dock plugin
+ echocheck "macOS SDK target version at least 10.14"
+ _macos_atleast_10_14=no
+ cat > $TMPC << EOF
+#include "AvailabilityMacros.h"
+#if !defined(MAC_OS_X_VERSION_10_14) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_14
+error
+#endif
+int main(int argc, char *argv[]) { return 0; }
+EOF
+ cc_check && _macos_atleast_10_14=yes
+ echo ${_macos_atleast_10_14}
+ if test "$_macos_atleast_10_14" = yes ; then
+ add_line_to_config_mk 'MACOSX_64_BITS_ONLY = 1'
+ fi
+
# Use pandoc to generate README and NEWS file for the bundle
# Also default to HTML rather than plain text as it gives a nicer
# formating, especially for the README. We could consider using RTF
diff --git a/icons/scummvm_legacy.icns b/icons/scummvm_legacy.icns
new file mode 100644
index 0000000000..1cd6a742ab
Binary files /dev/null and b/icons/scummvm_legacy.icns differ
diff --git a/ports.mk b/ports.mk
index af4a889e60..148be66eca 100644
--- a/ports.mk
+++ b/ports.mk
@@ -81,8 +81,13 @@ ScummVMDockTilePlugin64.o:
ScummVMDockTilePlugin64: ScummVMDockTilePlugin64.o
$(CXX) -mmacosx-version-min=10.6 -arch x86_64 -bundle -framework Foundation -framework AppKit -fobjc-link-runtime ScummVMDockTilePlugin64.o -o ScummVMDockTilePlugin64
+ifdef MACOSX_64_BITS_ONLY
+ScummVMDockTilePlugin: ScummVMDockTilePlugin64
+ cp ScummVMDockTilePlugin64 ScummVMDockTilePlugin
+else
ScummVMDockTilePlugin: ScummVMDockTilePlugin32 ScummVMDockTilePlugin64
lipo -create ScummVMDockTilePlugin32 ScummVMDockTilePlugin64 -output ScummVMDockTilePlugin
+endif
scummvm.docktileplugin: ScummVMDockTilePlugin
mkdir -p scummvm.docktileplugin/Contents
@@ -91,14 +96,6 @@ scummvm.docktileplugin: ScummVMDockTilePlugin
cp ScummVMDockTilePlugin scummvm.docktileplugin/Contents/MacOS/
chmod 644 scummvm.docktileplugin/Contents/MacOS/ScummVMDockTilePlugin
-scummvm.docktileplugin64: ScummVMDockTilePlugin64
- mkdir -p scummvm.docktileplugin/Contents
- cp $(srcdir)/dists/macosx/dockplugin/Info.plist scummvm.docktileplugin/Contents
- mkdir -p scummvm.docktileplugin/Contents/MacOS
- mv ScummVMDockTilePlugin64 ScummVMDockTilePlugin
- cp ScummVMDockTilePlugin scummvm.docktileplugin/Contents/MacOS/
- chmod 644 scummvm.docktileplugin/Contents/MacOS/ScummVMDockTilePlugin
-
endif
bundle_name = ScummVM.app
@@ -114,7 +111,11 @@ ifdef USE_SPARKLE
rm -rf $(bundle_name)/Contents/Frameworks/Sparkle.framework
cp -R $(SPARKLEPATH)/Sparkle.framework $(bundle_name)/Contents/Frameworks/
endif
- cp $(srcdir)/icons/scummvm.icns $(bundle_name)/Contents/Resources/
+ifdef MACOSX_USE_LEGACY_ICONS
+ cp $(srcdir)/icons/scummvm_legacy.icns $(bundle_name)/Contents/Resources/scummvm.icns
+else
+ cp $(srcdir)/icons/scummvm.icns $(bundle_name)/Contents/Resources/scummvm.icns
+endif
cp $(DIST_FILES_DOCS) $(bundle_name)/Contents/Resources/
cp $(DIST_FILES_THEMES) $(bundle_name)/Contents/Resources/
ifdef DIST_FILES_NETWORKING
@@ -143,12 +144,8 @@ endif
ifdef USE_DOCKTILEPLUGIN
bundle: scummvm-static scummvm.docktileplugin bundle-pack
-
-bundle64: scummvm-static scummvm.docktileplugin64 bundle-pack
else
bundle: scummvm-static bundle-pack
-
-bundle64: scummvm-static bundle-pack
endif
iphonebundle: iphone
More information about the Scummvm-git-logs
mailing list