Преглед на файлове

added postscript to cp + ldid etc the framework for testing/dist

Kevin Bradley преди 5 години
родител
ревизия
4db6ae3094
променени са 2 файла, в които са добавени 71 реда и са изтрити 0 реда
  1. 22 0
      FLEX.xcodeproj/project.pbxproj
  2. 49 0
      postScript.sh

+ 22 - 0
FLEX.xcodeproj/project.pbxproj

@@ -1635,6 +1635,7 @@
 				3A4C941B1B5B20570088C3F2 /* Frameworks */,
 				3A4C941C1B5B20570088C3F2 /* Headers */,
 				3A4C941D1B5B20570088C3F2 /* Resources */,
+				325D7AB02593AFF100CC6B10 /* ShellScript */,
 			);
 			buildRules = (
 			);
@@ -1703,6 +1704,27 @@
 		};
 /* End PBXResourcesBuildPhase section */
 
+/* Begin PBXShellScriptBuildPhase section */
+		325D7AB02593AFF100CC6B10 /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputFileListPaths = (
+			);
+			inputPaths = (
+				"$(SRCROOT)/postScript.sh",
+			);
+			outputFileListPaths = (
+			);
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n#!/bin/bash\n\npushd \"$SRCROOT\"\n/bin/bash postScript.sh\n\n\n\n";
+		};
+/* End PBXShellScriptBuildPhase section */
+
 /* Begin PBXSourcesBuildPhase section */
 		1C27A8B21F0E5A0300F0D02D /* Sources */ = {
 			isa = PBXSourcesBuildPhase;

+ 49 - 0
postScript.sh

@@ -0,0 +1,49 @@
+#!/bin/bash
+
+export PATH=/usr/bin/opt/local/bin:/opt/local/sbin:/usr/local/git:$PATH
+export SRCROOT="$SRCROOT"
+
+# only used if we SCP the deb over, and this only happens if dpkg-deb and fauxsu are installed
+ATV_DEVICE_IP=guest-room.local
+
+#say "$SDKROOT"
+
+echo $SDKROOT
+
+BASE_SDK=`basename $SDKROOT`
+
+if [[ $BASE_SDK == *"Simulator"* ]]
+then
+exit 0
+fi
+
+# xcodes path to the the full framework
+
+TARGET_BUILD_FW="$TARGET_BUILD_DIR"/"$PRODUCT_NAME".$WRAPPER_EXTENSION
+
+echo $TARGET_BUILD_FW
+
+DPKG_BUILD_PATH="$SRCROOT"/layout
+FW_FOLDER="$DPKG_BUILD_PATH"/Library/Frameworks
+
+echo $FW_FOLDER
+
+FINAL_FW_PATH=$FW_FOLDER/"$PRODUCT_NAME".$WRAPPER_EXTENSION
+rm -rf "$FINAL_FW_PATH"
+mkdir -p "$FW_FOLDER"
+mkdir -p "$FINAL_FW_PATH"
+cp -r "$TARGET_BUILD_FW" "$FW_FOLDER"
+pushd "$SRCROOT"
+find . -name ".DS_Store" | xargs rm -f
+
+EXE_PATH=$FINAL_FW_PATH/$EXECUTABLE_NAME
+
+ldid -S $EXE_PATH
+rm -rf $FINAL_FW_PATH/_CodeSignature
+#/usr/local/bin/fakeroot dpkg-deb -b layout
+#scp layout.deb root@$ATV_DEVICE_IP:~
+#ssh root@$ATV_DEVICE_IP "dpkg -i layout.deb ; killall -9 PineBoard"
+
+exit 0
+
+