widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #14138
[Merge] lp:~widelands-dev/widelands/macos_build_app into lp:widelands
Toni Förster has proposed merging lp:~widelands-dev/widelands/macos_build_app into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/macos_build_app/+merge/352945
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/macos_build_app into lp:widelands.
=== modified file 'utils/macos/build_app.sh'
--- utils/macos/build_app.sh 2018-08-10 07:53:15 +0000
+++ utils/macos/build_app.sh 2018-08-12 23:48:16 +0000
@@ -7,6 +7,16 @@
exit 1
fi
+# Check if the SDK for the minimum build target is available.
+# 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"
+if [ ! -d "$SDK_DIRECTORY" ]; then
+ OSX_VERSION=$(sw_vers -productVersion | cut -d . -f 1,2)
+ OSX_MIN_VERSION=$OSX_VERSION
+ SDK_DIRECTORY="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk"
+fi
+
SOURCE_DIR=$1
REVISION=`bzr revno $SOURCE_DIR`
DESTINATION="WidelandsRelease"
@@ -22,6 +32,7 @@
echo " Version: $WLVERSION"
echo " Destination: $DESTINATION"
echo " Type: $TYPE"
+echo " macOS: $OSX_MIN_VERSION"
echo ""
function MakeDMG {
@@ -93,8 +104,8 @@
CopyLibrary $(brew --prefix libvorbis)/lib/libvorbisfile.dylib
$SOURCE_DIR/utils/macos/fix_dependencies.py \
- $DESTINATION/Widelands.app/Contents/MacOS/widelands \
- $DESTINATION/Widelands.app/Contents/MacOS/*.dylib
+ $DESTINATION/Widelands.app/Contents/MacOS/widelands \
+ $DESTINATION/Widelands.app/Contents/MacOS/*.dylib
}
function BuildWidelands() {
@@ -114,10 +125,10 @@
export ICU_ROOT="$(brew --prefix icu4c)"
cmake $SOURCE_DIR -G Ninja \
- -DCMAKE_C_COMPILER:FILEPATH="$(brew --prefix ccache)/libexec/gcc-6" \
- -DCMAKE_CXX_COMPILER:FILEPATH="$(brew --prefix ccache)/libexec/g++-6" \
- -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="10.7" \
- -DCMAKE_OSX_SYSROOT:PATH="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" \
+ -DCMAKE_C_COMPILER:FILEPATH="$(brew --prefix ccache)/libexec/gcc-7" \
+ -DCMAKE_CXX_COMPILER:FILEPATH="$(brew --prefix ccache)/libexec/g++-7" \
+ -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="$OSX_MIN_VERSION" \
+ -DCMAKE_OSX_SYSROOT:PATH="$SDK_DIRECTORY" \
-DCMAKE_INSTALL_PREFIX:PATH="$DESTINATION/Widelands.app/Contents/MacOS" \
-DCMAKE_OSX_ARCHITECTURES:STRING="x86_64" \
-DCMAKE_BUILD_TYPE:STRING="$TYPE" \
Follow ups