From cd2955dd07e7ee580e496ea05ab9c2e6a90f1855 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshnikov Date: Mon, 19 Jun 2017 01:32:28 +0300 Subject: [PATCH] Split ios and simulator builds --- Readme.md | 3 +- opt/ios/build_framework.py | 35 +++++++++++++++++------ opt/ios/ngstore.xcodeproj/project.pbxproj | 10 +++---- 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/Readme.md b/Readme.md index 2ab8ca5..8709adf 100644 --- a/Readme.md +++ b/Readme.md @@ -84,7 +84,8 @@ and copy tasks. Also special Android.mk and application.mk files with linked libraries and supported ABIs set. For iOS special Python script *build_framework.py* to build XCode framework. -Special swift file with cast main C types is provided as well. +Carthage support enabled. The special swift wrapper library is at +[separate repository](https://github.com/nextgis/ios_maplib). # License diff --git a/opt/ios/build_framework.py b/opt/ios/build_framework.py index 2cee48b..d54b9a5 100644 --- a/opt/ios/build_framework.py +++ b/opt/ios/build_framework.py @@ -238,12 +238,29 @@ def makeFramework(self, outdir, builddirs): print("Build in:" + args.out, file=sys.stderr) - b = Builder(args.repo, - [ - ("armv7", "iPhoneOS"), - ("armv7s", "iPhoneOS"), - ("arm64", "iPhoneOS"), - ("i386", "iPhoneSimulator"), - ("x86_64", "iPhoneSimulator"), - ]) - b.build(args.out) + if ios: + b1 = Builder(args.repo, + [ + ("armv7", "iPhoneOS"), + ("armv7s", "iPhoneOS"), + ("arm64", "iPhoneOS"), + ]) + b1.build(args.out + '-iphoneos') + + b2 = Builder(args.repo, + [ + ("i386", "iPhoneSimulator"), + ("x86_64", "iPhoneSimulator"), + ]) + b2.build(args.out + '-iphonesimulator') + + else: + b = Builder(args.repo, + [ + ("armv7", "iPhoneOS"), + ("armv7s", "iPhoneOS"), + ("arm64", "iPhoneOS"), + ("i386", "iPhoneSimulator"), + ("x86_64", "iPhoneSimulator"), + ]) + b.build(args.out) diff --git a/opt/ios/ngstore.xcodeproj/project.pbxproj b/opt/ios/ngstore.xcodeproj/project.pbxproj index b0fdf44..5d774fa 100644 --- a/opt/ios/ngstore.xcodeproj/project.pbxproj +++ b/opt/ios/ngstore.xcodeproj/project.pbxproj @@ -129,7 +129,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/usr/bin/python ${SRCROOT}/build_framework.py ${BUILD_DIR}/${CONFIGURATION}-iosuniversal"; + shellScript = "/usr/bin/python ${SRCROOT}/build_framework.py ${BUILD_DIR}/${CONFIGURATION}"; }; /* End PBXShellScriptBuildPhase section */ @@ -167,8 +167,8 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)-iosuniversal"; - CONFIGURATION_TEMP_DIR = "$(PROJECT_TEMP_DIR)/$(CONFIGURATION)-iosuniversal"; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; + CONFIGURATION_TEMP_DIR = "$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -218,8 +218,8 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)-iosuniversal"; - CONFIGURATION_TEMP_DIR = "$(PROJECT_TEMP_DIR)/$(CONFIGURATION)-iosuniversal"; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; + CONFIGURATION_TEMP_DIR = "$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO;