diff options
author | jan Iversen <jani@libreoffice.org> | 2018-06-10 10:16:23 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-06-11 09:45:12 -0700 |
commit | abc3125b8e246ae767d2df34798320e65e15a353 (patch) | |
tree | 6e4a49b4077ab93bb64e68ead37f1607ce5f8aa3 /packaging/ios | |
parent | 13b9c7a822bb91896358282fc20cc2f09cb37c03 (diff) | |
download | subsurface-abc3125b8e246ae767d2df34798320e65e15a353.tar.gz |
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 <jani@apache.org>
Diffstat (limited to 'packaging/ios')
-rwxr-xr-x | packaging/ios/build.sh | 32 |
1 files 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 |