Merge lp:~widelands-dev/widelands/bug-1817607-macos-build into lp:widelands

Proposed by Toni Förster
Status: Merged
Merged at revision: 9012
Proposed branch: lp:~widelands-dev/widelands/bug-1817607-macos-build
Merge into: lp:widelands
Diff against target: 41 lines (+11/-5)
1 file modified
utils/macos/build_app.sh (+11/-5)
To merge this branch: bzr merge lp:~widelands-dev/widelands/bug-1817607-macos-build
Reviewer Review Type Date Requested Status
SirVer Approve
GunChleoc Approve
Review via email: mp+364204@code.launchpad.net

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.

To post a comment you must log in.
Revision history for this message
GunChleoc (gunchleoc) wrote :

1 general nitpick. I don't know anything about MacOS - has this been tested with both older and newer Macs?

Revision history for this message
Toni Förster (stonerl) wrote :

I can only test this with a newer Mac. SirVer needs to test this on his old one, though. For the nit see inline.

Revision history for this message
GunChleoc (gunchleoc) wrote :

OK, I overlooked that. Code is good to go.

review: Approve
Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 4571. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/503973556.
Appveyor build 4358. State: failed. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_bug_1817607_macos_build-4358.

Revision history for this message
SirVer (sirver) wrote :

Still works on my old Mac to build the nightlies. I did not yet achieve to build a newer version on my new mac, but I believe this to be an issue with my build environment. This is good to go, imho.

review: Approve
Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks for testing!

@bunnybot merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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 @@
62# If not, use the one for the installed macOS Version62# If not, use the one for the installed macOS Version
63OSX_MIN_VERSION="10.7"63OSX_MIN_VERSION="10.7"
64SDK_DIRECTORY="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_MIN_VERSION.sdk"64SDK_DIRECTORY="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_MIN_VERSION.sdk"
65
66OSX_VERSION=$(sw_vers -productVersion | cut -d . -f 1,2)
67OSX_MINOR=$(sw_vers -productVersion | cut -d . -f 2)
68
65if [ ! -d "$SDK_DIRECTORY" ]; then69if [ ! -d "$SDK_DIRECTORY" ]; then
66 OSX_VERSION=$(sw_vers -productVersion | cut -d . -f 1,2)70 if [ "$OSX_MINOR" -ge 9 ]; then
67 OSX_MIN_VERSION=$OSX_VERSION71 OSX_MIN_VERSION="10.9"
72 fi
68 SDK_DIRECTORY="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk"73 SDK_DIRECTORY="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk"
69 if [ ! -d "$SDK_DIRECTORY" ]; then74 if [ ! -d "$SDK_DIRECTORY" ]; then
70 # If the SDK for the current macOS Version can't be found, use whatever is linked to MacOSX.sdk75 # If the SDK for the current macOS Version can't be found, use whatever is linked to MacOSX.sdk
@@ -86,7 +91,8 @@
86echo " Version: $WLVERSION"91echo " Version: $WLVERSION"
87echo " Destination: $DESTINATION"92echo " Destination: $DESTINATION"
88echo " Type: $TYPE"93echo " Type: $TYPE"
89echo " macOS: $OSX_MIN_VERSION"94echo " macOS: $OSX_VERSION"
95echo " Target: $OSX_MIN_VERSION"
90echo " Compiler: $COMPILER"96echo " Compiler: $COMPILER"
91echo ""97echo ""
9298
@@ -102,9 +108,9 @@
102108
103 echo "Creating DMG ..."109 echo "Creating DMG ..."
104 if [ "$TYPE" == "Release" ]; then110 if [ "$TYPE" == "Release" ]; then
105 hdiutil create -fs HFS+ -volname "Widelands $WLVERSION" -srcfolder "$DESTINATION" "$UP/widelands_64bit_$WLVERSION.dmg"111 hdiutil create -fs HFS+ -volname "Widelands $WLVERSION" -srcfolder "$DESTINATION" "$UP/widelands_${OSX_MIN_VERSION}_$WLVERSION.dmg"
106 elif [ "$TYPE" == "Debug" ]; then112 elif [ "$TYPE" == "Debug" ]; then
107 hdiutil create -fs HFS+ -volname "Widelands $WLVERSION" -srcfolder "$DESTINATION" "$UP/widelands_64bit_${WLVERSION}_${TYPE}.dmg"113 hdiutil create -fs HFS+ -volname "Widelands $WLVERSION" -srcfolder "$DESTINATION" "$UP/widelands_${OSX_MIN_VERSION}_${WLVERSION}_${TYPE}.dmg"
108 fi114 fi
109}115}
110116

Subscribers

People subscribed via source and target branches

to status/vote changes: