cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: [CB-4408] Modify cordova/build script to build for device (armv7/armv7s)
Date Sat, 27 Jul 2013 00:13:12 GMT
Updated Branches:
  refs/heads/master 5faf43056 -> c87d1b0c6


[CB-4408] Modify cordova/build script to build for device (armv7/armv7s)


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

Branch: refs/heads/master
Commit: c87d1b0c6cfb19f727c7cf79d4c63000eb4ce655
Parents: 5faf430
Author: Shazron Abdullah <shazron@apache.org>
Authored: Fri Jul 26 17:13:02 2013 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Fri Jul 26 17:13:02 2013 -0700

----------------------------------------------------------------------
 bin/templates/project/cordova/build                |  7 +++----
 bin/templates/project/cordova/build.xcconfig       |  5 +++++
 bin/templates/project/cordova/lib/install-emulator | 12 ++++++------
 bin/templates/project/cordova/run                  |  8 ++++----
 4 files changed, 18 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c87d1b0c/bin/templates/project/cordova/build
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/build b/bin/templates/project/cordova/build
index 29951d0..b16e950 100755
--- a/bin/templates/project/cordova/build
+++ b/bin/templates/project/cordova/build
@@ -23,8 +23,6 @@
 # compile and launch a Cordova/iOS project to the simulator
 #
 
-set -e
-
 XCODE_VER=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //')
 XCODE_MIN_VERSION="4.6"
 
@@ -41,7 +39,6 @@ PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
 cd "$PROJECT_PATH"
 
 APP=build/$PROJECT_NAME.app
-SDK=`xcodebuild -showsdks | grep Sim | tail -1 | awk '{print $6}'`
 
 FLAG=${1:---debug}
 OTHER_FLAGS=$2
@@ -57,4 +54,6 @@ if [ "$OTHER_FLAGS" != "" ]; then
 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"
+xcodebuild -xcconfig "$CORDOVA_PATH/build.xcconfig" -project "$PROJECT_NAME.xcodeproj" ARCHS="armv7
armv7s" -target "$PROJECT_NAME" -configuration $CONFIGURATION -sdk iphoneos build VALID_ARCHS="armv7
armv7s" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build/device"
+xcodebuild -project "$PROJECT_NAME.xcodeproj" -arch i386 -target "$PROJECT_NAME" -configuration
$CONFIGURATION -sdk iphonesimulator build VALID_ARCHS="i386" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build/emulator"
+

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c87d1b0c/bin/templates/project/cordova/build.xcconfig
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/build.xcconfig b/bin/templates/project/cordova/build.xcconfig
new file mode 100644
index 0000000..b2febfe
--- /dev/null
+++ b/bin/templates/project/cordova/build.xcconfig
@@ -0,0 +1,5 @@
+// to list all installed iOS identities, run:
+//     security find-identity |  sed -n 's/.*\("[^"]*"\).*/\1/p' | grep 'iPhone'
+
+// generic 'iPhone Developer' (no quotes) will match the right Identity with the right Provisioning
Profile plus Certificate, based on the app bundle id
+CODE_SIGN_IDENTITY = iPhone Developer
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c87d1b0c/bin/templates/project/cordova/lib/install-emulator
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/lib/install-emulator b/bin/templates/project/cordova/lib/install-emulator
index c8d6a14..43e1713 100755
--- a/bin/templates/project/cordova/lib/install-emulator
+++ b/bin/templates/project/cordova/lib/install-emulator
@@ -96,15 +96,15 @@ PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
 XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj  )
 PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
 
-APP_PATH="$PROJECT_PATH/build/$PROJECT_NAME.app"
+SIMULATOR_APP_PATH="$PROJECT_PATH/build/emulator/$PROJECT_NAME.app"
 
-if [ ! -d "$APP_PATH" ]; then
-	echo "Project '$APP_PATH' is not built."
+if [ ! -d "$SIMULATOR_APP_PATH" ]; then
+	echo "Project '$SIMULATOR_APP_PATH' is not built."
     exit 1
 fi
 
-if [ ! -d "$APP_PATH" ]; then
-	echo "$APP_PATH not found to emulate."
+if [ ! -d "$SIMULATOR_APP_PATH" ]; then
+	echo "$SIMULATOR_APP_PATH not found to emulate."
 	exit 1
 fi
 
@@ -123,6 +123,6 @@ if [[ "$IOS_SIM_VERSION" < "$IOS_SIM_MIN_VERSION" ]]; then
 fi
 
 # launch using ios-sim
-ios-sim launch "$APP_PATH" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log"
$TARGET_FLAG --exit
+ios-sim launch "$SIMULATOR_APP_PATH" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log"
$TARGET_FLAG --exit
 
 

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c87d1b0c/bin/templates/project/cordova/run
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/run b/bin/templates/project/cordova/run
index e1ef785..ba6b6bb 100755
--- a/bin/templates/project/cordova/run
+++ b/bin/templates/project/cordova/run
@@ -105,12 +105,12 @@ PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
 XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj  )
 PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
 
-APP_PATH="$PROJECT_PATH/build/$PROJECT_NAME.app"
+SIMULATOR_APP_PATH="$PROJECT_PATH/build/emulator/$PROJECT_NAME.app"
 
 "$CORDOVA_PATH/build" || exit $?
 
-if [ ! -d "$APP_PATH" ]; then
-	echo "$APP_PATH not found to emulate."
+if [ ! -d "$SIMULATOR_APP_PATH" ]; then
+	echo "$SIMULATOR_APP_PATH not found to emulate."
 	exit 1
 fi
 
@@ -129,4 +129,4 @@ if [[ "$IOS_SIM_VERSION" < "$IOS_SIM_MIN_VERSION" ]]; then
 fi
 
 # launch using ios-sim
-ios-sim launch "$APP_PATH" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log"
$TARGET_FLAG &
+ios-sim launch "$SIMULATOR_APP_PATH" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log"
$TARGET_FLAG &


Mime
View raw message