You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2013/07/11 00:06:35 UTC

ios commit: [CB-4088] `cordova emulate ios` replaces spaces in project name with underscores, conflicting with `cordova build ios` behavior

Updated Branches:
  refs/heads/master d5ceebb9a -> 568c7bf7a


[CB-4088] `cordova emulate ios` replaces spaces in project name with underscores, conflicting with `cordova build ios` behavior


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/568c7bf7
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/568c7bf7
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/568c7bf7

Branch: refs/heads/master
Commit: 568c7bf7a3b7b3e1fdec20b17723325f24915430
Parents: d5ceebb
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Jul 10 15:06:23 2013 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Wed Jul 10 15:06:23 2013 -0700

----------------------------------------------------------------------
 .../__TESTING__.xcodeproj/project.pbxproj       | 20 ++++++++++----------
 bin/templates/project/cordova/build             |  4 ++--
 bin/templates/project/cordova/clean             |  4 ++--
 bin/templates/project/cordova/emulate           |  5 ++---
 .../project/cordova/lib/start-emulator          |  2 +-
 bin/templates/project/cordova/run               |  2 +-
 bin/templates/project/cordova/version           |  2 +-
 7 files changed, 19 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/568c7bf7/bin/templates/project/__TESTING__.xcodeproj/project.pbxproj
----------------------------------------------------------------------
diff --git a/bin/templates/project/__TESTING__.xcodeproj/project.pbxproj b/bin/templates/project/__TESTING__.xcodeproj/project.pbxproj
index 2ee5358..97e5eb6 100755
--- a/bin/templates/project/__TESTING__.xcodeproj/project.pbxproj
+++ b/bin/templates/project/__TESTING__.xcodeproj/project.pbxproj
@@ -69,7 +69,7 @@
 		1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
 		1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
 		1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
-		1D6058910D05DD3D006BFB54 /* __TESTING__.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = __TESTING__.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		1D6058910D05DD3D006BFB54 /* __TESTING__.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "__TESTING__.app"; sourceTree = BUILT_PRODUCTS_DIR; };
 		1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
 		1F766FDD13BBADB100FB74C0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Localizable.strings; sourceTree = "<group>"; };
 		1F766FE013BBADB100FB74C0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Localizable.strings; sourceTree = "<group>"; };
@@ -110,7 +110,7 @@
 		5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
 		8D1107310486CEB800E47090 /* __TESTING__-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "__TESTING__-Info.plist"; path = "../__TESTING__-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
 		D4A0D8751607E02300AEF8BB /* Default-568h@2x~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x~iphone.png"; sourceTree = "<group>"; };
-		F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = __TESTING__/config.xml; sourceTree = "<group>"; };
+		F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = "__TESTING__/config.xml"; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -153,7 +153,7 @@
 				1D3623250D0F684500981E51 /* AppDelegate.m */,
 			);
 			name = Classes;
-			path = __TESTING__/Classes;
+			path = "__TESTING__/Classes";
 			sourceTree = SOURCE_ROOT;
 		};
 		19C28FACFE9D520D11CA2CBB /* Products */ = {
@@ -203,7 +203,7 @@
 				29B97316FDCFA39411CA2CEA /* main.m */,
 			);
 			name = "Other Sources";
-			path = __TESTING__;
+			path = "__TESTING__";
 			sourceTree = "<group>";
 		};
 		29B97317FDCFA39411CA2CEA /* Resources */ = {
@@ -218,7 +218,7 @@
 				8D1107310486CEB800E47090 /* __TESTING__-Info.plist */,
 			);
 			name = Resources;
-			path = __TESTING__/Resources;
+			path = "__TESTING__/Resources";
 			sourceTree = "<group>";
 		};
 		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
@@ -259,7 +259,7 @@
 			children = (
 			);
 			name = Plugins;
-			path = __TESTING__/Plugins;
+			path = "__TESTING__/Plugins";
 			sourceTree = SOURCE_ROOT;
 		};
 		308D052D1370CCF300D202BF /* icons */ = {
@@ -320,8 +320,8 @@
 			dependencies = (
 				301BF551109A68C00062928A /* PBXTargetDependency */,
 			);
-			name = __TESTING__;
-			productName = __TESTING__;
+			name = "__TESTING__";
+			productName = "__TESTING__";
 			productReference = 1D6058910D05DD3D006BFB54 /* __TESTING__.app */;
 			productType = "com.apple.product-type.application";
 		};
@@ -501,7 +501,7 @@
 					"\"$(BUILT_PRODUCTS_DIR)/libCordova.a\"",
 					"-ObjC",
 				);
-				PRODUCT_NAME = __TESTING__;
+				PRODUCT_NAME = "__TESTING__";
 				TARGETED_DEVICE_FAMILY = "1,2";
 			};
 			name = Debug;
@@ -532,7 +532,7 @@
 					"\"$(BUILT_PRODUCTS_DIR)/libCordova.a\"",
 					"-ObjC",
 				);
-				PRODUCT_NAME = __TESTING__;
+				PRODUCT_NAME = "__TESTING__";
 				TARGETED_DEVICE_FAMILY = "1,2";
 			};
 			name = Release;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/568c7bf7/bin/templates/project/cordova/build
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/build b/bin/templates/project/cordova/build
index 78fe2c1..b34d576 100755
--- a/bin/templates/project/cordova/build
+++ b/bin/templates/project/cordova/build
@@ -56,5 +56,5 @@ if [ "$OTHER_FLAGS" != "" ]; then
 	exit 2
 fi
 
