Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Zolotarev <alex@maps.me>2015-09-14 01:41:15 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 03:06:38 +0300
commitb3c941c3f38ed5f44d0f57cc9c88a136ea7a4727 (patch)
tree1961a1012c0e837f6a560a122f91f756ac11aa76
parentec0d93382b6a94e004a074fe4ce08fc32713315a (diff)
[ios] Moved build script out of the project.
-rw-r--r--iphone/Maps/Maps.xcodeproj/project.pbxproj4
-rw-r--r--iphone/Maps/run-script-for-target.sh33
2 files changed, 35 insertions, 2 deletions
diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj
index 654d4bc58e..d275252fd5 100644
--- a/iphone/Maps/Maps.xcodeproj/project.pbxproj
+++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj
@@ -2452,7 +2452,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "LOWERED_CONFIG=`echo $CONFIGURATION | tr [A-Z] [a-z]`\nCONF=\"simulator\"\nDRAPE_CONF=\"old_renderer\"\nif [[ \"$LOWERED_CONFIG\" == *production* || \"$LOWERED_CONFIG\" == *adhoc* ]]; then\nCONF=\"production\"\nelif [[ \"$LOWERED_CONFIG\" == *debug* ]]; then\nCONF=\"debug\"\nelif [[ \"$LOWERED_CONFIG\" == *release* ]]; then\nif [[ \"$LOWERED_CONFIG\" == *simulator* ]]; then\nCONF=\"simulator-release\"\nelse\nCONF=\"release\"\nfi\nfi\n\nif [[ \"$LOWERED_CONFIG\" == *drape* ]]; then\necho \"Drape renderer building\"\nDRAPE_CONF=\"drape\"\nfi\n\n# Respect \"Build for active arch only\" project setting.\nif [[ \"$ONLY_ACTIVE_ARCH\" == YES ]]; then\n if [[ ! -z $CURRENT_ARCH ]]; then\n VALID_ARCHS=\"$CURRENT_ARCH\"\n fi\nfi\n\necho \"Building $CONF configuration\"\nbash \"$SRCROOT/../../tools/autobuild/ios.sh\" $CONF $DRAPE_CONF";
+ shellScript = ". run-script-for-target.sh";
};
FA3A60E715AD5BBD00F40D20 /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
@@ -2466,7 +2466,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "LOWERED_CONFIG=`echo $CONFIGURATION | tr [A-Z] [a-z]`\nCONF=\"simulator\"\nDRAPE_CONF=\"old_renderer\"\nif [[ \"$LOWERED_CONFIG\" == *production* || \"$LOWERED_CONFIG\" == *adhoc* ]]; then\n CONF=\"production\"\nelif [[ \"$LOWERED_CONFIG\" == *debug* ]]; then\n CONF=\"debug\"\nelif [[ \"$LOWERED_CONFIG\" == *release* ]]; then\n if [[ \"$LOWERED_CONFIG\" == *simulator* ]]; then\n CONF=\"simulator-release\"\n else\n CONF=\"release\"\n fi\nfi\n\nif [[ \"$LOWERED_CONFIG\" == *drape* ]]; then\n echo \"Drape renderer building\"\n DRAPE_CONF=\"drape\"\nfi\n\n# Respect \"Build for active arch only\" project setting.\nif [[ \"$ONLY_ACTIVE_ARCH\" == YES ]]; then\n if [[ ! -z $CURRENT_ARCH ]]; then\n VALID_ARCHS=\"$CURRENT_ARCH\"\n fi\nfi\n\necho \"Building $CONF configuration\"\nbash \"$SRCROOT/../../tools/autobuild/ios.sh\" $CONF $DRAPE_CONF";
+ shellScript = ". run-script-for-target.sh";
};
/* End PBXShellScriptBuildPhase section */
diff --git a/iphone/Maps/run-script-for-target.sh b/iphone/Maps/run-script-for-target.sh
new file mode 100644
index 0000000000..53e73079b9
--- /dev/null
+++ b/iphone/Maps/run-script-for-target.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+# This script builds C++ core libs and inserts some private variables.
+# Should be run from Run Script phase in target's settings.
+
+LOWERED_CONFIG=`echo $CONFIGURATION | tr [A-Z] [a-z]`
+CONF="simulator"
+DRAPE_CONF="old_renderer"
+if [[ "$LOWERED_CONFIG" == *production* || "$LOWERED_CONFIG" == *adhoc* ]]; then
+ CONF="production"
+elif [[ "$LOWERED_CONFIG" == *debug* ]]; then
+ CONF="debug"
+elif [[ "$LOWERED_CONFIG" == *release* ]]; then
+ if [[ "$LOWERED_CONFIG" == *simulator* ]]; then
+ CONF="simulator-release"
+ else
+ CONF="release"
+ fi
+fi
+
+if [[ "$LOWERED_CONFIG" == *drape* ]]; then
+ echo "Drape renderer building"
+ DRAPE_CONF="drape"
+fi
+
+# Respect "Build for active arch only" project setting.
+if [[ "$ONLY_ACTIVE_ARCH" == YES ]]; then
+ if [[ ! -z $CURRENT_ARCH ]]; then
+ VALID_ARCHS="$CURRENT_ARCH"
+ fi
+fi
+
+echo "Building $CONF configuration"
+bash "$SRCROOT/../../tools/autobuild/ios.sh" $CONF $DRAPE_CONF