widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #16215
[Merge] lp:~widelands-dev/widelands/bug-1817607-macos-build into lp:widelands
Toni Förster has proposed merging lp:~widelands-dev/widelands/bug-1817607-macos-build into lp:widelands.
Commit message:
- macOS: set build target to 10.9 if macOS 10.9 or newer is found.
- macOS: append macOS target version to dmg filename.
Requested reviews:
SirVer (sirver)
Related bugs:
Bug #1817607 in widelands: "macOS: 2 builds for Release"
https://bugs.launchpad.net/widelands/+bug/1817607
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1817607-macos-build/+merge/364204
--
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1817607-macos-build.
=== modified file 'utils/macos/build_app.sh'
--- utils/macos/build_app.sh 2018-12-13 21:27:09 +0000
+++ utils/macos/build_app.sh 2019-03-09 10:20:12 +0000
@@ -62,9 +62,14 @@
# If not, use the one for the installed macOS Version
OSX_MIN_VERSION="10.7"
SDK_DIRECTORY="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_MIN_VERSION.sdk"
+
+OSX_VERSION=$(sw_vers -productVersion | cut -d . -f 1,2)
+OSX_MINOR=$(sw_vers -productVersion | cut -d . -f 2)
+
if [ ! -d "$SDK_DIRECTORY" ]; then
- OSX_VERSION=$(sw_vers -productVersion | cut -d . -f 1,2)
- OSX_MIN_VERSION=$OSX_VERSION
+ if [ "$OSX_MINOR" -ge 9 ]; then
+ OSX_MIN_VERSION="10.9"
+ fi
SDK_DIRECTORY="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk"
if [ ! -d "$SDK_DIRECTORY" ]; then
# If the SDK for the current macOS Version can't be found, use whatever is linked to MacOSX.sdk
@@ -86,7 +91,8 @@
echo " Version: $WLVERSION"
echo " Destination: $DESTINATION"
echo " Type: $TYPE"
-echo " macOS: $OSX_MIN_VERSION"
+echo " macOS: $OSX_VERSION"
+echo " Target: $OSX_MIN_VERSION"
echo " Compiler: $COMPILER"
echo ""
@@ -102,9 +108,9 @@
echo "Creating DMG ..."
if [ "$TYPE" == "Release" ]; then
- hdiutil create -fs HFS+ -volname "Widelands $WLVERSION" -srcfolder "$DESTINATION" "$UP/widelands_64bit_$WLVERSION.dmg"
+ hdiutil create -fs HFS+ -volname "Widelands $WLVERSION" -srcfolder "$DESTINATION" "$UP/widelands_${OSX_MIN_VERSION}_$WLVERSION.dmg"
elif [ "$TYPE" == "Debug" ]; then
- hdiutil create -fs HFS+ -volname "Widelands $WLVERSION" -srcfolder "$DESTINATION" "$UP/widelands_64bit_${WLVERSION}_${TYPE}.dmg"
+ hdiutil create -fs HFS+ -volname "Widelands $WLVERSION" -srcfolder "$DESTINATION" "$UP/widelands_${OSX_MIN_VERSION}_${WLVERSION}_${TYPE}.dmg"
fi
}
Follow ups