-$CORDOVA_PATH/clean
-xcodebuild -project $PROJECT_NAME.xcodeproj -arch i386 -target $PROJECT_NAME -configuration $CONFIGURATION -sdk $SDK build VALID_ARCHS="i386" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build"
+"$CORDOVA_PATH/clean"
+xcodebuild -project "$PROJECT_NAME.xcodeproj" -arch i386 -target "$PROJECT_NAME" -configuration $CONFIGURATION -sdk $SDK build VALID_ARCHS="i386" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build"

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/568c7bf7/bin/templates/project/cordova/clean
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/clean b/bin/templates/project/cordova/clean
index 9a386fe..dc356d5 100755
--- a/bin/templates/project/cordova/clean
+++ b/bin/templates/project/cordova/clean
@@ -40,5 +40,5 @@ PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
 
 cd "$PROJECT_PATH"
 
-xcodebuild -project $PROJECT_NAME.xcodeproj -configuration Debug -alltargets clean
-xcodebuild -project $PROJECT_NAME.xcodeproj -configuration Release -alltargets clean
+xcodebuild -project "$PROJECT_NAME.xcodeproj" -configuration Debug -alltargets clean
+xcodebuild -project "$PROJECT_NAME.xcodeproj" -configuration Release -alltargets clean

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/568c7bf7/bin/templates/project/cordova/emulate
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/emulate b/bin/templates/project/cordova/emulate
index 62b1f82..103d110 100755
--- a/bin/templates/project/cordova/emulate
+++ b/bin/templates/project/cordova/emulate
@@ -33,13 +33,13 @@ PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
 XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj  )
 PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
 
-APP_PATH=${1:-$PROJECT_PATH/build/$(xcodebuild -project $PROJECT_PATH/$PROJECT_NAME.xcodeproj -arch i386 -target $PROJECT_NAME -configuration Debug -sdk $SDK -showBuildSettings | grep FULL_PRODUCT_NAME | awk -F ' = ' '{print $2}')}
+APP_PATH=${1:-$PROJECT_PATH/build/$(xcodebuild -project "$PROJECT_PATH/$PROJECT_NAME.xcodeproj" -arch i386 -target "$PROJECT_NAME" -configuration Debug -sdk $SDK -showBuildSettings | grep FULL_PRODUCT_NAME | awk -F ' = ' '{print $2}')}
 
 DEVICE_FAMILY=${2:-${DEVICE_FAMILY:-iphone}}
 
 if [ ! -d "$APP_PATH" ]; then
 	echo "Project '$APP_PATH' is not built. Building."
-    $CORDOVA_PATH/build || exit $?
+    "$CORDOVA_PATH/build" || exit $?
 fi
 
 if [ ! -d "$APP_PATH" ]; then
@@ -63,4 +63,3 @@ fi
 
 # launch using ios-sim
 ios-sim launch "$APP_PATH" --family "$DEVICE_FAMILY" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log" &
-

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/568c7bf7/bin/templates/project/cordova/lib/start-emulator
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/lib/start-emulator b/bin/templates/project/cordova/lib/start-emulator
index d7f6cb3..16eb3ce 100755
--- a/bin/templates/project/cordova/lib/start-emulator
+++ b/bin/templates/project/cordova/lib/start-emulator
@@ -31,5 +31,5 @@ DEFAULT_TARGET="iPhone (Retina 3.5-inch)"
 TARGET=${1:-$DEFAULT_TARGET}
 LIB_PATH=$( cd "$( dirname "$0" )" && pwd -P)
 
-SCPT=`sed -e "s/\\$DEVICE_NAME/$TARGET/g" $LIB_PATH/sim.applescript`
+SCPT=`sed -e "s/\\$DEVICE_NAME/$TARGET/g" "$LIB_PATH/sim.applescript"`
 osascript -e "$SCPT"

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/568c7bf7/bin/templates/project/cordova/run
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/run b/bin/templates/project/cordova/run
index 1c930c9..68c9189 100755
--- a/bin/templates/project/cordova/run
+++ b/bin/templates/project/cordova/run
@@ -103,7 +103,7 @@ PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
 
 APP_PATH="$PROJECT_PATH/build/$PROJECT_NAME.app"
 
-$CORDOVA_PATH/build || exit $?
+"$CORDOVA_PATH/build" || exit $?
 
 if [ ! -d "$APP_PATH" ]; then
 	echo "$APP_PATH not found to emulate."

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/568c7bf7/bin/templates/project/cordova/version
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/version b/bin/templates/project/cordova/version
index f466559..6a9261c 100755
--- a/bin/templates/project/cordova/version
+++ b/bin/templates/project/cordova/version
@@ -30,7 +30,7 @@ CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
 PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
 
 VERSION_FILE_PATH="$PROJECT_PATH/CordovaLib/VERSION"
-VERSION=$(<$VERSION_FILE_PATH)
+VERSION=$(<"$VERSION_FILE_PATH")
 
 if [ -f "$VERSION_FILE_PATH" ]; then
   echo $VERSION