summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-04-14 10:18:14 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-04-16 22:46:23 -0700
commitf791eb32b9ebe96845e87e5a6acd3ee46182c1d5 (patch)
tree000bcee5936058593560e03e2512f0b499d5aa38
parentb3be8ee8f7c71bc520eaacba1839b22cb5e5dd03 (diff)
downloadqtlocation-mapboxgl-f791eb32b9ebe96845e87e5a6acd3ee46182c1d5.tar.gz
[ios] Streamlined package.sh
Halved the number of xcodebuild invocations, using a new scheme to string the dynamic and static builds together in each invocation. Removed unnecessary build flag overrides like ARCHS. Removed support for building the SDK without Bitcode support via an environment variable. If you need to build without Bitcode support, set the ENABLE_BITCODE build setting in the project editor for the relevant Xcode target.
-rw-r--r--platform/ios/ios.xcodeproj/xcshareddata/xcschemes/dynamic+static.xcscheme103
-rwxr-xr-xplatform/ios/scripts/package.sh72
2 files changed, 122 insertions, 53 deletions
diff --git a/platform/ios/ios.xcodeproj/xcshareddata/xcschemes/dynamic+static.xcscheme b/platform/ios/ios.xcodeproj/xcshareddata/xcschemes/dynamic+static.xcscheme
new file mode 100644
index 0000000000..cec6d97f74
--- /dev/null
+++ b/platform/ios/ios.xcodeproj/xcshareddata/xcschemes/dynamic+static.xcscheme
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0730"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "DA8847D11CBAF91600AB86E3"
+ BuildableName = "Mapbox.framework"
+ BlueprintName = "dynamic"
+ ReferencedContainer = "container:ios.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "DAA4E4121CBB71D400178DFB"
+ BuildableName = "libMapbox.a"
+ BlueprintName = "static"
+ ReferencedContainer = "container:ios.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "DA8847D11CBAF91600AB86E3"
+ BuildableName = "Mapbox.framework"
+ BlueprintName = "dynamic"
+ ReferencedContainer = "container:ios.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "DA8847D11CBAF91600AB86E3"
+ BuildableName = "Mapbox.framework"
+ BlueprintName = "dynamic"
+ ReferencedContainer = "container:ios.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "DA8847D11CBAF91600AB86E3"
+ BuildableName = "Mapbox.framework"
+ BlueprintName = "dynamic"
+ ReferencedContainer = "container:ios.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/platform/ios/scripts/package.sh b/platform/ios/scripts/package.sh
index 0da361a637..bfc34bf3cb 100755
--- a/platform/ios/scripts/package.sh
+++ b/platform/ios/scripts/package.sh
@@ -9,7 +9,6 @@ OUTPUT=build/ios/pkg
BUILDTYPE=${BUILDTYPE:-Release}
BUILD_FOR_DEVICE=${BUILD_DEVICE:-true}
-ENABLE_BITCODE=${BITCODE:-YES}
GCC_GENERATE_DEBUGGING_SYMBOLS=${SYMBOLS:-YES}
BUILD_DYNAMIC=true
@@ -47,7 +46,7 @@ if [[ ${BUILD_FOR_DEVICE} == true ]]; then
fi
IOS_SDK_VERSION=`xcrun --sdk ${SDK} --show-sdk-version`
-echo "Configuring ${FORMAT:-dynamic and static} ${BUILDTYPE} framework for ${SDK}; symbols: ${GCC_GENERATE_DEBUGGING_SYMBOLS}; Bitcode: ${ENABLE_BITCODE}; Mapbox.bundle: ${BUNDLE_RESOURCES} bundle.outside: ${PLACE_RESOURCE_BUNDLES_OUTSIDE_FRAMEWORK}"
+echo "Configuring ${FORMAT:-dynamic and static} ${BUILDTYPE} framework for ${SDK}; symbols: ${GCC_GENERATE_DEBUGGING_SYMBOLS}; Mapbox.bundle: ${BUNDLE_RESOURCES} bundle.outside: ${PLACE_RESOURCE_BUNDLES_OUTSIDE_FRAMEWORK}"
function step { >&2 echo -e "\033[1m\033[36m* $@\033[0m"; }
function finish { >&2 echo -en "\033[0m"; }
@@ -62,7 +61,6 @@ if [[ ${BUILD_DYNAMIC} == true ]]; then
mkdir -p "${OUTPUT}"/dynamic
fi
-
step "Recording library version…"
VERSION="${OUTPUT}"/version.txt
echo -n "https://github.com/mapbox/mapbox-gl-native/commit/" > ${VERSION}
@@ -74,64 +72,32 @@ echo ${HASH} >> ${VERSION}
PROJ_VERSION=$(git rev-list --count HEAD)
-if [[ "${BUILD_FOR_DEVICE}" == true ]]; then
- if [[ ${BUILD_STATIC} == true ]]; then
- step "Building intermediate static libraries for iOS devices (build ${PROJ_VERSION})…"
- xcodebuild -sdk iphoneos${IOS_SDK_VERSION} \
- ARCHS="arm64 armv7 armv7s" \
- ONLY_ACTIVE_ARCH=NO \
- GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \
- ENABLE_BITCODE=${ENABLE_BITCODE} \
- DEPLOYMENT_POSTPROCESSING=YES \
- CODE_SIGNING_REQUIRED=NO \
- CODE_SIGN_IDENTITY= \
- -workspace ./platform/ios/ios.xcworkspace \
- -configuration ${BUILDTYPE} \
- -scheme static \
- -jobs ${JOBS} | xcpretty
- fi
+step "Building targets (build ${PROJ_VERSION})…"
- if [[ ${BUILD_DYNAMIC} == true ]]; then
- step "Building dynamic framework for iOS devices (build ${PROJ_VERSION})…"
- xcodebuild -sdk iphoneos${IOS_SDK_VERSION} \
- ARCHS="arm64 armv7 armv7s" \
- ONLY_ACTIVE_ARCH=NO \
- GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \
- ENABLE_BITCODE=${ENABLE_BITCODE} \
- DEPLOYMENT_POSTPROCESSING=YES \
- CURRENT_PROJECT_VERSION=${PROJ_VERSION} \
- CODE_SIGNING_REQUIRED=NO \
- CODE_SIGN_IDENTITY= \
- -workspace ./platform/ios/ios.xcworkspace \
- -configuration ${BUILDTYPE} \
- -scheme dynamic \
- -jobs ${JOBS} | xcpretty
- fi
+SCHEME='dynamic'
+if [[ ${BUILD_DYNAMIC} == true && ${BUILD_STATIC} == true ]]; then
+ SCHEME+='+static'
+elif [[ ${BUILD_STATIC} == true ]]; then
+ SCHEME='static'
fi
-if [[ ${BUILD_STATIC} == true ]]; then
- step "Building intermediate static libraries for iOS Simulator (build ${PROJ_VERSION})…"
- xcodebuild -sdk iphonesimulator${IOS_SDK_VERSION} \
- ARCHS="x86_64 i386" \
- ONLY_ACTIVE_ARCH=NO \
- GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \
- -workspace ./platform/ios/ios.xcworkspace \
- -configuration ${BUILDTYPE} \
- -scheme static \
- -jobs ${JOBS} | xcpretty
-fi
+xcodebuild \
+ GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \
+ CURRENT_PROJECT_VERSION=${PROJ_VERSION} \
+ -workspace ./platform/ios/ios.xcworkspace \
+ -scheme ${SCHEME} \
+ -configuration ${BUILDTYPE} \
+ -sdk iphonesimulator \
+ -jobs ${JOBS} | xcpretty
-if [[ ${BUILD_DYNAMIC} == true ]]; then
- step "Building dynamic framework for iOS Simulator (build ${PROJ_VERSION})…"
- xcodebuild -sdk iphonesimulator${IOS_SDK_VERSION} \
- ARCHS="x86_64 i386" \
- ONLY_ACTIVE_ARCH=NO \
+if [[ ${BUILD_FOR_DEVICE} == true ]]; then
+ xcodebuild \
GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \
- ENABLE_BITCODE=${ENABLE_BITCODE} \
CURRENT_PROJECT_VERSION=${PROJ_VERSION} \
-workspace ./platform/ios/ios.xcworkspace \
+ -scheme ${SCHEME} \
-configuration ${BUILDTYPE} \
- -scheme dynamic \
+ -sdk iphoneos \
-jobs ${JOBS} | xcpretty
fi