summaryrefslogtreecommitdiff
path: root/ios
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-01-04 17:41:37 +0200
committerTor Lillqvist <tml@iki.fi>2013-01-06 16:00:52 +0200
commit617e5f8ac930d82129a14fb52df925cd0ff524ae (patch)
tree6700267099b874f9a2446f28436740bc10bf8cf3 /ios
parentb95d3caa95384d0fb00ac59f875869371cc70677 (diff)
Hack a bit more on the iOS app build mechanism
There was quite come confusion as to where Xcode wants the Run Script phase (= our gbuild mechanism) to put the executable. I think I got it right now. Xcode can be quite scary as soon as you do anything out of the ordinary. (But then, what isn't.) Change-Id: I22bbdfaef88174815bff66d6c7241f4ba2360246
Diffstat (limited to 'ios')
-rw-r--r--ios/CustomTarget_Viewer_app.mk29
-rw-r--r--ios/experimental/Viewer/.gitignore2
-rw-r--r--ios/experimental/Viewer/Viewer.xcodeproj/project.pbxproj4
-rw-r--r--ios/experimental/Viewer/Viewer/Icon-72.pngbin1358 -> 1247 bytes
4 files changed, 23 insertions, 12 deletions
diff --git a/ios/CustomTarget_Viewer_app.mk b/ios/CustomTarget_Viewer_app.mk
index feb0a46e129b..36cf8c59fa7a 100644
--- a/ios/CustomTarget_Viewer_app.mk
+++ b/ios/CustomTarget_Viewer_app.mk
@@ -28,9 +28,11 @@ endif
# If run from Xcode, check that its configuration (device or
# simulator) matches that of gbuild. We detect being run from Xcode by
-# looking for $(XCODE_VERSION_ACTUAL)
+# looking for $(SCRIPT_OUTPUT_FILE_0). The Run Script build phase in
+# our project has as its (single) output file the location of the app
+# executable in its app bundle.
-ifneq ($(XCODE_VERSION_ACTUAL),)
+ifneq ($(SCRIPT_OUTPUT_FILE_0),)
export CCACHE_CPP2=y
@@ -44,16 +46,25 @@ endif
endif
-APP := Viewer
+ifneq ($(SCRIPT_OUTPUT_FILE_0),)
+# When run from Xcode, we move the Viewer executable from solver into
+# the Viewer.app directory that Xcode uses.
+$(call gb_CustomTarget_get_target,ios/Viewer_app) : $(SCRIPT_OUTPUT_FILE_0)
-ios_Viewer_app_DIR := $(SRC_ROOT)/ios/experimental/Viewer/DerivedData/$(APP)/Build/Products/$(xcode_config)-$(xcode_sdk)/$(APP).app
+$(SCRIPT_OUTPUT_FILE_0) : $(call gb_Executable_get_target,Viewer)
+ $(call gb_Output_announce,$@,fii,APP,2)
+ mkdir -p `dirname $(SCRIPT_OUTPUT_FILE_0)`
+ mv $(call gb_Executable_get_target,Viewer) $(SCRIPT_OUTPUT_FILE_0)
-ios_Viewer_app_EXE := $(ios_Viewer_app_DIR)/Viewer
+else
+# When run just from the command line, we don't have any app bundle to
+# copy or move the executable to. So do nothing.
+$(call gb_CustomTarget_get_target,ios/Viewer_app) : $(call gb_Executable_get_target,Viewer)
-$(call gb_CustomTarget_get_target,ios/Viewer_app) : $(ios_Viewer_app_EXE)
+$(call gb_CustomTarget_get_clean_target,ios/Viewer_app) :
+# Here we just assume that Xcode's settings are default, or something
+ rm -rf experimental/Viewer/build
-$(ios_Viewer_app_EXE): $(call gb_Executable_get_target,Viewer)
- mkdir -p $(ios_Viewer_app_DIR)
- cp $(call gb_Executable_get_target,Viewer) $(ios_Viewer_app_DIR)
+endif
# vim: set noet sw=4 ts=4:
diff --git a/ios/experimental/Viewer/.gitignore b/ios/experimental/Viewer/.gitignore
index 44ac7a8d84fa..e76e0edcf6aa 100644
--- a/ios/experimental/Viewer/.gitignore
+++ b/ios/experimental/Viewer/.gitignore
@@ -1,4 +1,4 @@
.DS_Store
-DerivedData
+build
Viewer.xcodeproj/project.xcworkspace
Viewer.xcodeproj/xcuserdata
diff --git a/ios/experimental/Viewer/Viewer.xcodeproj/project.pbxproj b/ios/experimental/Viewer/Viewer.xcodeproj/project.pbxproj
index 5e65aae892bb..4fad8f0a8a7d 100644
--- a/ios/experimental/Viewer/Viewer.xcodeproj/project.pbxproj
+++ b/ios/experimental/Viewer/Viewer.xcodeproj/project.pbxproj
@@ -187,11 +187,11 @@
inputPaths = (
);
outputPaths = (
- "$(DERIVED_FILE_DIR)/Viewer.app",
+ "$(CONFIGURATION_BUILD_DIR)/$(EXECUTABLE_PATH)",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "cd ../.. && /opt/lo/bin/make";
+ shellScript = "cd ../.. && /opt/lo/bin/make -r";
};
/* End PBXShellScriptBuildPhase section */
diff --git a/ios/experimental/Viewer/Viewer/Icon-72.png b/ios/experimental/Viewer/Viewer/Icon-72.png
index e5a34fd23daf..8a355c2be915 100644
--- a/ios/experimental/Viewer/Viewer/Icon-72.png
+++ b/ios/experimental/Viewer/Viewer/Icon-72.png
Binary files differ