Commits

Tuukka Norri  committed 476307d

Trying to make the IB plug-in to be copied to the assistant's build directory instead

  • Participants
  • Parent commits 9c900db

Comments (0)

Files changed (4)

File BaseTenAssistant/BaseTenAssistant.xcodeproj/project.pbxproj

 			buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Assistant" */;
 			buildPhases = (
 				530602B90A3F112C00C01351 /* Copy BaseTen Frameworks */,
-				53F83767107A85F20017FB36 /* Copy RegexKit.framework */,
+				53F83767107A85F20017FB36 /* Copy Dependencies */,
 				8D1107290486CEB800E47090 /* Resources */,
 				53341E910F6A6C9700EA666F /* Index help */,
 				8D11072C0486CEB800E47090 /* Sources */,
 			shellScript = "source \"$SRCROOT/../Tools/index-assistant-help.sh\"";
 			showEnvVarsInLog = 0;
 		};
-		53F83767107A85F20017FB36 /* Copy RegexKit.framework */ = {
+		53F83767107A85F20017FB36 /* Copy Dependencies */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
 			);
 			inputPaths = (
 			);
-			name = "Copy RegexKit.framework";
+			name = "Copy Dependencies";
 			outputPaths = (
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "source \"$SRCROOT/../Tools/copy-regexkit-for-assistant.sh\"\n";
+			shellScript = "source \"$SRCROOT/../Tools/copy-items-for-assistant.sh\"\n";
 			showEnvVarsInLog = 0;
 		};
 /* End PBXShellScriptBuildPhase section */

File BaseTenAssistant/xcconfig/common.xcconfig

 USER_HEADER_SEARCH_PATHS = $(PROJECT_DIR)
 OTHER_LDFLAGS = -framework RegexKit
 GCC_PREFIX_HEADER = Sources/BaseTenAssistant_Prefix.pch
-IBC_PLUGIN_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR) ../InterfaceBuilderPlugin/build/$(BUILD_STYLE)
+IBC_PLUGIN_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)

File Tools/copy-items-for-assistant.sh

+CP=/bin/cp
+FRAMEWORKS_DIR="$BUILT_PRODUCTS_DIR/BaseTen Assistant.app/Contents/Frameworks/"
+
+if [ ! -d "$BUILT_PRODUCTS_DIR/BaseTen.ibplugin" ]
+then
+    ib_plugin="$SRCROOT/../InterfaceBuilderPlugin/build/$BUILD_STYLE/BaseTen.ibplugin"
+    if [ -d "$ib_plugin" ]
+    then
+        "$CP" -a -f -v "$ib_pluin" "$BUILT_PRODUCTS_DIR"
+    else
+        echo "Didn't find BaseTen.ibplugin!"
+        exit 1
+    fi
+fi
+
+if [ ! -d "$FRAMEWORKS_DIR/RegexKit.framework" ]
+then
+    global_bd_rk="$BUILD_DIR/Release/RegexKit.framework"
+    baseten_bd_rk="$SRCROOT/../build/Release/RegexKit.framework"
+
+    if [ -d "$global_bd_rk" ]
+    then
+        "$CP" -a -f -v "$global_bd_rk" "$FRAMEWORKS_DIR"
+    elif [ -d "$baseten_bd_rk" ]
+    then
+        "$CP" -a -f -v "$baseten_bd_rk" "$FRAMEWORKS_DIR"
+    else
+        echo "Didn't find RegexKit.framework!"
+        exit 1
+    fi
+fi
+
+exit 0

File Tools/copy-regexkit-for-assistant.sh

-CP=/bin/cp
-TARGET_DIR="$BUILT_PRODUCTS_DIR/BaseTen Assistant.app/Contents/Frameworks/"
-
-if [ ! -d "$TARGET_DIR/RegexKit.framework" ]
-then
-    global_bd_rk="$BUILD_DIR/Release/RegexKit.framework"
-    baseten_bd_rk="$SRCROOT/../build/Release/RegexKit.framework"
-
-    if [ -d "$global_bd_rk" ]
-    then
-        "$CP" -a -f -v "$global_bd_rk" "$TARGET_DIR"
-    elif [ -d "$baseten_bd_rk" ]
-    then
-        "$CP" -a -f -v "$baseten_bd_rk" "$TARGET_DIR"
-    else
-        echo "Didn't find RegexKit.framework!"
-        exit 1
-    fi
-fi
-
-exit 0