cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject ios commit: renaming commands
Date Tue, 20 Nov 2012 23:10:20 GMT
Updated Branches:
  refs/heads/master 2f1f022db -> acc8b340a


renaming commands


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

Branch: refs/heads/master
Commit: acc8b340aa0e083a2389f3ef98f88945bcbd1df1
Parents: 2f1f022
Author: Anis Kadri <anis.kadri@gmail.com>
Authored: Tue Nov 20 14:56:53 2012 -0800
Committer: Anis Kadri <anis.kadri@gmail.com>
Committed: Tue Nov 20 14:56:53 2012 -0800

----------------------------------------------------------------------
 bin/templates/project/cordova/build |   45 ++++++++++++++++++++++++
 bin/templates/project/cordova/debug |   45 ------------------------
 bin/templates/project/cordova/run   |   56 ++++++++++++++++++++++++++++++
 3 files changed, 101 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/acc8b340/bin/templates/project/cordova/build
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/build b/bin/templates/project/cordova/build
new file mode 100755
index 0000000..a326217
--- /dev/null
+++ b/bin/templates/project/cordova/build
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# compile and launch a Cordova/iOS project to the simulator
+#
+
+set -e
+
+CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
+PROJECT_PATH=$CORDOVA_PATH/..
+
+for file in $PROJECT_PATH/*.xcodeproj; do
+  PROJECT_NAME=$(basename "$file" .xcodeproj)
+done;
+
+cd "$PROJECT_PATH"
+
+APP=build/$PROJECT_NAME.app
+SDK=`xcodebuild -showsdks | grep Sim | tail -1 | awk '{print $6}'`
+
+xcodebuild -project $PROJECT_NAME.xcodeproj -arch i386 -target $PROJECT_NAME -configuration
Debug -sdk $SDK clean build VALID_ARCHS="i386" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build"
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/acc8b340/bin/templates/project/cordova/debug
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/debug b/bin/templates/project/cordova/debug
deleted file mode 100755
index a326217..0000000
--- a/bin/templates/project/cordova/debug
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-# http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#  KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# compile and launch a Cordova/iOS project to the simulator
-#
-
-set -e
-
-CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
-PROJECT_PATH=$CORDOVA_PATH/..
-
-for file in $PROJECT_PATH/*.xcodeproj; do
-  PROJECT_NAME=$(basename "$file" .xcodeproj)
-done;
-
-cd "$PROJECT_PATH"
-
-APP=build/$PROJECT_NAME.app
-SDK=`xcodebuild -showsdks | grep Sim | tail -1 | awk '{print $6}'`
-
-xcodebuild -project $PROJECT_NAME.xcodeproj -arch i386 -target $PROJECT_NAME -configuration
Debug -sdk $SDK clean build VALID_ARCHS="i386" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build"
-
-
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/acc8b340/bin/templates/project/cordova/run
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/run b/bin/templates/project/cordova/run
new file mode 100755
index 0000000..10551fb
--- /dev/null
+++ b/bin/templates/project/cordova/run
@@ -0,0 +1,56 @@
+#! /bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+# http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+set -e
+
+CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
+PROJECT_PATH=$CORDOVA_PATH/..
+
+function getAppPath() {
+	for file in "$( find "$PROJECT_PATH" -type d -name '*.xcodeproj' | sort )"; do
+	  PROJECT_NAME=$(basename "$file" .xcodeproj)
+	done;
+	APP=build/$PROJECT_NAME.app
+	APP_PATH="$PROJECT_PATH/$APP"
+}
+
+APP_PATH=$1
+
+if [ $# -lt 1 ]; then
+	getAppPath
+fi
+
+if [ ! -d "$APP_PATH" ]; then
+	echo "Project '$APP_PATH' is not built. Building."
+  $CORDOVA_PATH/debug || exit $?
+fi
+
+if [ ! -d "$APP_PATH" ]; then
+		echo "$APP_PATH not found to emulate."
+		exit 1
+fi
+
+# launch using ios-sim
+if which ios-sim >/dev/null; then
+    ios-sim launch "$APP_PATH" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log"
&
+else
+    echo -e '\033[31mError: ios-sim was not found. Please download, build and install version
1.4 or greater from https://github.com/phonegap/ios-sim into your path. Or "brew install ios-sim"
using homebrew: http://mxcl.github.com/homebrew/\033[m'; exit 1;
+fi
+


Mime
View raw message