From abc3125b8e246ae767d2df34798320e65e15a353 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Sun, 10 Jun 2018 10:16:23 +0200 Subject: ios: add -all to build.sh -all will build debug and release for the choosen architectures armv7,arm64,x86_64 without extra parameter and only x86_64 with -simulator Use -all to prebuild all 6 variants we support. Signed-off-by: Jan Iversen --- packaging/ios/build.sh | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/packaging/ios/build.sh b/packaging/ios/build.sh index 7b29fa1ec..266ffcda1 100755 --- a/packaging/ios/build.sh +++ b/packaging/ios/build.sh @@ -6,7 +6,6 @@ set -e doVersion=$1 DEBUGRELEASE="Release" -DRCONFIG="release" ARCHS="armv7 arm64 x86_64" TARGET="iphoneos" TARGET2="Device" @@ -17,7 +16,6 @@ while [[ $# -gt 0 ]] ; do -debug) # build for debugging DEBUGRELEASE="Debug" - DRCONFIG="qml_debug" ;; -simulator) # build for the simulator instead of for a device @@ -25,6 +23,10 @@ while [[ $# -gt 0 ]] ; do TARGET="iphonesimulator" TARGET2="simulator" ;; + -all) + # build both debug and release for all devices + DEBUGRELEASE="All" + ;; *) echo "Unknown command line argument $arg" ;; @@ -242,10 +244,24 @@ done # in order to be able to use xcode without going through Qt Creator # call qmake directly -BUILDX=build-Subsurface-mobile-Qt_$(echo ${QT_VERSION} | tr . _)_for_iOS-${DEBUGRELEASE} -mkdir -p ${BUILDX} -cd ${BUILDX} -${IOS_QT}/${QT_VERSION}/ios/bin/qmake ../Subsurface-mobile.pro \ - -spec macx-ios-clang CONFIG+=$TARGET CONFIG+=$TARGET2 CONFIG+=$DRCONFIG +if [ "$DEBUGRELEASE" = "All" ] ; then + BUILD_LOOP="Debug Release" +else + BUILD_LOOP=$DEBUGRELEASE +fi +for BUILD_NOW in $BUILD_LOOP; do + echo "Building for $BUILD_NOW" + if [ "$BUILD_NOW" == "Debug" ] ; then + DRCONFIG="qml_debug" + else + DRCONFIG="release" + fi + BUILDX=build-Subsurface-mobile-Qt_$(echo ${QT_VERSION} | tr . _)_for_iOS-${BUILD_NOW} + mkdir -p ${BUILDX} + pushd ${BUILDX} + ${IOS_QT}/${QT_VERSION}/ios/bin/qmake ../Subsurface-mobile.pro \ + -spec macx-ios-clang CONFIG+=$TARGET CONFIG+=$TARGET2 CONFIG+=$DRCONFIG -make qmake_all + make qmake_all + popd +done -- cgit v1.2.3-70-g09d2