summaryrefslogtreecommitdiff
path: root/platform/ios/scripts/package.sh
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-04-03 15:16:49 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-04-07 18:01:02 -0700
commitf964e40e7e9220d08751d8607af61ac5a7c0794c (patch)
treed34ca5407188fe3d71396faa8a8acceb52d9bd4b /platform/ios/scripts/package.sh
parentf5d66f362272db034a311d2077dbdb2937c9bbdf (diff)
downloadqtlocation-mapboxgl-f964e40e7e9220d08751d8607af61ac5a7c0794c.tar.gz
[build] Refactor and simplify build system
* Main gyp files are now standardized as platform/<platform>/platform.gyp. * Each platform gyp file defines appropriate loop_lib and headless_lib variables. * Each platform gyp file includes mbgl.gypi, which defines base targets which may be useful to all platforms. * CI targets are consistent across platforms: `make $(PLATFORM) && make test-$(PLATFORM)`. * Renamed the "linux" test app to "glfw". It's now built in OS X CI. * Android build flakiness is fixed. * iOS CI builds the bench and iosapp targets. * Mesa version is now in one place. * CI scripts use bash "strict mode" and correct error handling. * All build output goes to the build directory. * Removed vestigial iOS/OS X/Android Travis scripts.
Diffstat (limited to 'platform/ios/scripts/package.sh')
-rwxr-xr-xplatform/ios/scripts/package.sh46
1 files changed, 16 insertions, 30 deletions
diff --git a/platform/ios/scripts/package.sh b/platform/ios/scripts/package.sh
index b0f63478df..02a454aaf7 100755
--- a/platform/ios/scripts/package.sh
+++ b/platform/ios/scripts/package.sh
@@ -72,12 +72,6 @@ echo ${HASH}
echo ${HASH} >> ${VERSION}
-step "Creating build files…"
-export MASON_PLATFORM=ios
-export BUILDTYPE=${BUILDTYPE:-Release}
-export HOST=ios
-make Xcode/ios
-
PROJ_VERSION=$(git rev-list --count HEAD)
if [[ "${BUILD_FOR_DEVICE}" == true ]]; then
@@ -91,13 +85,9 @@ if [[ "${BUILD_FOR_DEVICE}" == true ]]; then
DEPLOYMENT_POSTPROCESSING=YES \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGN_IDENTITY= \
- -project ./build/ios-all/gyp/mbgl.xcodeproj \
+ -project ./build/ios-all/platform/ios/platform.xcodeproj \
-configuration ${BUILDTYPE} \
- -target core \
- -target platform-ios \
- -target http-nsurl \
- -target asset-fs \
- -target headless-eagl \
+ -target platform-lib \
-jobs ${JOBS}
fi
@@ -112,7 +102,7 @@ if [[ "${BUILD_FOR_DEVICE}" == true ]]; then
CURRENT_PROJECT_VERSION=${PROJ_VERSION} \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGN_IDENTITY= \
- -project ./build/ios-all/gyp/ios.xcodeproj \
+ -project ./build/ios-all/platform/ios/platform.xcodeproj \
-configuration ${BUILDTYPE} \
-target iossdk \
-jobs ${JOBS}
@@ -125,13 +115,9 @@ if [[ ${BUILD_STATIC} == true ]]; then
ARCHS="x86_64 i386" \
ONLY_ACTIVE_ARCH=NO \
GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \
- -project ./build/ios-all/gyp/mbgl.xcodeproj \
+ -project ./build/ios-all/platform/ios/platform.xcodeproj \
-configuration ${BUILDTYPE} \
- -target core \
- -target platform-ios \
- -target http-nsurl \
- -target asset-fs \
- -target headless-eagl \
+ -target platform-lib \
-jobs ${JOBS}
fi
@@ -143,13 +129,13 @@ if [[ ${BUILD_DYNAMIC} == true ]]; then
GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \
ENABLE_BITCODE=${ENABLE_BITCODE} \
CURRENT_PROJECT_VERSION=${PROJ_VERSION} \
- -project ./build/ios-all/gyp/ios.xcodeproj \
+ -project ./build/ios-all/platform/ios/platform.xcodeproj \
-configuration ${BUILDTYPE} \
-target iossdk \
-jobs ${JOBS}
fi
-LIBS=(core.a platform-ios.a asset-fs.a http-nsurl.a)
+LIBS=(core.a platform-ios.a)
# https://medium.com/@syshen/create-an-ios-universal-framework-148eb130a46c
if [[ "${BUILD_FOR_DEVICE}" == true ]]; then
@@ -159,22 +145,22 @@ if [[ "${BUILD_FOR_DEVICE}" == true ]]; then
libtool -static -no_warning_for_no_symbols \
`find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojsonvt.a` \
-o ${OUTPUT}/static/${NAME}.framework/${NAME} \
- ${LIBS[@]/#/gyp/build/${BUILDTYPE}-iphoneos/libmbgl-} \
- ${LIBS[@]/#/gyp/build/${BUILDTYPE}-iphonesimulator/libmbgl-}
+ ${LIBS[@]/#/build/ios-all/${BUILDTYPE}-iphoneos/libmbgl-} \
+ ${LIBS[@]/#/build/ios-all/${BUILDTYPE}-iphonesimulator/libmbgl-}
fi
if [[ ${BUILD_DYNAMIC} == true ]]; then
step "Copying dynamic framework into place for iOS devices"
cp -r \
- gyp/build/${BUILDTYPE}-iphoneos/${NAME}.framework \
+ build/ios-all/${BUILDTYPE}-iphoneos/${NAME}.framework \
${OUTPUT}/dynamic/
- cp -r gyp/build/${BUILDTYPE}-iphoneos/${NAME}.framework.dSYM \
+ cp -r build/ios-all/${BUILDTYPE}-iphoneos/${NAME}.framework.dSYM \
${OUTPUT}/dynamic/
step "Merging simulator dynamic library into device dynamic library…"
lipo \
- gyp/build/${BUILDTYPE}-iphoneos/${NAME}.framework/${NAME} \
- gyp/build/${BUILDTYPE}-iphonesimulator/${NAME}.framework/${NAME} \
+ build/ios-all/${BUILDTYPE}-iphoneos/${NAME}.framework/${NAME} \
+ build/ios-all/${BUILDTYPE}-iphonesimulator/${NAME}.framework/${NAME} \
-create -output ${OUTPUT}/dynamic/${NAME}.framework/${NAME} | echo
fi
else
@@ -184,15 +170,15 @@ else
libtool -static -no_warning_for_no_symbols \
`find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojsonvt.a` \
-o ${OUTPUT}/static/${NAME}.framework/${NAME} \
- ${LIBS[@]/#/gyp/build/${BUILDTYPE}-iphonesimulator/libmbgl-}
+ ${LIBS[@]/#/build/ios-all/${BUILDTYPE}-iphonesimulator/libmbgl-}
fi
if [[ ${BUILD_DYNAMIC} == true ]]; then
step "Copying dynamic framework into place for iOS Simulator…"
cp -r \
- gyp/build/${BUILDTYPE}-iphonesimulator/${NAME}.framework \
+ build/ios-all/${BUILDTYPE}-iphonesimulator/${NAME}.framework \
${OUTPUT}/dynamic/${NAME}.framework
- cp -r gyp/build/${BUILDTYPE}-iphonesimulator/${NAME}.framework.dSYM \
+ cp -r build/ios-all/${BUILDTYPE}-iphonesimulator/${NAME}.framework.dSYM \
${OUTPUT}/dynamic/
fi
fi