You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/07/05 14:48:30 UTC
[49/51] [partial] Merge master2->master
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/cordova/lib/cordova
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/cordova/lib/cordova b/lib/cordova-android/bin/templates/cordova/lib/cordova
deleted file mode 100644
index 294df49..0000000
--- a/lib/cordova-android/bin/templates/cordova/lib/cordova
+++ /dev/null
@@ -1,386 +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.
-
-PROJECT_PATH=$( cd "$( dirname "$0" )/../.." && pwd )
-
-function list_devices {
- IFS=$'\n'
- devices=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep -v 'emulator'`
- device_list=($devices)
- if [[ ${#device_list[@]} > 0 ]] ; then
- for i in ${devices[@]}
- do
- # remove space and 'device'
- echo ${i/[^a-zA-Z0-9._]device/}
- done
- else
- echo "No devices found."
- exit 2
- fi
-}
-
-function list_started_emulators {
- IFS=$'\n'
- devices=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep 'emulator'`
- emulator_list=($devices)
- if [[ ${#emulator_list[@]} > 0 ]] ; then
- for i in ${emulator_list[@]}
- do
- # remove space and 'device'
- echo ${i/[^a-zA-Z0-9._]device/}
- done
- else
- echo "No started emulators found, you can start an emulator by using the command"
- echo " 'cordova/lib/start-emulator'"
- exit 2
- fi
-}
-
-function list_emulator_images {
- emulator_images=`android list avds | grep "Name:" | cut -f 2 -d ":"`
- emulator_list=($emulator_images)
- if [[ ${#emulator_list[@]} > 0 ]] ; then
- for i in ${emulator_list[@]}
- do
- echo ${i/[^a-zA-Z0-9._]/}
- done
- else
- echo "No emulators found, if you would like to create an emulator follow the instructions"
- echo " provided here : http://developer.android.com/tools/devices/index.html"
- echo " Or run 'android create avd --name <name> --target <targetID>' in on the command line."
- exit 2
- fi
-}
-
-function start_emulator {
- emulator_images=`android list avds | grep "Name:" | cut -f 2 -d ":"`
- # if target emulator is provided
- if [[ "$#" -eq 1 ]] ; then
- # check that it exists
- if [[ $emulator_images =~ $1 ]] ; then
- #xterm -e emulator -avd $1 &
- emulator -avd $1 1> /dev/null 2>&1 &
- else
- echo "Could not find the provided emulator, make sure the emulator exists"
- echo " by checking 'cordova/lib/list-emulator-images'"
- exit 2
- fi
- else
- # start first emulator
- emulator_list=($emulator_images)
- if [[ ${#emulator_list[@]} > 0 ]] ; then
- #xterm -e emulator -avd ${emulator_list[0]} &
- emulator -avd ${emulator_list[0]/[^a-zA-Z0-9._]/} 1> /dev/null 2>&1 &
- else
- echo "No emulators found, if you would like to create an emulator follow the instructions"
- echo " provided here : http://developer.android.com/tools/devices/index.html"
- echo " Or run 'android create avd --name <name> --target <targetID>' in on the command line."
- exit 2
- fi
- fi
-}
-
-function install_device {
- IFS=$'\n'
- devices=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep -v 'emulator'`
- device_list=($devices)
- if [[ ${#device_list[@]} > 0 ]] ; then
- apks=`find $PROJECT_PATH/bin -type f -maxdepth 1 | egrep '\.apk$'`
- apk_list=($apks)
- if [[ ${#apk_list[@]} > 0 ]] ; then
- local target
- # handle target emulator
- if [[ "$#" -eq 1 ]] ; then
- # deploy to given target
- target=${1/--target=/}
- else
- # delete trailing space and 'device' after device ID
- target=${device_list[0]/[^a-zA-Z0-9._]device/}
- fi
- echo "Installing ${apk_list[0]} onto device $target..."
- adb -s $target install -r ${apk_list[0]};
- echo "Launching application..."
- local launch_str=$(java -jar "$PROJECT_PATH"/cordova/appinfo.jar "$PROJECT_PATH"/AndroidManifest.xml)
- adb -s $target shell am start -W -a android.intent.action.MAIN -n $launch_str
- else
- echo "Application package not found, could not install to device"
- echo " make sure your application is built before deploying."
- exit 2
- fi
- else
- echo "No devices found to deploy to. Please make sure your device is connected"
- echo " and you can view it using the 'cordova/lib/list-devices' command."
- exit 2
- fi
-}
-
-function install_emulator {
- IFS=$'\n'
- # check that there is an emulator to deploy to
- emulator_string=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'emulator'`
- emulator_list=($emulator_string)
- if [[ ${#emulator_list[@]} > 0 ]] ; then
- apks=`find $PROJECT_PATH/bin -type f -maxdepth 1 | egrep '\.apk$'`
- apk_list=($apks)
- if [[ ${#apk_list[@]} > 0 ]] ; then
- local target
- # handle target emulator
- if [[ "$#" -eq 1 ]] ; then
- # deploy to given target
- target=${1/--target=/}
- else
- # delete trailing space and 'device' after emulator ID
- target=${emulator_list[0]/[^a-zA-Z0-9._]device/}
- fi
- echo "Installing ${apk_list[0]} onto $target..."
- adb -s $target install -r ${apk_list[0]};
- echo "Launching application..."
- local launch_str=$(java -jar "$PROJECT_PATH"/cordova/appinfo.jar "$PROJECT_PATH"/AndroidManifest.xml)
- adb -s $target shell am start -W -a android.intent.action.MAIN -n $launch_str
-
- else
- echo "Application package not found, could not install to device"
- echo " make sure your application is built before deploying."
- exit 2
- fi
- else
- echo "No emulators found to deploy to. Please make sure your emulator is started"
- echo " and you can view it using the 'cordova/lib/list-started-emulators' command."
- exit 2
- fi
-}
-
-# cleans the project
-function clean {
- echo "Cleaning project..."
- ant clean
-}
-
-# has to be used independently and not in conjunction with other commands
-function log {
- # filter out nativeGetEnabledTags spam from latest sdk bug.
- adb logcat | grep -v nativeGetEnabledTags
-}
-
-
-function build {
- if [[ "$#" -eq 1 ]] ; then
- if [[ $1 == "--debug" ]] ; then
- clean
- ant debug -f "$PROJECT_PATH"/build.xml
- elif [[ $1 == "--release" ]] ; then
- clean
- ant release -f "$PROJECT_PATH"/build.xml
- elif [[ $1 == "--nobuild" ]] ; then
- echo "Skipping build..."
- else
- echo "Error : Build command '$1' not recognized."
- exit 2
- fi
- else
- echo "Warning : [ --debug | --release | --nobuild ] not specified, defaulting to --debug"
- clean
- ant debug -f "$PROJECT_PATH"/build.xml
- fi
-}
-
-
-function wait_for_emulator {
- emulator_string=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep 'emulator'`
- old_started=($emulator_string)
- local new_started
- local new_emulator_name
- local i="0"
- echo -n "Waiting for emulator..."
- while [ $i -lt 300 ]
- do
- emulator_string=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep 'emulator'`
- new_started=($emulator_string)
- if [[ ${#new_started[@]} > ${#old_started[@]} && -z "$new_emulator_name" ]] ; then
- # get the name of the started emulator
- local count="0"
- if [[ ${#old_started[@]} == 0 ]] ; then
- new_emulator_name=${new_started[$count]/[^a-zA-Z0-9._]device/}
- else
- for count in {0...${#old_started[@]}}
- do
- if [[ ! ${new_started[$count]} == ${old_started[$count]} ]] ; then
- new_emulator_name=${new_started[$count]/[^a-zA-Z0-9._]device/}
- fi
- done
- if [[ -z "$new_emulator_name" ]] ; then
- count=$[count+1]
- new_emulator_name=${new_started[$count]/[^a-zA-Z0-9._]device/}
- fi
- fi
- elif [[ "$new_emulator_name" ]] ; then
- boot_anim=`adb -s $new_emulator_name shell getprop init.svc.bootanim`
- if [[ $boot_anim =~ "stopped" ]] ; then
- break
- else
- sleep 1
- i=$[i+1]
- echo -n "."
- fi
- else
- sleep 1
- i=$[i+1]
- echo -n "."
- fi
- done
- # Device timeout: emulator has not started in time
- if [ $i -eq 300 ]
- then
- echo "emulator timeout!"
- exit 69
- else
- echo "connected!"
- fi
-}
-
-function run {
- IFS=$'\n'
- if [[ "$#" -eq 2 ]] ; then
- build $2
- if [[ $1 == "--device" ]] ; then
- install_device
- elif [[ $1 == "--emulator" ]] ; then
- install_emulator
- elif [[ $1 =~ "--target=" ]]; then
- install_device $1
- else
- echo "Error : '$1' is not recognized as an install option"
- fi
- elif [[ "$#" -eq 1 ]] ; then
- if [[ $1 == "--debug" || $1 == "--release" || $1 == "--nobuild" ]] ; then
- build $1
- elif [[ $1 == "--device" ]] ; then
- install_device
- elif [[ $1 == "--emulator" ]] ; then
- install_emulator
- elif [[ $1 =~ "--target=" ]]; then
- install_device $1
- else
- echo "Error : '$1' is not recognized as an install option"
- fi
- else
- echo "Warning : [ --device | --emulate | --target=<targetID> ] not specified, using defaults."
- build
- devices=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep -v 'emulator'`
- device_list=($devices)
- emulator_string=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}' | grep 'device' | grep 'emulator'`
- emulator_list=($emulator_string)
- if [[ ${#device_list[@]} > 0 ]] ; then
- install_device
- elif [[ ${#emulator_list[@]} > 0 ]] ; then
- install_emulator
- else
- emulator_images=`android list avds | grep "Name:" | cut -f 2 -d ":"`
- echo $emulator_images
- emulator_image_list=($emulator_images)
- if [[ ${#emulator_image_list[@]} > 0 ]] ; then
- echo "Starting emulator : ${emulator_image_list[0]}"
- emulator -avd ${emulator_image_list[0]/[^.\w]/} 1> /dev/null 2>&1 &
- wait_for_emulator
- install_emulator
- else
- # TODO : look for emulator images and start one if it's availible
- echo "Error : there are no availible devices or emulators to deploy to."
- echo " create an emulator or connect your device to run this command."
- echo "If you would like to create an emulator follow the instructions"
- echo " provided here : http://developer.android.com/tools/devices/index.html"
- echo " Or run 'android create avd --name <name> --target <targetID>' in on the command line."
- exit 2
- fi
- fi
- fi
-}
-
-# parse command line arguments
-
-if [[ $# > 3 ]] ; then
- echo "Error : too many arguments."
- exit 2
-elif [[ $# == 3 ]] ; then
- if [[ $1 == "run" ]] ; then
- run $2 $3
- else
- echo "Error : too many arguments for '$1'"
- exit 2
- fi
-elif [[ $# == 2 ]] ; then
- if [[ $1 == "run" ]] ; then
- if [[ $2 == "--emulator" || $2 == "--device" || $2 =~ "--target=" ]] ; then
- run $2 ''
- elif [[ $2 == "--debug" || $2 == "--release" || $2 == "--nobuild" ]] ; then
- run '' $2
- else
- echo "Error : '$2' is not recognized as a run option."
- exit 2
- fi
- elif [[ $1 == "build" ]] ; then
- build $2
- elif [[ $1 == "start-emulator" ]] ; then
- start_emulator $2
- elif [[ $1 == "install-device" ]] ; then
- if [[ $2 =~ "--target=" ]] ; then
- install_device $2
- else
- echo "Error : '$2' is not recognized as an install option"
- exit 2
- fi
- elif [[ $1 == "install-emulator" ]] ; then
- if [[ $2 =~ "--target=" ]] ; then
- install_emulator $2
- else
- echo "Error : '$2' is not recognized as an install option"
- exit 2
- fi
- else
- echo "Error : '$1' is not recognized as an option that takes arguments"
- exit 2
- fi
-elif [[ $# == 1 ]] ; then
- if [[ $1 == "run" ]] ; then
- run
- elif [[ $1 == "build" ]]; then
- build
- elif [[ $1 == "clean" ]]; then
- clean
- elif [[ $1 == "log" ]]; then
- log
- elif [[ $1 == "list-devices" ]]; then
- list_devices
- elif [[ $1 == "list-emulator-images" ]]; then
- list_emulator_images
- elif [[ $1 == "list-started-emulators" ]]; then
- list_started_emulators
- elif [[ $1 == "install-device" ]]; then
- install_device
- elif [[ $1 == "install-emulator" ]]; then
- install_emulator
- elif [[ $1 == "start-emulator" ]]; then
- start_emulator
- else
- echo "Error : '$1' is not recognized as a tooling command."
- exit 2
- fi
-else
- echo "Error : No command recieved, exiting..."
- exit 2
-fi
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/cordova/lib/cordova.js
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/cordova/lib/cordova.js b/lib/cordova-android/bin/templates/cordova/lib/cordova.js
deleted file mode 100644
index 28f9b3e..0000000
--- a/lib/cordova-android/bin/templates/cordova/lib/cordova.js
+++ /dev/null
@@ -1,593 +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.
-
-var ROOT = WScript.ScriptFullName.split('\\cordova\\lib\\cordova.js').join(''),
- shell = WScript.CreateObject("WScript.Shell"),
- fso = WScript.CreateObject('Scripting.FileSystemObject');
-
-
-// log to stdout or stderr
-function Log(msg, error) {
- if (error) {
- WScript.StdErr.WriteLine(msg);
- }
- else {
- WScript.StdOut.WriteLine(msg);
- }
-}
-
-// executes a commmand in the shell, returning stdout
-function exec(command) {
- var oExec=shell.Exec(command);
- var output = new String();
- while (oExec.Status == 0) {
- if (!oExec.StdOut.AtEndOfStream) {
- var line = oExec.StdOut.ReadLine();
- output += line;
- }
- WScript.sleep(100);
- }
- return output;
-}
-
-// executes a command in the shell, returns stdout or stderr if error
-function exec_out(command) {
- var oExec=shell.Exec(command);
- var output = new String();
- while (oExec.Status == 0) {
- if (!oExec.StdOut.AtEndOfStream) {
- var line = oExec.StdOut.ReadLine();
- // XXX: Change to verbose mode
- // WScript.StdOut.WriteLine(line);
- output += line;
- }
- WScript.sleep(100);
- }
- //Check to make sure our scripts did not encounter an error
- if (!oExec.StdErr.AtEndOfStream) {
- var line = oExec.StdErr.ReadAll();
- return {'error' : true, 'output' : line};
- }
- return {'error' : false, 'output' : output};
-}
-
-// executes a commmand in the shell and outputs stdout and fails on stderr
-function exec_verbose(command) {
- //Log("Command: " + command);
- var oShell=shell.Exec(command);
- while (oShell.Status == 0) {
- //Wait a little bit so we're not super looping
- WScript.sleep(100);
- //Print any stdout output from the script
- if (!oShell.StdOut.AtEndOfStream) {
- var line = oShell.StdOut.ReadLine();
- Log(line);
- }
- }
- //Check to make sure our scripts did not encounter an error
- if (!oShell.StdErr.AtEndOfStream) {
- var line = oShell.StdErr.ReadAll();
- Log(line, true);
- WScript.Quit(2);
- }
-}
-
-function get_devices() {
- var device_list = []
- var local_devices = shell.Exec("%comspec% /c adb devices").StdOut.ReadAll();
- if (local_devices.match(/\w+\tdevice/)) {
- devices = local_devices.split('\r\n');
- //format (ID DESCRIPTION)
- for (i in devices) {
- if (devices[i].match(/\w+\tdevice/) && !devices[i].match(/emulator/)) {
- device_list.push(devices[i].replace(/\t/, ' '));
- }
- }
- }
- return device_list
-}
-
-function list_devices() {
- var devices = get_devices();
- if (devices.length > 0) {
- for (i in devices) {
- Log(devices[i]);
- }
- }
- else {
- Log('No devices found, if your device is connected and not showing,');
- Log(' then try and install the drivers for your device.');
- Log(' http://developer.android.com/tools/extras/oem-usb.html');
- }
-
-}
-
-function get_emulator_images() {
- // discription contains all data recieved squashed onto one line
- var add_description = true;
- var avd_list = [];
- var local_emulators = shell.Exec("%comspec% /c android list avds").StdOut.ReadAll();
- if (local_emulators.match(/Name\:/)) {
- emulators = local_emulators.split('\n');
- //format (ID DESCRIPTION)
- var count = 0;
- var output = '';
- for (i in emulators) {
- if (emulators[i].match(/Name\:/)) {
- var emulator_name = emulators[i].replace(/\s*Name\:\s/, '') + ' ';
- if (add_description) {
- count = 1;
- output += emulator_name
- }
- else {
- avd_list.push(emulator_name);
- }
- }
- // add description if indicated (all data squeezed onto one line)
- if (count > 0) {
- var emulator_description = emulators[i].replace(/\s*/g, '');
- if (count > 4) {
- avd_list.push(output + emulator_description);
- count = 0;
- output = '';
- }
- else {
- count++;
- output += emulator_description + ' '
- }
- }
- }
- }
- return avd_list;
-}
-
-function list_emulator_images() {
- var images = get_emulator_images();
- if (images.length > 0) {
- for(i in images) {
- Log(images[i]);
- }
- }
- else {
- Log('No emulators found, if you would like to create an emulator follow the instructions');
- Log(' provided here : http://developer.android.com/tools/devices/index.html');
- Log(' Or run \'android create avd --name <name> --target <targetID>\' in on the command line.');
- }
-}
-
-function get_started_emulators() {
- var started_emulators = [];
- var local_devices = shell.Exec("%comspec% /c adb devices").StdOut.ReadAll();
- if (local_devices.match(/emulator/)) {
- devices = local_devices.split('\r\n');
- //format (ID DESCRIPTION)
- for (i in devices) {
- if (devices[i].match(/\w+\tdevice/) && devices[i].match(/emulator/)) {
- started_emulators.push(devices[i].replace(/\t/, ' '));
- }
- }
- }
- return started_emulators
-}
-
-function list_started_emulators() {
- var images = get_started_emulators();
- if (images.length > 0) {
- for(i in images) {
- Log(images[i]);
- }
- }
- else {
- Log('No started emulators found, if you would like to start an emulator call \'list-emulator-images\'');
- Log(' to get the name of an emulator and then start the emulator with \'start-emulator <Name>\'');
- }
-}
-
-function start_emulator(name) {
- var emulators = get_emulator_images();
- var started_emulators = get_started_emulators();
- var num_started = started_emulators.length;
- var emulator_name;
- var started = false;
- if (name) {
- for (i in emulators) {
- if (emulators[i].substr(0,name.length) == name) {
- Log("Starting emulator : " + name);
- shell.Run("%comspec% /c start cmd /c emulator -avd " + name);
- //shell.Run("%comspec% /c start cmd /c emulator -cpu-delay 0 -no-boot-anim -cache %Temp%\cache -avd " + name);
- started = true;
- }
- }
- }
- else {
- if (emulators.length > 0 && started_emulators < 1) {
- emulator_name = emulators[0].split(' ', 1)[0];
- start_emulator(emulator_name);
- return;
- } else if (started_emulators.length > 0) {
- Log("Emulator already started : " + started_emulators[0].split(' ', 1));
- return;
- } else {
- Log("Error : unable to start emulator, ensure you have emulators availible by checking \'list-emulator-images\'", true);
- WScript.Quit(2);
- }
- }
- if (!started) {
- Log("Error : unable to start emulator, ensure you have emulators availible by checking \'list-emulator-images\'", true);
- WScript.Quit(2);
- }
- else { // wait for emulator to boot before returning
- WScript.Stdout.Write('Booting up emulator..');
- var boot_anim = null;
- var emulator_ID = null;
- var new_started = get_started_emulators();
- var i = 0;
- // use boot animation property to tell when boot is complete.
- while ((boot_anim == null || !boot_anim.output.match(/stopped/)) && i < 100) {
- if (new_started.length > started_emulators.length && emulator_ID == null) {
- // find new emulator that was just started to get it's ID
- for(var i = 0; i < new_started.length; i++) {
- if (new_started[i] != started_emulators[i]) {
- emulator_ID = new_started[i].split(' ', 1)[0];
- boot_anim = exec_out('%comspec% /c adb -s ' + emulator_ID + ' shell getprop init.svc.bootanim');
- break;
- }
- }
- }
- else if (boot_anim == null) {
- new_started = get_started_emulators();
- }
- else {
- boot_anim = exec_out('%comspec% /c adb -s ' + emulator_ID + ' shell getprop init.svc.bootanim');
- }
- i++;
- WScript.Stdout.Write('.');
- WScript.Sleep(2000);
- }
- if (i < 100) {
- Log('\nBoot Complete!');
- } else {
- Log('\nEmulator boot timed out. Failed to load emulator');
- WScript.Quit(2);
- }
- }
-}
-
-function install_device(target) {
- var devices = get_devices();
- var use_target = false;
- if (devices.length < 1) {
- Log("Error : No devices found to install to, make sure there are devices", true);
- Log(" availible by checking \'<project_dir>\\cordova\\lib\\list-devices\'", true);
- WScript.Quit(2);
- }
- if (target) {
- var exists = false;
- for (i in devices) {
- if (devices[i].substr(0,target.length) == target)
- {
- exists = true;
- break;
- }
- }
- if (!exists) {
- Log("Error : Unable to find target " + target, true);
- Log("Please ensure the target exists by checking \'<project>\\cordova\\lib\\list-devices'");
- WScript.Quit(2);
- }
- use_target = true;
- }
- // check if file .apk has been created
- if (fso.FolderExists(ROOT + '\\bin')) {
- var path_to_apk;
- var out_folder = fso.GetFolder(ROOT + '\\bin');
- var out_files = new Enumerator(out_folder.Files);
- for (;!out_files.atEnd(); out_files.moveNext()) {
- var path = out_files.item() + '';
- if (fso.GetExtensionName(path) == 'apk' && !path.match(/unaligned/)) {
- path_to_apk = out_files.item();
- break;
- }
- }
- if (path_to_apk) {
- var launch_name = exec_out("%comspec% /c java -jar "+ROOT+"\\cordova\\appinfo.jar "+ROOT+"\\AndroidManifest.xml");
- if (launch_name.error) {
- Log("Failed to get application name from appinfo.jar + AndroidManifest : ", true);
- Log("Output : " + launch_name.output, true);
- WScript.Quit(2);
- }
- // install on device (-d)
- Log("Installing app on device...");
- var cmd;
- if (use_target) {
- cmd = '%comspec% /c adb -s ' + target + ' install -r ' + path_to_apk;
- } else {
- cmd = '%comspec% /c adb -s ' + devices[0].split(' ', 1)[0] + ' install -r ' + path_to_apk;
- }
- var install = exec_out(cmd);
- if ( install.error && install.output.match(/Failure/)) {
- Log("Error : Could not install apk to device : ", true);
- Log(install.output, true);
- WScript.Quit(2);
- }
- else {
- Log(install.output);
- }
- // run on device
- Log("Launching application...");
- cmd;
- if (use_target) {
- cmd = '%comspec% /c adb -s ' + target + ' shell am start -W -a android.intent.action.MAIN -n ' + launch_name.output;
- } else {
- cmd = '%comspec% /c adb -s ' + devices[0].split(' ', 1)[0] + ' shell am start -W -a android.intent.action.MAIN -n ' + launch_name.output;
- }
- exec_verbose(cmd);
- }
- else {
- Log('Failed to find apk, make sure you project is built and there is an ', true);
- Log(' apk in <project>\\bin\\. To build your project use \'<project>\\cordova\\build\'', true);
- WScript.Quit(2);
- }
- }
-}
-
-function install_emulator(target) {
- var emulators = get_started_emulators();
- var use_target = false;
- if (emulators.length < 1) {
- Log("Error : No emulators found to install to, make sure there are emulators", true);
- Log(" availible by checking \'<project_dir>\\cordova\\lib\\list-started-emulators\'", true);
- WScript.Quit(2);
- }
- if (target) {
- var exists = false;
- for (i in emulators) {
- if (emulators[i].substr(0,target.length) == target)
- {
- exists = true;
- break;
- }
- }
- if (!exists) {
- Log("Error : Unable to find target " + target, true);
- Log("Please ensure the target exists by checking \'<project>\\cordova\\lib\\list-started-emulators'")
- }
- use_target = true;
- } else {
- target = emulators[0].split(' ', 1)[0];
- Log("Deploying to emulator : " + target);
- }
- // check if file .apk has been created
- if (fso.FolderExists(ROOT + '\\bin')) {
- var path_to_apk;
- var out_folder = fso.GetFolder(ROOT + '\\bin');
- var out_files = new Enumerator(out_folder.Files);
- for (;!out_files.atEnd(); out_files.moveNext()) {
- var path = out_files.item() + '';
- if (fso.GetExtensionName(path) == 'apk' && !path.match(/unaligned/)) {
- path_to_apk = out_files.item();
- break;
- }
- }
- if (path_to_apk) {
- var launch_name = exec_out("%comspec% /c java -jar "+ROOT+"\\cordova\\appinfo.jar "+ROOT+"\\AndroidManifest.xml");
- if (launch_name.error) {
- Log("Failed to get application name from appinfo.jar + AndroidManifest : ", true);
- Log("Output : " + launch_name.output, true);
- WScript.Quit(2);
- }
- // install on emulator (-e)
- Log("Installing app on emulator...");
- var cmd = '%comspec% /c adb -s ' + target + ' install -r ' + path_to_apk;
- var install = exec_out(cmd);
- if ( install.error && install.output.match(/Failure/)) {
- Log("Error : Could not install apk to emulator : ", true);
- Log(install.output, true);
- WScript.Quit(2);
- }
- else {
- Log(install.output);
- }
- // run on emulator
- Log("Launching application...");
- cmd;
- if (use_target) {
- cmd = '%comspec% /c adb -s ' + target + ' shell am start -W -a android.intent.action.MAIN -n ' + launch_name.output;
- } else {
- cmd = '%comspec% /c adb -s ' + emulators[0].split(' ', 1)[0] + ' shell am start -W -a android.intent.action.MAIN -n ' + launch_name.output
- }
- exec_verbose(cmd);
- }
- else {
- Log('Failed to find apk, make sure you project is built and there is an ', true);
- Log(' apk in <project>\\bin\\. To build your project use \'<project>\\cordova\\build\'', true);
- WScript.Quit(2);
- }
- }
- else {
- Log('Failed to find apk, make sure you project is built and there is an ', true);
- Log(' apk in <project>\\bin\\. To build your project use \'<project>\\cordova\\build\'', true);
- WScript.Quit(2);
- }
-}
-
-function clean() {
- Log("Cleaning project...");
- exec("%comspec% /c ant.bat clean -f "+ROOT+"\\build.xml 2>&1");
-}
-
-function build(build_type) {
- if (build_type) {
- switch (build_type) {
- case "--debug" :
- clean();
- Log("Building project...");
- exec_verbose("%comspec% /c ant.bat debug -f "+ROOT+"\\build.xml 2>&1");
- break;
- case "--release" :
- clean();
- Log("Building project...");
- exec_verbose("%comspec% /c ant.bat release -f "+ROOT+"\\build.xml 2>&1");
- break;
- case "--nobuild" :
- Log("Skipping build process.");
- break;
- default :
- Log("Build option not recognized: " + build_type, true);
- WScript.Quit(2);
- break;
- }
- }
- else {
- Log("WARNING: [ --debug | --release | --nobuild ] not specified, defaulting to --debug.");
- exec_verbose("%comspec% /c ant.bat debug -f "+ROOT+"\\build.xml 2>&1");
- }
-}
-
-function log() {
- // filter out nativeGetEnabledTags spam from latest sdk bug.
- shell.Run("%comspec% /c adb logcat | grep -v nativeGetEnabledTags");
-}
-
-function run(target, build_type) {
- var use_target = false;
- if (!target) {
- Log("WARNING: [ --target=<ID> | --emulator | --device ] not specified, using defaults");
- }
- // build application
- build(build_type);
- // attempt to deploy to connected device
- var devices = get_devices();
- if (devices.length > 0 || target == "--device") {
- if (target) {
- if (target.substr(0,9) == "--target=") {
- install_device(target.split('--target=').join(''))
- } else if (target == "--device") {
- install_device();
- } else {
- Log("Did not regognize " + target + " as a run option.", true);
- WScript.Quit(2);
- }
- }
- else {
- Log("WARNING: [ --target=<ID> | --emulator | --device ] not specified, using defaults");
- install_device();
- }
- }
- else {
- var emulators = get_started_emulators();
- if (emulators.length > 0) {
- install_emulator();
- }
- else {
- var emulator_images = get_emulator_images();
- if (emulator_images.length < 1) {
- Log('No emulators found, if you would like to create an emulator follow the instructions', true);
- Log(' provided here : http://developer.android.com/tools/devices/index.html', true);
- Log(' Or run \'android create avd --name <name> --target <targetID>\' in on the command line.', true);
- WScript.Quit(2);
- }
- start_emulator(emulator_images[0].split(' ')[0]);
- emulators = get_started_emulators();
- if (emulators.length > 0) {
- install_emulator();
- }
- else {
- Log("Error : emulator failed to start.", true);
- WScript.Quit(2);
- }
- }
- }
-}
-
-var args = WScript.Arguments;
-if (args.count() == 0) {
- Log("Error: no args provided.");
- WScript.Quit(2);
-}
-else {
- if (args(0) == "build") {
- if (args.Count() > 1) {
- build(args(1))
- } else {
- build();
- }
- } else if (args(0) == "clean") {
- clean();
- } else if (args(0) == "list-devices") {
- list_devices();
- } else if (args(0) == "list-emulator-images") {
- list_emulator_images();
- } else if (args(0) == "list-started-emulators") {
- list_started_emulators();
- } else if (args(0) == "start-emulator") {
- if (args.Count() > 1) {
- start_emulator(args(1))
- } else {
- start_emulator();
- }
- } else if (args(0) == "log") {
- log();
- } else if (args(0) == "install-emulator") {
- if (args.Count() == 2) {
- if (args(1).substr(0,9) == "--target=") {
- install_emulator(args(1).split('--target=').join(''));
- } else {
- Log('Error: \"' + args(1) + '\" is not recognized as an install option', true);
- WScript.Quit(2);
- }
- } else {
- install_emulator();
- }
- } else if (args(0) == "install-device") {
- if (args.Count() == 2) {
- if (args(1).substr(0,9) == "--target=") {
- install_device(args(1).split('--target=').join(''));
- } else {
- Log('Error: \"' + args(1) + '\" is not recognized as an install option', true);
- WScript.Quit(2);
- }
- } else {
- install_device();
- }
- } else if (args(0) == "run") {
- if (args.Count() == 3) {
- run(args(1), args(2));
- }
- else if (args.Count() == 2) {
- if (args(1).substr(0,9) == "--target=" ||
- args(1) == "--emulator" ||
- args(1) == "--device") {
- run(args(1));
- } else if (args(1) == "--debug" ||
- args(1) == "--release" ||
- args(1) == "--nobuild") {
- run(null, args(1))
- } else {
- Log('Error: \"' + args(1) + '\" is not recognized as a run option', true);
- WScript.Quit(2);
- }
- }
- else {
- run();
- }
- } else {
- Log('Error: \"' + args(0) + '\" is not recognized as a tooling command', true);
- WScript.Quit(2);
- }
-}
-
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/cordova/lib/install-device
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/cordova/lib/install-device b/lib/cordova-android/bin/templates/cordova/lib/install-device
deleted file mode 100644
index 604b5ae..0000000
--- a/lib/cordova-android/bin/templates/cordova/lib/install-device
+++ /dev/null
@@ -1,23 +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.
-
-set -e
-
-CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_LIB_PATH"/cordova install-device "$@"
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/cordova/lib/install-device.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/cordova/lib/install-device.bat b/lib/cordova-android/bin/templates/cordova/lib/install-device.bat
deleted file mode 100644
index 52d9775..0000000
--- a/lib/cordova-android/bin/templates/cordova/lib/install-device.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%cordova.js (
- cscript "%full_path%cordova.js" install-device %* //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/ac0c95be/lib/cordova-android/bin/templates/cordova/lib/install-emulator
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/cordova/lib/install-emulator b/lib/cordova-android/bin/templates/cordova/lib/install-emulator
deleted file mode 100644
index 105e2ee..0000000
--- a/lib/cordova-android/bin/templates/cordova/lib/install-emulator
+++ /dev/null
@@ -1,23 +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.
-
-set -e
-
-CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_LIB_PATH"/cordova install-emulator "$@"
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/cordova/lib/install-emulator.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/cordova/lib/install-emulator.bat b/lib/cordova-android/bin/templates/cordova/lib/install-emulator.bat
deleted file mode 100644
index d11a7be..0000000
--- a/lib/cordova-android/bin/templates/cordova/lib/install-emulator.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%cordova.js (
- cscript "%full_path%cordova.js" install-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/ac0c95be/lib/cordova-android/bin/templates/cordova/lib/list-devices
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/cordova/lib/list-devices b/lib/cordova-android/bin/templates/cordova/lib/list-devices
deleted file mode 100644
index 7a5b2f5..0000000
--- a/lib/cordova-android/bin/templates/cordova/lib/list-devices
+++ /dev/null
@@ -1,23 +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.
-
-set -e
-
-CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_LIB_PATH"/cordova list-devices
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/cordova/lib/list-devices.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/cordova/lib/list-devices.bat b/lib/cordova-android/bin/templates/cordova/lib/list-devices.bat
deleted file mode 100644
index c146f10..0000000
--- a/lib/cordova-android/bin/templates/cordova/lib/list-devices.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%cordova.js (
- cscript "%full_path%cordova.js" list-devices //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/ac0c95be/lib/cordova-android/bin/templates/cordova/lib/list-emulator-images
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/cordova/lib/list-emulator-images b/lib/cordova-android/bin/templates/cordova/lib/list-emulator-images
deleted file mode 100644
index db8e563..0000000
--- a/lib/cordova-android/bin/templates/cordova/lib/list-emulator-images
+++ /dev/null
@@ -1,23 +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.
-
-set -e
-
-CORDOVA_LIB_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_LIB_PATH"/cordova list-emulator-images
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/cordova/lib/list-emulator-images.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/cordova/lib/list-emulator-images.bat b/lib/cordova-android/bin/templates/cordova/lib/list-emulator-images.bat
deleted file mode 100644
index 172520b..0000000
--- a/lib/cordova-android/bin/templates/cordova/lib/list-emulator-images.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@ECHO OFF
-SET full_path=%~dp0
-IF EXIST %full_path%cordova.js (
- cscript "%full_path%cordova.js" list-emulator-images //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/ac0c95be/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
deleted file mode 100644
index 7911763..0000000
--- a/lib/cordova-android/bin/templates/cordova/lib/list-started-emulators
+++ /dev/null
@@ -1,23 +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.
-
-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/ac0c95be/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
deleted file mode 100644
index f1b3c5d..0000000
--- a/lib/cordova-android/bin/templates/cordova/lib/list-started-emulators.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@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/ac0c95be/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
deleted file mode 100644
index 8e8964d..0000000
--- a/lib/cordova-android/bin/templates/cordova/lib/start-emulator
+++ /dev/null
@@ -1,23 +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.
-
-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/ac0c95be/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
deleted file mode 100644
index 4f3fb5d..0000000
--- a/lib/cordova-android/bin/templates/cordova/lib/start-emulator.bat
+++ /dev/null
@@ -1,9 +0,0 @@
-@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/ac0c95be/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
deleted file mode 100755
index 01fe107..0000000
--- a/lib/cordova-android/bin/templates/cordova/log
+++ /dev/null
@@ -1,23 +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.
-
-set -e
-
-CORDOVA_PATH=$( cd "$( dirname "$0" )/.." && pwd )
-
-bash "$CORDOVA_PATH"/cordova/lib/cordova log "$@"
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/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
deleted file mode 100644
index 2c492e7..0000000
--- a/lib/cordova-android/bin/templates/cordova/log.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-@ECHO OFF
-%~dp0\cordova.bat log %*
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/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
deleted file mode 100755
index ec352b0..0000000
--- a/lib/cordova-android/bin/templates/cordova/run
+++ /dev/null
@@ -1,23 +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.
-
-set -e
-
-CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash "$CORDOVA_PATH"/lib/cordova run "$@"
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/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
deleted file mode 100644
index b1cab64..0000000
--- a/lib/cordova-android/bin/templates/cordova/run.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-@ECHO OFF
-%~dp0\cordova.bat run %*
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/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
deleted file mode 100644
index 21147ab..0000000
--- a/lib/cordova-android/bin/templates/cordova/version
+++ /dev/null
@@ -1,32 +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.
-
-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
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/Activity.java
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/Activity.java b/lib/cordova-android/bin/templates/project/Activity.java
deleted file mode 100644
index c255e4c..0000000
--- a/lib/cordova-android/bin/templates/project/Activity.java
+++ /dev/null
@@ -1,36 +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.
- */
-
-package __ID__;
-
-import android.os.Bundle;
-import org.apache.cordova.*;
-
-public class __ACTIVITY__ extends DroidGap
-{
- @Override
- public void onCreate(Bundle savedInstanceState)
- {
- super.onCreate(savedInstanceState);
- // Set by <content src="index.html" /> in config.xml
- super.loadUrl(Config.getStartUrl());
- //super.loadUrl("file:///android_asset/www/index.html")
- }
-}
-
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/AndroidManifest.xml b/lib/cordova-android/bin/templates/project/AndroidManifest.xml
deleted file mode 100644
index 4a3dcb5..0000000
--- a/lib/cordova-android/bin/templates/project/AndroidManifest.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- 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.
--->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:windowSoftInputMode="adjustPan"
- package="__PACKAGE__" android:versionName="1.0" android:versionCode="1" android:hardwareAccelerated="true">
- <supports-screens
- android:largeScreens="true"
- android:normalScreens="true"
- android:smallScreens="true"
- android:xlargeScreens="true"
- android:resizeable="true"
- android:anyDensity="true"
- />
-
- <uses-permission android:name="android.permission.CAMERA" />
- <uses-permission android:name="android.permission.VIBRATE" />
- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
- <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
- <uses-permission android:name="android.permission.INTERNET" />
- <uses-permission android:name="android.permission.RECEIVE_SMS" />
- <uses-permission android:name="android.permission.RECORD_AUDIO" />
- <uses-permission android:name="android.permission.RECORD_VIDEO"/>
- <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
- <uses-permission android:name="android.permission.READ_CONTACTS" />
- <uses-permission android:name="android.permission.WRITE_CONTACTS" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
- <uses-permission android:name="android.permission.GET_ACCOUNTS" />
- <uses-permission android:name="android.permission.BROADCAST_STICKY" />
-
-
- <application android:icon="@drawable/icon" android:label="@string/app_name"
- android:hardwareAccelerated="true"
- android:debuggable="true">
- <activity android:name="__ACTIVITY__" android:label="@string/app_name"
- android:theme="@android:style/Theme.Black.NoTitleBar"
- android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
-
- <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="__APILEVEL__"/>
-</manifest>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/assets/www/css/index.css
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/css/index.css b/lib/cordova-android/bin/templates/project/assets/www/css/index.css
deleted file mode 100644
index 51daa79..0000000
--- a/lib/cordova-android/bin/templates/project/assets/www/css/index.css
+++ /dev/null
@@ -1,115 +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.
- */
-* {
- -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
-}
-
-body {
- -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */
- -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */
- -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */
- background-color:#E4E4E4;
- background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
- background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
- background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
- background-image:-webkit-gradient(
- linear,
- left top,
- left bottom,
- color-stop(0, #A7A7A7),
- color-stop(0.51, #E4E4E4)
- );
- background-attachment:fixed;
- font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
- font-size:12px;
- height:100%;
- margin:0px;
- padding:0px;
- text-transform:uppercase;
- width:100%;
-}
-
-/* Portrait layout (default) */
-.app {
- background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */
- position:absolute; /* position in the center of the screen */
- left:50%;
- top:50%;
- height:50px; /* text area height */
- width:225px; /* text area width */
- text-align:center;
- padding:180px 0px 0px 0px; /* image height is 200px (bottom 20px are overlapped with text) */
- margin:-115px 0px 0px -112px; /* offset vertical: half of image height and text area height */
- /* offset horizontal: half of text area width */
-}
-
-/* Landscape layout (with min-width) */
-@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
- .app {
- background-position:left center;
- padding:75px 0px 75px 170px; /* padding-top + padding-bottom + text area = image height */
- margin:-90px 0px 0px -198px; /* offset vertical: half of image height */
- /* offset horizontal: half of image width and text area width */
- }
-}
-
-h1 {
- font-size:24px;
- font-weight:normal;
- margin:0px;
- overflow:visible;
- padding:0px;
- text-align:center;
-}
-
-.event {
- border-radius:4px;
- -webkit-border-radius:4px;
- color:#FFFFFF;
- font-size:12px;
- margin:0px 30px;
- padding:2px 0px;
-}
-
-.event.listening {
- background-color:#333333;
- display:block;
-}
-
-.event.received {
- background-color:#4B946A;
- display:none;
-}
-
-@keyframes fade {
- from { opacity: 1.0; }
- 50% { opacity: 0.4; }
- to { opacity: 1.0; }
-}
-
-@-webkit-keyframes fade {
- from { opacity: 1.0; }
- 50% { opacity: 0.4; }
- to { opacity: 1.0; }
-}
-
-.blink {
- animation:fade 3000ms infinite;
- -webkit-animation:fade 3000ms infinite;
-}
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/assets/www/img/cordova.png
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/img/cordova.png b/lib/cordova-android/bin/templates/project/assets/www/img/cordova.png
deleted file mode 100644
index e8169cf..0000000
Binary files a/lib/cordova-android/bin/templates/project/assets/www/img/cordova.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/assets/www/img/logo.png
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/img/logo.png b/lib/cordova-android/bin/templates/project/assets/www/img/logo.png
deleted file mode 100644
index 9519e7d..0000000
Binary files a/lib/cordova-android/bin/templates/project/assets/www/img/logo.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/assets/www/index.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/index.html b/lib/cordova-android/bin/templates/project/assets/www/index.html
deleted file mode 100644
index 564ce18..0000000
--- a/lib/cordova-android/bin/templates/project/assets/www/index.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html>
-<!--
- 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.
--->
-<html>
- <head>
- <meta charset="utf-8" />
- <meta name="format-detection" content="telephone=no" />
- <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
- <link rel="stylesheet" type="text/css" href="css/index.css" />
- <title>Hello World</title>
- </head>
- <body>
- <div class="app">
- <h1>Apache Cordova</h1>
- <div id="deviceready" class="blink">
- <p class="event listening">Connecting to Device</p>
- <p class="event received">Device is Ready</p>
- </div>
- </div>
- <script type="text/javascript" src="cordova-2.7.0.js"></script>
- <script type="text/javascript" src="js/index.js"></script>
- <script type="text/javascript">
- app.initialize();
- </script>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/assets/www/js/index.js
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/js/index.js b/lib/cordova-android/bin/templates/project/assets/www/js/index.js
deleted file mode 100644
index 31d9064..0000000
--- a/lib/cordova-android/bin/templates/project/assets/www/js/index.js
+++ /dev/null
@@ -1,49 +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.
- */
-var app = {
- // Application Constructor
- initialize: function() {
- this.bindEvents();
- },
- // Bind Event Listeners
- //
- // Bind any events that are required on startup. Common events are:
- // 'load', 'deviceready', 'offline', and 'online'.
- bindEvents: function() {
- document.addEventListener('deviceready', this.onDeviceReady, false);
- },
- // deviceready Event Handler
- //
- // The scope of 'this' is the event. In order to call the 'receivedEvent'
- // function, we must explicity call 'app.receivedEvent(...);'
- onDeviceReady: function() {
- app.receivedEvent('deviceready');
- },
- // Update DOM on a Received Event
- receivedEvent: function(id) {
- var parentElement = document.getElementById(id);
- var listeningElement = parentElement.querySelector('.listening');
- var receivedElement = parentElement.querySelector('.received');
-
- listeningElement.setAttribute('style', 'display:none;');
- receivedElement.setAttribute('style', 'display:block;');
-
- console.log('Received Event: ' + id);
- }
-};
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/assets/www/main.js
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/main.js b/lib/cordova-android/bin/templates/project/assets/www/main.js
deleted file mode 100644
index 3a8b04a..0000000
--- a/lib/cordova-android/bin/templates/project/assets/www/main.js
+++ /dev/null
@@ -1,165 +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.
-*/
-
-var deviceInfo = function() {
- document.getElementById("platform").innerHTML = device.platform;
- document.getElementById("version").innerHTML = device.version;
- document.getElementById("uuid").innerHTML = device.uuid;
- document.getElementById("name").innerHTML = device.name;
- document.getElementById("width").innerHTML = screen.width;
- document.getElementById("height").innerHTML = screen.height;
- document.getElementById("colorDepth").innerHTML = screen.colorDepth;
-};
-
-var getLocation = function() {
- var suc = function(p) {
- alert(p.coords.latitude + " " + p.coords.longitude);
- };
- var locFail = function() {
- };
- navigator.geolocation.getCurrentPosition(suc, locFail);
-};
-
-var beep = function() {
- navigator.notification.beep(2);
-};
-
-var vibrate = function() {
- navigator.notification.vibrate(0);
-};
-
-function roundNumber(num) {
- var dec = 3;
- var result = Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec);
- return result;
-}
-
-var accelerationWatch = null;
-
-function updateAcceleration(a) {
- document.getElementById('x').innerHTML = roundNumber(a.x);
- document.getElementById('y').innerHTML = roundNumber(a.y);
- document.getElementById('z').innerHTML = roundNumber(a.z);
-}
-
-var toggleAccel = function() {
- if (accelerationWatch !== null) {
- navigator.accelerometer.clearWatch(accelerationWatch);
- updateAcceleration({
- x : "",
- y : "",
- z : ""
- });
- accelerationWatch = null;
- } else {
- var options = {};
- options.frequency = 1000;
- accelerationWatch = navigator.accelerometer.watchAcceleration(
- updateAcceleration, function(ex) {
- alert("accel fail (" + ex.name + ": " + ex.message + ")");
- }, options);
- }
-};
-
-var preventBehavior = function(e) {
- e.preventDefault();
-};
-
-function dump_pic(data) {
- var viewport = document.getElementById('viewport');
- console.log(data);
- viewport.style.display = "";
- viewport.style.position = "absolute";
- viewport.style.top = "10px";
- viewport.style.left = "10px";
- document.getElementById("test_img").src = data;
-}
-
-function fail(msg) {
- alert(msg);
-}
-
-function show_pic() {
- navigator.camera.getPicture(dump_pic, fail, {
- quality : 50
- });
-}
-
-function close() {
- var viewport = document.getElementById('viewport');
- viewport.style.position = "relative";
- viewport.style.display = "none";
-}
-
-function contacts_success(contacts) {
- alert(contacts.length
- + ' contacts returned.'
- + (contacts[2] && contacts[2].name ? (' Third contact is ' + contacts[2].name.formatted)
- : ''));
-}
-
-function get_contacts() {
- var obj = new ContactFindOptions();
- obj.filter = "";
- obj.multiple = true;
- navigator.contacts.find(
- [ "displayName", "name" ], contacts_success,
- fail, obj);
-}
-
-function check_network() {
- var networkState = navigator.network.connection.type;
-
- var states = {};
- states[Connection.UNKNOWN] = 'Unknown connection';
- states[Connection.ETHERNET] = 'Ethernet connection';
- states[Connection.WIFI] = 'WiFi connection';
- states[Connection.CELL_2G] = 'Cell 2G connection';
- states[Connection.CELL_3G] = 'Cell 3G connection';
- states[Connection.CELL_4G] = 'Cell 4G connection';
- states[Connection.NONE] = 'No network connection';
-
- confirm('Connection type:\n ' + states[networkState]);
-}
-
-var watchID = null;
-
-function updateHeading(h) {
- document.getElementById('h').innerHTML = h.magneticHeading;
-}
-
-function toggleCompass() {
- if (watchID !== null) {
- navigator.compass.clearWatch(watchID);
- watchID = null;
- updateHeading({ magneticHeading : "Off"});
- } else {
- var options = { frequency: 1000 };
- watchID = navigator.compass.watchHeading(updateHeading, function(e) {
- alert('Compass Error: ' + e.code);
- }, options);
- }
-}
-
-function init() {
- // the next line makes it impossible to see Contacts on the HTC Evo since it
- // doesn't have a scroll button
- // document.addEventListener("touchmove", preventBehavior, false);
- document.addEventListener("deviceready", deviceInfo, true);
-}
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/assets/www/master.css
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/master.css b/lib/cordova-android/bin/templates/project/assets/www/master.css
deleted file mode 100644
index 3aad33d..0000000
--- a/lib/cordova-android/bin/templates/project/assets/www/master.css
+++ /dev/null
@@ -1,116 +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.
-*/
-
-
- body {
- background:#222 none repeat scroll 0 0;
- color:#666;
- font-family:Helvetica;
- font-size:72%;
- line-height:1.5em;
- margin:0;
- border-top:1px solid #393939;
- }
-
- #info{
- background:#ffa;
- border: 1px solid #ffd324;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- clear:both;
- margin:15px 6px 0;
- width:295px;
- padding:4px 0px 2px 10px;
- }
-
- #info > h4{
- font-size:.95em;
- margin:5px 0;
- }
-
- #stage.theme{
- padding-top:3px;
- }
-
- /* Definition List */
- #stage.theme > dl{
- padding-top:10px;
- clear:both;
- margin:0;
- list-style-type:none;
- padding-left:10px;
- overflow:auto;
- }
-
- #stage.theme > dl > dt{
- font-weight:bold;
- float:left;
- margin-left:5px;
- }
-
- #stage.theme > dl > dd{
- width:45px;
- float:left;
- color:#a87;
- font-weight:bold;
- }
-
- /* Content Styling */
- #stage.theme > h1, #stage.theme > h2, #stage.theme > p{
- margin:1em 0 .5em 13px;
- }
-
- #stage.theme > h1{
- color:#eee;
- font-size:1.6em;
- text-align:center;
- margin:0;
- margin-top:15px;
- padding:0;
- }
-
- #stage.theme > h2{
- clear:both;
- margin:0;
- padding:3px;
- font-size:1em;
- text-align:center;
- }
-
- /* Stage Buttons */
- #stage.theme a.btn{
- border: 1px solid #555;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- text-align:center;
- display:block;
- float:left;
- background:#444;
- width:150px;
- color:#9ab;
- font-size:1.1em;
- text-decoration:none;
- padding:1.2em 0;
- margin:3px 0px 3px 5px;
- }
- #stage.theme a.btn.large{
- width:308px;
- padding:1.2em 0;
- }
-
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/assets/www/res/icon/android/icon-36-ldpi.png
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/res/icon/android/icon-36-ldpi.png b/lib/cordova-android/bin/templates/project/assets/www/res/icon/android/icon-36-ldpi.png
deleted file mode 100644
index cd5032a..0000000
Binary files a/lib/cordova-android/bin/templates/project/assets/www/res/icon/android/icon-36-ldpi.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/assets/www/res/icon/android/icon-48-mdpi.png
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/res/icon/android/icon-48-mdpi.png b/lib/cordova-android/bin/templates/project/assets/www/res/icon/android/icon-48-mdpi.png
deleted file mode 100644
index e79c606..0000000
Binary files a/lib/cordova-android/bin/templates/project/assets/www/res/icon/android/icon-48-mdpi.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/assets/www/res/icon/android/icon-72-hdpi.png
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/res/icon/android/icon-72-hdpi.png b/lib/cordova-android/bin/templates/project/assets/www/res/icon/android/icon-72-hdpi.png
deleted file mode 100644
index 4d27634..0000000
Binary files a/lib/cordova-android/bin/templates/project/assets/www/res/icon/android/icon-72-hdpi.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/assets/www/res/icon/android/icon-96-xhdpi.png
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/res/icon/android/icon-96-xhdpi.png b/lib/cordova-android/bin/templates/project/assets/www/res/icon/android/icon-96-xhdpi.png
deleted file mode 100644
index ec7ffbf..0000000
Binary files a/lib/cordova-android/bin/templates/project/assets/www/res/icon/android/icon-96-xhdpi.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-hdpi-landscape.png
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-hdpi-landscape.png b/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-hdpi-landscape.png
deleted file mode 100644
index a61e2b1..0000000
Binary files a/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-hdpi-landscape.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-hdpi-portrait.png
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-hdpi-portrait.png b/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-hdpi-portrait.png
deleted file mode 100644
index 5d6a28a..0000000
Binary files a/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-hdpi-portrait.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-ldpi-landscape.png
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-ldpi-landscape.png b/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-ldpi-landscape.png
deleted file mode 100644
index f3934cd..0000000
Binary files a/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-ldpi-landscape.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-ldpi-portrait.png
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-ldpi-portrait.png b/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-ldpi-portrait.png
deleted file mode 100644
index 65ad163..0000000
Binary files a/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-ldpi-portrait.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-mdpi-landscape.png
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-mdpi-landscape.png b/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-mdpi-landscape.png
deleted file mode 100644
index a1b697c..0000000
Binary files a/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-mdpi-landscape.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-mdpi-portrait.png
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-mdpi-portrait.png b/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-mdpi-portrait.png
deleted file mode 100644
index ea15693..0000000
Binary files a/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-mdpi-portrait.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-xhdpi-landscape.png
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-xhdpi-landscape.png b/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-xhdpi-landscape.png
deleted file mode 100644
index 79f2f09..0000000
Binary files a/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-xhdpi-landscape.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/ac0c95be/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-xhdpi-portrait.png
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-xhdpi-portrait.png b/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-xhdpi-portrait.png
deleted file mode 100644
index c2e8042..0000000
Binary files a/lib/cordova-android/bin/templates/project/assets/www/res/screen/android/screen-xhdpi-portrait.png and /dev/null differ