Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ECF60D290 for ; Thu, 23 May 2013 21:58:03 +0000 (UTC) Received: (qmail 99931 invoked by uid 500); 23 May 2013 21:58:01 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 99887 invoked by uid 500); 23 May 2013 21:58:01 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 98784 invoked by uid 99); 23 May 2013 21:58:00 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 May 2013 21:58:00 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 486D46482; Thu, 23 May 2013 21:58:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: braden@apache.org To: commits@cordova.apache.org Date: Thu, 23 May 2013 21:58:35 -0000 Message-Id: In-Reply-To: <2fbd752b392b47399f2f6b051c5b5a22@git.apache.org> References: <2fbd752b392b47399f2f6b051c5b5a22@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [38/50] Add Windows support to Android platform-scripts. http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ea1cf879/lib/cordova-android/bin/templates/cordova/lib/list-started-emulators ---------------------------------------------------------------------- diff --git a/lib/cordova-android/bin/templates/cordova/lib/list-started-emulators b/lib/cordova-android/bin/templates/cordova/lib/list-started-emulators new file mode 100644 index 0000000..7911763 --- /dev/null +++ b/lib/cordova-android/bin/templates/cordova/lib/list-started-emulators @@ -0,0 +1,23 @@ +#!/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. + +set -e + +CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd ) + +bash "$CORDOVA_LIB_PATH"/cordova list-started-emulators \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ea1cf879/lib/cordova-android/bin/templates/cordova/lib/list-started-emulators.bat ---------------------------------------------------------------------- diff --git a/lib/cordova-android/bin/templates/cordova/lib/list-started-emulators.bat b/lib/cordova-android/bin/templates/cordova/lib/list-started-emulators.bat new file mode 100644 index 0000000..f1b3c5d --- /dev/null +++ b/lib/cordova-android/bin/templates/cordova/lib/list-started-emulators.bat @@ -0,0 +1,9 @@ +@ECHO OFF +SET full_path=%~dp0 +IF EXIST %full_path%cordova.js ( + cscript "%full_path%cordova.js" list-started-emulators //nologo +) ELSE ( + ECHO. + ECHO ERROR: Could not find 'cordova.js' in cordova/lib, aborting...>&2 + EXIT /B 1 +) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ea1cf879/lib/cordova-android/bin/templates/cordova/lib/start-emulator ---------------------------------------------------------------------- diff --git a/lib/cordova-android/bin/templates/cordova/lib/start-emulator b/lib/cordova-android/bin/templates/cordova/lib/start-emulator new file mode 100644 index 0000000..8e8964d --- /dev/null +++ b/lib/cordova-android/bin/templates/cordova/lib/start-emulator @@ -0,0 +1,23 @@ +#!/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. + +set -e + +CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd ) + +bash "$CORDOVA_LIB_PATH"/cordova start-emulator "$@" \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ea1cf879/lib/cordova-android/bin/templates/cordova/lib/start-emulator.bat ---------------------------------------------------------------------- diff --git a/lib/cordova-android/bin/templates/cordova/lib/start-emulator.bat b/lib/cordova-android/bin/templates/cordova/lib/start-emulator.bat new file mode 100644 index 0000000..4f3fb5d --- /dev/null +++ b/lib/cordova-android/bin/templates/cordova/lib/start-emulator.bat @@ -0,0 +1,9 @@ +@ECHO OFF +SET full_path=%~dp0 +IF EXIST %full_path%cordova.js ( + cscript "%full_path%cordova.js" start-emulator %* //nologo +) ELSE ( + ECHO. + ECHO ERROR: Could not find 'cordova.js' in cordova/lib, aborting...>&2 + EXIT /B 1 +) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ea1cf879/lib/cordova-android/bin/templates/cordova/log ---------------------------------------------------------------------- diff --git a/lib/cordova-android/bin/templates/cordova/log b/lib/cordova-android/bin/templates/cordova/log index 087a200..01fe107 100755 --- a/lib/cordova-android/bin/templates/cordova/log +++ b/lib/cordova-android/bin/templates/cordova/log @@ -1,3 +1,4 @@ +#!/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 @@ -15,10 +16,8 @@ # specific language governing permissions and limitations # under the License. -#!/bin/bash - set -e CORDOVA_PATH=$( cd "$( dirname "$0" )/.." && pwd ) -bash "$CORDOVA_PATH"/cordova/cordova log +bash "$CORDOVA_PATH"/cordova/lib/cordova log "$@" http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ea1cf879/lib/cordova-android/bin/templates/cordova/log.bat ---------------------------------------------------------------------- diff --git a/lib/cordova-android/bin/templates/cordova/log.bat b/lib/cordova-android/bin/templates/cordova/log.bat index b8cc6be..2c492e7 100644 --- a/lib/cordova-android/bin/templates/cordova/log.bat +++ b/lib/cordova-android/bin/templates/cordova/log.bat @@ -1,18 +1,2 @@ -:: 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. - -%~dp0\cordova.bat log +@ECHO OFF +%~dp0\cordova.bat log %* http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ea1cf879/lib/cordova-android/bin/templates/cordova/release ---------------------------------------------------------------------- diff --git a/lib/cordova-android/bin/templates/cordova/release b/lib/cordova-android/bin/templates/cordova/release deleted file mode 100755 index 73d873e..0000000 --- a/lib/cordova-android/bin/templates/cordova/release +++ /dev/null @@ -1,24 +0,0 @@ -# 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. - -#!/bin/bash - -set -e - -CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd ) - -bash "$CORDOVA_PATH"/cordova release http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ea1cf879/lib/cordova-android/bin/templates/cordova/run ---------------------------------------------------------------------- diff --git a/lib/cordova-android/bin/templates/cordova/run b/lib/cordova-android/bin/templates/cordova/run index 840a8d5..ec352b0 100755 --- a/lib/cordova-android/bin/templates/cordova/run +++ b/lib/cordova-android/bin/templates/cordova/run @@ -1,3 +1,4 @@ +#!/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 @@ -15,10 +16,8 @@ # specific language governing permissions and limitations # under the License. -#!/bin/bash - set -e CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd ) -bash "$CORDOVA_PATH"/cordova run +bash "$CORDOVA_PATH"/lib/cordova run "$@" http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ea1cf879/lib/cordova-android/bin/templates/cordova/run.bat ---------------------------------------------------------------------- diff --git a/lib/cordova-android/bin/templates/cordova/run.bat b/lib/cordova-android/bin/templates/cordova/run.bat index 7c470ed..b1cab64 100644 --- a/lib/cordova-android/bin/templates/cordova/run.bat +++ b/lib/cordova-android/bin/templates/cordova/run.bat @@ -1 +1,2 @@ -%~dp0\cordova.bat run +@ECHO OFF +%~dp0\cordova.bat run %* \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ea1cf879/lib/cordova-android/bin/templates/cordova/version ---------------------------------------------------------------------- diff --git a/lib/cordova-android/bin/templates/cordova/version b/lib/cordova-android/bin/templates/cordova/version new file mode 100644 index 0000000..21147ab --- /dev/null +++ b/lib/cordova-android/bin/templates/cordova/version @@ -0,0 +1,32 @@ +#!/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. + +set -e + +CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P) +PROJECT_PATH="$(dirname "$CORDOVA_PATH")" + +VERSION_FILE_PATH="$PROJECT_PATH/assets/www/cordova.js" + +if [ -f "$VERSION_FILE_PATH" ]; then + JSVersion=$(sed -n '2,2p' assets/www/cordova.js) + echo $JSVersion | sed -e 's/\/\/ //'| cut -f 1 -d '-' +else + echo "The file \"$VERSION_FILE_PATH\" does not exist." + exit 1 +fi