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
1=== modified file 'utils/macos/build_app.sh'
2--- utils/macos/build_app.sh 2018-12-13 21:27:09 +0000
3+++ utils/macos/build_app.sh 2019-03-09 10:20:12 +0000
4@@ -62,9 +62,14 @@
5 # If not, use the one for the installed macOS Version
6 OSX_MIN_VERSION="10.7"
7 SDK_DIRECTORY="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_MIN_VERSION.sdk"
8+
9+OSX_VERSION=$(sw_vers -productVersion | cut -d . -f 1,2)
10+OSX_MINOR=$(sw_vers -productVersion | cut -d . -f 2)
11+
12 if [ ! -d "$SDK_DIRECTORY" ]; then
13- OSX_VERSION=$(sw_vers -productVersion | cut -d . -f 1,2)
14- OSX_MIN_VERSION=$OSX_VERSION
15+ if [ "$OSX_MINOR" -ge 9 ]; then
16+ OSX_MIN_VERSION="10.9"
17+ fi
18 SDK_DIRECTORY="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk"
19 if [ ! -d "$SDK_DIRECTORY" ]; then
20 # If the SDK for the current macOS Version can't be found, use whatever is linked to MacOSX.sdk
21@@ -86,7 +91,8 @@
22 echo " Version: $WLVERSION"
23 echo " Destination: $DESTINATION"
24 echo " Type: $TYPE"
25-echo " macOS: $OSX_MIN_VERSION"
26+echo " macOS: $OSX_VERSION"
27+echo " Target: $OSX_MIN_VERSION"
28 echo " Compiler: $COMPILER"
29 echo ""
30
31@@ -102,9 +108,9 @@
32
33 echo "Creating DMG ..."
34 if [ "$TYPE" == "Release" ]; then
35- hdiutil create -fs HFS+ -volname "Widelands $WLVERSION" -srcfolder "$DESTINATION" "$UP/widelands_64bit_$WLVERSION.dmg"
36+ hdiutil create -fs HFS+ -volname "Widelands $WLVERSION" -srcfolder "$DESTINATION" "$UP/widelands_${OSX_MIN_VERSION}_$WLVERSION.dmg"
37 elif [ "$TYPE" == "Debug" ]; then
38- hdiutil create -fs HFS+ -volname "Widelands $WLVERSION" -srcfolder "$DESTINATION" "$UP/widelands_64bit_${WLVERSION}_${TYPE}.dmg"
39+ hdiutil create -fs HFS+ -volname "Widelands $WLVERSION" -srcfolder "$DESTINATION" "$UP/widelands_${OSX_MIN_VERSION}_${WLVERSION}_${TYPE}.dmg"
40 fi
41 }
42

Subscribers

People subscribed via source and target branches

to status/vote changes: