You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2012/07/27 02:29:16 UTC

[44/78] [abbrv] [partial] added platform specs and basic work

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/create.js
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/create.js b/lib/cordova-1.9.0/lib/android/bin/create.js
deleted file mode 100755
index bec182b..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/create.js
+++ /dev/null
@@ -1,188 +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.
-*/
-
-/*
- * create a cordova/android project
- *
- * USAGE
- *  ./create [path package activity]
- */
-
-var fso = WScript.CreateObject('Scripting.FileSystemObject');
-
-function read(filename) {
-    var fso=WScript.CreateObject("Scripting.FileSystemObject");
-    var f=fso.OpenTextFile(filename, 1);
-    var s=f.ReadAll();
-    f.Close();
-    return s;
-}
-function setTarget() {
-    var targets = shell.Exec('android.bat list targets').StdOut.ReadAll().match(/id:\s\d+/g);
-    return targets[targets.length - 1].replace(/id: /, ""); // TODO: give users the option to set their target 
-}
-function write(filename, contents) {
-    var fso=WScript.CreateObject("Scripting.FileSystemObject");
-    var f=fso.OpenTextFile(filename, 2, true);
-    f.Write(contents);
-    f.Close();
-}
-function replaceInFile(filename, regexp, replacement) {
-    write(filename, read(filename).replace(regexp, replacement));
-}
-function exec(command) {
-    var oShell=shell.Exec(command);
-    while (oShell.Status == 0) {
-        WScript.sleep(100);
-    }
-}
-
-function cleanup() {
-    // Cleanup
-//    if(fso.FileExists(ROOT + '\\framework\\libs\\commons-codec-1.6.jar')) {
-//        fso.DeleteFile(ROOT + '\\framework\\libs\\commons-codec-1.6.jar');
-//        fso.DeleteFolder(ROOT + '\\framework\\libs', true);
-//    }
-    if(fso.FileExists(ROOT + '\\framework\\cordova-'+VERSION+'.jar')) {
-        fso.DeleteFile(ROOT + '\\framework\\cordova-'+VERSION+'.jar');
-    }
-    if(fso.FileExists(ROOT + '\\framework\\assets\\www\\cordova-'+VERSION+'.js')) {
-        fso.DeleteFile(ROOT + '\\framework\\assets\\www\\cordova-'+VERSION+'.js');
-    }
-}
-
-function downloadCommonsCodec() {
-    if (!fso.FileExists(ROOT + '\\framework\\libs\\commons-codec-1.6.jar')) {
-      // We need the .jar
-      var url = 'http://mirror.symnds.com/software/Apache//commons/codec/binaries/commons-codec-1.6-bin.zip';
-      var libsPath = ROOT + '\\framework\\libs';
-      var savePath = libsPath + '\\commons-codec-1.6-bin.zip';
-      if (!fso.FileExists(savePath)) {
-        if(!fso.FolderExists(ROOT + '\\framework\\libs')) {
-            fso.CreateFolder(libsPath);
-        }
-        // We need the zip to get the jar
-        var xhr = WScript.CreateObject('MSXML2.XMLHTTP');
-        xhr.open('GET', url, false);
-        xhr.send();
-        if (xhr.status == 200) {
-          var stream = WScript.CreateObject('ADODB.Stream');
-          stream.Open();
-          stream.Type = 1;
-          stream.Write(xhr.ResponseBody);
-          stream.Position = 0;
-          stream.SaveToFile(savePath);
-          stream.Close();
-        } else {
-          WScript.Echo('Could not retrieve the commons-codec. Please download it yourself and put into the framework/libs directory. This process may fail now. Sorry.');
-        }
-      }
-      var app = WScript.CreateObject('Shell.Application');
-      var source = app.NameSpace(savePath).Items();
-      var target = app.NameSpace(ROOT + '\\framework\\libs');
-      target.CopyHere(source, 256);
-      
-      // Move the jar into libs
-      fso.MoveFile(ROOT + '\\framework\\libs\\commons-codec-1.6\\commons-codec-1.6.jar', ROOT + '\\framework\\libs\\commons-codec-1.6.jar');
-      
-      // Clean up
-      fso.DeleteFile(ROOT + '\\framework\\libs\\commons-codec-1.6-bin.zip');
-      fso.DeleteFolder(ROOT + '\\framework\\libs\\commons-codec-1.6', true);
-    }
-}
-
-var args = WScript.Arguments, PROJECT_PATH="example", 
-    PACKAGE="org.apache.cordova.example", ACTIVITY="cordovaExample",
-    shell=WScript.CreateObject("WScript.Shell");
-    
-// working dir
-var ROOT = WScript.ScriptFullName.split('\\bin\\create.js').join('');
-
-if (args.Count() == 3) {
-    PROJECT_PATH=args(0);
-    PACKAGE=args(1);
-    ACTIVITY=args(2);
-}
-
-if(fso.FolderExists(PROJECT_PATH)) {
-    WScript.Echo("Project already exists!");
-    WScript.Quit(1);
-}
-
-var PACKAGE_AS_PATH=PACKAGE.replace(/\./g, '\\');
-var ACTIVITY_PATH=PROJECT_PATH+'\\src\\'+PACKAGE_AS_PATH+'\\'+ACTIVITY+'.java';
-var MANIFEST_PATH=PROJECT_PATH+'\\AndroidManifest.xml';
-var TARGET=setTarget();
-var VERSION=read(ROOT+'\\VERSION').replace(/\r\n/,'').replace(/\n/,'');
-// create the project
-exec('android.bat create project --target '+TARGET+' --path '+PROJECT_PATH+' --package '+PACKAGE+' --activity '+ACTIVITY);
-
-// build from source. distro should have these files
-if (!fso.FileExists(ROOT+'\\cordova-'+VERSION+'.jar') &&
-    !fso.FileExists(ROOT+'\\cordova-'+VERSION+'.js')) {
-    // update the cordova framework project to a target that exists on this machine
-    exec('android.bat update project --target '+TARGET+' --path '+ROOT+'\\framework');
-    // pull down commons codec if necessary
-    downloadCommonsCodec();
-    exec('ant.bat -f '+ ROOT +'\\framework\\build.xml jar');
-}
-
-// copy in the project template
-exec('%comspec% /c xcopy '+ ROOT + '\\bin\\templates\\project\\res '+PROJECT_PATH+'\\res\\ /E /Y');
-exec('%comspec% /c xcopy '+ ROOT + '\\bin\\templates\\project\\assets '+PROJECT_PATH+'\\assets\\ /E /Y');
-exec('%comspec% /c copy '+ROOT+'\\bin\\templates\\project\\AndroidManifest.xml ' + PROJECT_PATH + '\\AndroidManifest.xml /Y');
-exec('%comspec% /c copy '+ROOT+'\\bin\\templates\\project\\Activity.java '+ ACTIVITY_PATH +' /Y');
-
-// check if we have the source or the distro files
-if(fso.FolderExists(ROOT + '\\framework')) {
-    exec('%comspec% /c copy '+ROOT+'\\framework\\assets\\www\\cordova-'+VERSION+'.js '+PROJECT_PATH+'\\assets\\www\\cordova-'+VERSION+'.js /Y');
-    exec('%comspec% /c copy '+ROOT+'\\framework\\cordova-'+VERSION+'.jar '+PROJECT_PATH+'\\libs\\cordova-'+VERSION+'.jar /Y');
-    fso.CreateFolder(PROJECT_PATH + '\\res\\xml');
-    exec('%comspec% /c copy '+ROOT+'\\framework\\res\\xml\\cordova.xml ' + PROJECT_PATH + '\\res\\xml\\cordova.xml /Y');
-    exec('%comspec% /c copy '+ROOT+'\\framework\\res\\xml\\plugins.xml ' + PROJECT_PATH + '\\res\\xml\\plugins.xml /Y');
-} else {
-    // copy in cordova.js
-    exec('%comspec% /c copy '+ROOT+'\\cordova-'+VERSION+'.js '+PROJECT_PATH+'\\assets\\www\\cordova-'+VERSION+'.js /Y');
-    // copy in cordova.jar
-    exec('%comspec% /c copy '+ROOT+'\\cordova-'+VERSION+'.jar '+PROJECT_PATH+'\\libs\\cordova-'+VERSION+'.jar /Y');
-    // copy in xml
-    fso.CreateFolder(PROJECT_PATH + '\\res\\xml');
-    exec('%comspec% /c copy '+ROOT+'\\xml\\cordova.xml ' + PROJECT_PATH + '\\res\\xml\\cordova.xml /Y');
-    exec('%comspec% /c copy '+ROOT+'\\xml\\plugins.xml ' + PROJECT_PATH + '\\res\\xml\\plugins.xml /Y');
-}
-
-// copy cordova scripts
-fso.CreateFolder(PROJECT_PATH + '\\cordova');
-exec('%comspec% /c copy '+ROOT+'\\bin\\templates\\cordova\\appinfo.jar ' + PROJECT_PATH + '\\cordova\\appinfo.jar /Y');
-exec('%comspec% /c copy '+ROOT+'\\bin\\templates\\cordova\\cordova.js ' + PROJECT_PATH + '\\cordova\\cordova.js /Y');
-exec('%comspec% /c copy '+ROOT+'\\bin\\templates\\cordova\\cordova.bat ' + PROJECT_PATH + '\\cordova\\cordova.bat /Y');
-exec('%comspec% /c copy '+ROOT+'\\bin\\templates\\cordova\\clean.bat ' + PROJECT_PATH + '\\cordova\\clean.bat /Y');
-exec('%comspec% /c copy '+ROOT+'\\bin\\templates\\cordova\\debug.bat ' + PROJECT_PATH + '\\cordova\\debug.bat /Y');
-exec('%comspec% /c copy '+ROOT+'\\bin\\templates\\cordova\\log.bat ' + PROJECT_PATH + '\\cordova\\log.bat /Y');
-exec('%comspec% /c copy '+ROOT+'\\bin\\templates\\cordova\\emulate.bat ' + PROJECT_PATH + '\\cordova\\emulate.bat /Y');
-exec('%comspec% /c copy '+ROOT+'\\bin\\templates\\cordova\\BOOM.bat ' + PROJECT_PATH + '\\cordova\\BOOM.bat /Y');
-
-// interpolate the activity name and package
-replaceInFile(ACTIVITY_PATH, /__ACTIVITY__/, ACTIVITY);
-replaceInFile(ACTIVITY_PATH, /__ID__/, PACKAGE);
-
-replaceInFile(MANIFEST_PATH, /__ACTIVITY__/, ACTIVITY);
-replaceInFile(MANIFEST_PATH, /__PACKAGE__/, PACKAGE);
-
-cleanup();

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/create.xml
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/create.xml b/lib/cordova-1.9.0/lib/android/bin/create.xml
deleted file mode 100755
index 720697c..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/create.xml
+++ /dev/null
@@ -1,98 +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.
--->
-
-<project name="cordova" default="create" basedir="../">
-
-	<property name="project.path" value="${basedir}/example"/>
-	<property name="package" value="org.apache.cordova.example"/>
-	<property name="activity" value="cordovaExample"/>
-
-	<target name="create">
-
-		<!-- this stuff is seriously stupid -->
-		<echo file="tmp/package.tmp">package-as-path=${package}</echo>
-		<replace file="tmp/package.tmp" token="." value="\\" />
-		<property file="tmp/package.tmp" />
-
-		<property name="activity.path" value="${project.path}/src/${package-as-path}/${activity}.java" />
-		<property name="manifest.path" value="${project.path}/AndroidManifest.xml" />
-
-		<!-- get the highest target on this machine -->
-		<!-- this stuff is also seriously stupid -->
-		<exec executable="cmd" osfamily="windows" output="tmp/target.list.tmp">
-			<arg line="/c android.bat list targets"/>
-		</exec>
-		<exec executable="android" osfamily="mac" output="tmp/target.list.tmp">
-			<arg line="list targets"/>
-		</exec>
-		<replaceregexp file="tmp/target.list.tmp" match=".*id:\s([0-9]).*" replace="target=\1" flags="s" />
-		<property file="tmp/target.list.tmp" />
-
-		<!-- var VERSION=read('VERSION').replace(/\r\n/,'').replace(/\n/,''); -->
-		<copy file="VERSION" tofile="tmp/VERSION.tmp" overwrite="true" />
-		<replaceregexp file="tmp/VERSION.tmp" match="^" replace="version=" />
-		<replaceregexp file="tmp/VERSION.tmp" match="\r\n" replace="" />
-		<property file="tmp/VERSION.tmp" />
-
-		<!-- clobber any existing example -->
-
-		<!-- create the project -->
-		<exec executable="cmd" osfamily="windows">
-			<arg line="/c android.bat create project --target ${target} --path ${project.path} --package ${package} --activity ${activity}"/>
-		</exec>
-		<exec executable="android" osfamily="mac">
-			<arg line="create project --target ${target} --path ${project.path} --package ${package} --activity ${activity}"/>
-		</exec>
-
-		<!-- update the framework dir -->
-		<exec executable="cmd" osfamily="windows">
-			<arg line="/c android.bat update project --target ${target} --path ${basedir}/framework"/>
-		</exec>
-		<exec executable="android" osfamily="mac">
-			<arg line="update project --target ${target} --path ${basedir}/framework"/>
-		</exec>
-
-		<!-- compile cordova.js and cordova.jar -->
-		<!--	// if you see an error about "Unable to resolve target" then you may need to 
-				// update your android tools or install an additional Android platform version -->
-		<ant antfile="${basedir}/framework/build.xml" useNativeBasedir="true" inheritAll="false" />
-
-		<!-- copy in the project template -->
-		<copy todir="${project.path}" overwrite="true">
-			<fileset dir="${basedir}/bin/templates/project"/>
-		</copy>
-
-		<!-- copy in cordova.js -->
-		<copy file="${basedir}/framework/assets/www/cordova-${version}.js" todir="${project.path}/assets/www/" />
-
-		<!-- copy in cordova.jar -->
-		<copy file="${basedir}/framework/cordova-${version}.jar" todir="${project.path}/libs/" />
-
-		<!-- copy in default activity -->
-		<copy file="${basedir}/bin/templates/Activity.java" tofile="${activity.path}" overwrite="true" />
-
-		<!-- interpolate the activity name and package -->
-		<replaceregexp file="${activity.path}" match="__ACTIVITY__" replace="${activity}" />
-		<replaceregexp file="${activity.path}" match="__ID__" replace="${package}" />
-
-		<replaceregexp file="${manifest.path}" match="__ACTIVITY__" replace="${activity}" />
-		<replaceregexp file="${manifest.path}" match="__PACKAGE__" replace="${package}" />
-	</target>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/package.json
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/package.json b/lib/cordova-1.9.0/lib/android/bin/package.json
deleted file mode 100755
index 27cb0eb..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/package.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-  "name":         "cordova-android-cli",
-  "description":  "CLI tooling for the cordova-android project",
-  "version":      "0.0.1",
-  "licenses":     [{
-    "type":       "APL 2.0",
-    "url":        "http://www.apache.org/licenses/LICENSE-2.0"
-  }],
-  "main" : "./create",
-  "bin":          {
-    "create":   "./create",
-    "bench":    "./bench",
-    "autotest": "./autotest",
-    "BOOM":     "./BOOM",
-    "test":     "./test"
-  },
-  "homepage":     "http://incubator.apache.org/cordova",
-  "repository":   {
-    "type": "git",
-    "url": "http://git-wip-us.apache.org/repos/asf/incubator-cordova-android.git"
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/cordova/ApplicationInfo/ApplicationInfo.class
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/ApplicationInfo/ApplicationInfo.class b/lib/cordova-1.9.0/lib/android/bin/templates/cordova/ApplicationInfo/ApplicationInfo.class
deleted file mode 100755
index 5ad90f5..0000000
Binary files a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/ApplicationInfo/ApplicationInfo.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/cordova/ApplicationInfo/ApplicationInfo.java
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/ApplicationInfo/ApplicationInfo.java b/lib/cordova-1.9.0/lib/android/bin/templates/cordova/ApplicationInfo/ApplicationInfo.java
deleted file mode 100755
index 21a0787..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/ApplicationInfo/ApplicationInfo.java
+++ /dev/null
@@ -1,44 +0,0 @@
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import org.xml.sax.SAXException;
-import java.io.IOException;
-
-public class ApplicationInfo {
-    private static void parseAndroidManifest(String path) {
-        // System.out.println(path);
-        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-        Document dom;
-        try {
-            DocumentBuilder db = dbf.newDocumentBuilder();
-            dom = db.parse(path);
-
-            // getting package information
-            Element manifest = dom.getDocumentElement();
-            String pakkage = manifest.getAttribute("package");
-
-            // getting activity name
-            String activity = ((Element)dom.getElementsByTagName("activity").item(0)).getAttribute("android:name");
-            System.out.println(String.format("%s/.%s", pakkage, activity.replace(".", "")));
-        } catch(ParserConfigurationException pce) {
-			pce.printStackTrace();
-		} catch(SAXException se) {
-			se.printStackTrace();
-		} catch(IOException ioe) {
-			ioe.printStackTrace();
-		}
-        
-    }
-
-    public static void main(String[] args) {
-        String path;
-        if(args.length > 0) {
-            path = args[0];
-        } else {
-            path = System.getProperty("user.dir") + "/../AndroidManifest.xml";
-        }
-        parseAndroidManifest(path);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/cordova/BOOM
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/BOOM b/lib/cordova-1.9.0/lib/android/bin/templates/cordova/BOOM
deleted file mode 100755
index 37c623c..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/BOOM
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-set -e
-
-CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash $CORDOVA_PATH/cordova BOOM

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/cordova/BOOM.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/BOOM.bat b/lib/cordova-1.9.0/lib/android/bin/templates/cordova/BOOM.bat
deleted file mode 100755
index 87b1042..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/BOOM.bat
+++ /dev/null
@@ -1 +0,0 @@
-%~dp0\cordova.bat BOOM

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/cordova/appinfo.jar
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/appinfo.jar b/lib/cordova-1.9.0/lib/android/bin/templates/cordova/appinfo.jar
deleted file mode 100755
index 37e00df..0000000
Binary files a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/appinfo.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/cordova/clean
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/clean b/lib/cordova-1.9.0/lib/android/bin/templates/cordova/clean
deleted file mode 100755
index daa8442..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/clean
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-set -e
-
-CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash $CORDOVA_PATH/cordova clean

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/cordova/clean.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/clean.bat b/lib/cordova-1.9.0/lib/android/bin/templates/cordova/clean.bat
deleted file mode 100755
index 8194b33..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/clean.bat
+++ /dev/null
@@ -1 +0,0 @@
-%~dp0\cordova.bat clean

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/cordova/cordova
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/cordova b/lib/cordova-1.9.0/lib/android/bin/templates/cordova/cordova
deleted file mode 100755
index 0bca03f..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/cordova
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/bin/bash
-
-set -e
-
-PROJECT_PATH=$( cd "$( dirname "$0" )/.." && pwd )
-
-function check_devices {
-    local devices=`adb devices | awk '/List of devices attached/ { while(getline > 0) { print }}'`
-    if [ -z "$devices"  ] ; then
-        echo "1"
-    else
-        echo "0"
-    fi
-}
-
-function emulate {
-    declare -a avd_list=($(android list avd | grep "Name:" | cut -f 2 -d ":" | xargs))
-    # we need to start adb-server
-    adb start-server 1>/dev/null
-
-    # Do not launch an emulator if there is already one running or if a device is attached
-    if [ $(check_devices) == 0 ] ; then
-        echo "Device attached or emulator already running"
-        return
-    fi
-
-    local avd_id="1000" #FIXME: hopefully user does not have 1000 AVDs
-    # User has no AVDs
-    if [ ${#avd_list[@]} == 0 ]
-    then
-        echo "You don't have any Android Virtual Devices. Please create at least one AVD."
-        echo "android"
-    fi
-    # User has only one AVD
-    if [ ${#avd_list[@]} == 1 ]
-    then
-        emulator -cpu-delay 0 -no-boot-anim -cache /tmp/cache -avd ${avd_list[0]} 1> /dev/null 2>&1 &
-    # User has more than 1 AVD
-    elif [ ${#avd_list[@]} -gt 1 ]
-    then
-        while [ -z ${avd_list[$avd_id]} ]
-        do
-            echo "Choose from one of the following Android Virtual Devices [0 to $((${#avd_list[@]}-1))]:"
-            for(( i = 0 ; i < ${#avd_list[@]} ; i++ ))
-            do
-                echo "$i) ${avd_list[$i]}"
-            done
-            echo -n "> "
-            read avd_id
-        done
-        emulator -cpu-delay 0 -no-boot-anim -cache /tmp/cache -avd ${avd_list[$avd_id]} 1> /dev/null 2>&1 &
-    fi
-    
-}
-
-function clean {
-    ant clean
-}
-# has to be used independently and not in conjuction with other commands
-function log {
-    adb logcat
-}
-
-function debug {
-    if [ $(check_devices) == 0 ] ; then
-        ant debug install
-    else
-        ant debug
-        echo "##################################################################"
-        echo "# Plug in your device or launch an emulator with cordova/emulate #"
-        echo "##################################################################"
-    fi
-}
-
-function launch {
-    local launch_str=$(java -jar $PROJECT_PATH/cordova/appinfo.jar $PROJECT_PATH/AndroidManifest.xml)
-    adb shell am start -n $launch_str 
-}
-
-function BOOM {
-    clean && debug && launch 
-}
-
-# TODO parse arguments
-(cd $PROJECT_PATH && $1)

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/cordova/cordova.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/cordova.bat b/lib/cordova-1.9.0/lib/android/bin/templates/cordova/cordova.bat
deleted file mode 100755
index 6164131..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/cordova.bat
+++ /dev/null
@@ -1,15 +0,0 @@
-@ECHO OFF
-IF NOT DEFINED JAVA_HOME GOTO MISSING
-FOR %%X in (java.exe ant.bat android.bat) do (
-    SET FOUND=%%~$PATH:X
-    IF NOT DEFINED FOUND GOTO MISSING
-)
-cscript %~dp0\cordova.js %*
-GOTO END
-:MISSING
-ECHO Missing one of the following:
-ECHO JDK: http://java.oracle.com
-ECHO Android SDK: http://developer.android.com
-ECHO Apache ant: http://ant.apache.org
-EXIT /B 1
-:END

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/cordova/cordova.js
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/cordova.js b/lib/cordova-1.9.0/lib/android/bin/templates/cordova/cordova.js
deleted file mode 100755
index e0e9762..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/cordova.js
+++ /dev/null
@@ -1,104 +0,0 @@
-var ROOT = WScript.ScriptFullName.split('\\cordova\\cordova.js').join(''),
-    shell=WScript.CreateObject("WScript.Shell");
-
-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();
-            // XXX: Change to verbose mode 
-            // WScript.StdOut.WriteLine(line);
-            output += line;
-        }
-        WScript.sleep(100);
-    }
-
-    return output;
-}
-
-function emulator_running() {
-    var local_devices = shell.Exec("%comspec% /c adb devices").StdOut.ReadAll();
-    if(local_devices.match(/emulator/)) {
-        return true;
-    }
-    return false;
-}
-function emulate() {
-    // don't run emulator if a device is plugged in or if emulator is already running
-    if(emulator_running()) {
-        WScript.Echo("Device or Emulator already running!");
-        return;
-    }
-    var oExec = shell.Exec("%comspec% /c android.bat list avd");
-    var avd_list = [];
-    var avd_id = -10;
-    while(!oExec.StdOut.AtEndOfStream) {
-        var output = oExec.StdOut.ReadLine();
-        if(output.match(/Name: (.)*/)) {
-            avd_list.push(output.replace(/ *Name:\s/, ""));
-        }
-    }
-    // user has no AVDs
-    if(avd_list.length == 0) {
-        WScript.Echo("You don't have any Android Virtual Devices. Please create at least one AVD.");
-        WScript.Echo("android");
-        WScript.Quit(1);
-    }
-    // user has only one AVD so we launch that one
-    if(avd_list.length == 1) {
-
-        shell.Run("emulator -cpu-delay 0 -no-boot-anim -cache %Temp%\cache -avd "+avd_list[0]);
-    }
-
-    // user has more than one avd so we ask them to choose
-    if(avd_list.length > 1) {
-        while(!avd_list[avd_id]) {
-            WScript.Echo("Choose from one of the following Android Virtual Devices [0 to "+(avd_list.length - 1)+"]:")
-            for(i = 0, j = avd_list.length ; i < j ; i++) {
-                WScript.Echo((i)+") "+avd_list[i]);
-            }
-            WScript.StdOut.Write("> ");
-            avd_id = new Number(WScript.StdIn.ReadLine());
-        }
-
-        shell.Run("emulator -cpu-delay 0 -no-boot-anim -cache %Temp%\\cache -avd "+avd_list[avd_id], 0, false);
-    }
-}
-
-function clean() {
-    exec("%comspec% /c ant.bat clean -f "+ROOT+"\\build.xml 2>&1");
-}
-
-function debug() {
-   if(emulator_running()) {
-        exec("%comspec% /c ant.bat debug install -f "+ROOT+"\\build.xml 2>&1");
-   } else {
-        exec("%comspec% /c ant.bat debug -f "+ROOT+"\\build.xml 2>&1");
-        WScript.Echo("##################################################################");
-        WScript.Echo("# Plug in your device or launch an emulator with cordova/emulate #");
-        WScript.Echo("##################################################################");
-   }
-}
-
-function log() {
-    shell.Run("%comspec% /c adb logcat");
-}
-
-function launch() {
-    var launch_str=exec("%comspec% /c java -jar "+ROOT+"\\cordova\\appinfo.jar "+ROOT+"\\AndroidManifest.xml");
-    //WScript.Echo(launch_str);
-    exec("%comspec% /c adb shell am start -n "+launch_str+" 2>&1");
-}
-
-function BOOM() {
-   clean();
-   debug();
-   launch();
-}
-var args = WScript.Arguments;
-if(args.count() != 1) {
-    WScript.StdErr.Write("An error has occured!\n");
-    WScript.Quit(1);
-}
-eval(args(0)+"()");

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/cordova/debug
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/debug b/lib/cordova-1.9.0/lib/android/bin/templates/cordova/debug
deleted file mode 100755
index 5d63a39..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/debug
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-set -e
-
-CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash $CORDOVA_PATH/cordova debug

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/cordova/debug.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/debug.bat b/lib/cordova-1.9.0/lib/android/bin/templates/cordova/debug.bat
deleted file mode 100755
index ff5edc2..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/debug.bat
+++ /dev/null
@@ -1 +0,0 @@
-%~dp0\cordova.bat debug

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/cordova/emulate
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/emulate b/lib/cordova-1.9.0/lib/android/bin/templates/cordova/emulate
deleted file mode 100755
index 6c4fab2..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/emulate
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-set -e
-
-CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
-
-bash $CORDOVA_PATH/cordova emulate

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/cordova/emulate.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/emulate.bat b/lib/cordova-1.9.0/lib/android/bin/templates/cordova/emulate.bat
deleted file mode 100755
index 87ef969..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/emulate.bat
+++ /dev/null
@@ -1 +0,0 @@
-%~dp0\cordova.bat emulate

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/cordova/log
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/log b/lib/cordova-1.9.0/lib/android/bin/templates/cordova/log
deleted file mode 100755
index ab3622e..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/log
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-set -e
-
-PROJECT_PATH=$( cd "$( dirname "$0" )/.." && pwd )
-
-bash $PROJECT_PATH/cordova/cordova log

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/cordova/log.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/log.bat b/lib/cordova-1.9.0/lib/android/bin/templates/cordova/log.bat
deleted file mode 100755
index 688d0d0..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/templates/cordova/log.bat
+++ /dev/null
@@ -1 +0,0 @@
-%~dp0\cordova.bat log

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/project/Activity.java
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/project/Activity.java b/lib/cordova-1.9.0/lib/android/bin/templates/project/Activity.java
deleted file mode 100755
index d37247b..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/templates/project/Activity.java
+++ /dev/null
@@ -1,35 +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.app.Activity;
-import android.os.Bundle;
-import org.apache.cordova.*;
-
-public class __ACTIVITY__ extends DroidGap
-{
-    @Override
-    public void onCreate(Bundle savedInstanceState)
-    {
-        super.onCreate(savedInstanceState);
-        super.loadUrl("file:///android_asset/www/index.html");
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/project/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/project/AndroidManifest.xml b/lib/cordova-1.9.0/lib/android/bin/templates/project/AndroidManifest.xml
deleted file mode 100755
index 0cff488..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/templates/project/AndroidManifest.xml
+++ /dev/null
@@ -1,61 +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.1" android:versionCode="5">
-    <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:debuggable="true">
-        <activity android:name="__ACTIVITY__" android:label="@string/app_name" 
-                  android:configChanges="orientation|keyboardHidden">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-
-    <uses-sdk android:minSdkVersion="5" />
-</manifest> 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/project/assets/www/index.html
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/project/assets/www/index.html b/lib/cordova-1.9.0/lib/android/bin/templates/project/assets/www/index.html
deleted file mode 100755
index aa5336d..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/templates/project/assets/www/index.html
+++ /dev/null
@@ -1,60 +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 name="viewport" content="width=320; user-scalable=no" />
-    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
-    <title>PhoneGap</title>
-      <link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title">
-      <script type="text/javascript" charset="utf-8" src="cordova-1.9.0.js"></script>
-      <script type="text/javascript" charset="utf-8" src="main.js"></script>
-
-  </head>
-  <body onload="init();" id="stage" class="theme">
-    <h1>Welcome to Cordova!</h1>
-    <h2>this file is located at assets/www/index.html</h2>
-    <div id="info">
-        <h4>Platform: <span id="platform"> &nbsp;</span>,   Version: <span id="version">&nbsp;</span></h4>
-        <h4>UUID: <span id="uuid"> &nbsp;</span>,   Name: <span id="name">&nbsp;</span></h4>
-        <h4>Width: <span id="width"> &nbsp;</span>,   Height: <span id="height">&nbsp;
-                   </span>, Color Depth: <span id="colorDepth"></span></h4>
-     </div>
-    <dl id="accel-data">
-      <dt>X:</dt><dd id="x">&nbsp;</dd>
-      <dt>Y:</dt><dd id="y">&nbsp;</dd>
-      <dt>Z:</dt><dd id="z">&nbsp;</dd>
-    </dl>
-    <a href="#" class="btn large" onclick="toggleAccel();">Toggle Accelerometer</a>
-    <a href="#" class="btn large" onclick="getLocation();">Get Location</a>
-    <a href="tel:411" class="btn large">Call 411</a>
-    <a href="#" class="btn large" onclick="beep();">Beep</a>
-    <a href="#" class="btn large" onclick="vibrate();">Vibrate</a>
-    <a href="#" class="btn large" onclick="show_pic();">Get a Picture</a>
-    <a href="#" class="btn large" onclick="get_contacts();return false;">Get Phone's Contacts</a>
-    <a href="#" class="btn large" onclick="check_network();return false;">Check Network</a>
-    <dl>
-    <dt>Compass Heading:</dt><dd id="h">Off</dd>
-    </dl>
-    <a href="#" class="btn large" onclick="toggleCompass();return false;">Toggle Compass</a>
-    <div id="viewport" class="viewport" style="display: none;">
-      <img style="width:60px;height:60px" id="test_img" src="" />
-    </div>
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/project/assets/www/main.js
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/project/assets/www/main.js b/lib/cordova-1.9.0/lib/android/bin/templates/project/assets/www/main.js
deleted file mode 100755
index 3a8b04a..0000000
--- a/lib/cordova-1.9.0/lib/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/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/project/assets/www/master.css
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/project/assets/www/master.css b/lib/cordova-1.9.0/lib/android/bin/templates/project/assets/www/master.css
deleted file mode 100755
index 3aad33d..0000000
--- a/lib/cordova-1.9.0/lib/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/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable-hdpi/icon.png
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable-hdpi/icon.png b/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable-hdpi/icon.png
deleted file mode 100755
index 4d27634..0000000
Binary files a/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable-hdpi/icon.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable-ldpi/icon.png
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable-ldpi/icon.png b/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable-ldpi/icon.png
deleted file mode 100755
index cd5032a..0000000
Binary files a/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable-ldpi/icon.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable-mdpi/icon.png
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable-mdpi/icon.png b/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable-mdpi/icon.png
deleted file mode 100755
index e79c606..0000000
Binary files a/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable-mdpi/icon.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable-xhdpi/icon.png
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable-xhdpi/icon.png b/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable-xhdpi/icon.png
deleted file mode 100755
index ec7ffbf..0000000
Binary files a/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable-xhdpi/icon.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable/icon.png
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable/icon.png b/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable/icon.png
deleted file mode 100755
index ec7ffbf..0000000
Binary files a/lib/cordova-1.9.0/lib/android/bin/templates/project/res/drawable/icon.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/tests/test_create_unix.js
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/tests/test_create_unix.js b/lib/cordova-1.9.0/lib/android/bin/tests/test_create_unix.js
deleted file mode 100755
index a906176..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/tests/test_create_unix.js
+++ /dev/null
@@ -1,135 +0,0 @@
-var build_path = __dirname + '/../..',
-    project_path = '/tmp/example',
-    package_name = 'org.apache.cordova.example',
-    package_as_path = 'org/apache/cordova/example',
-    project_name = 'cordovaExample';
-
-var path = require('path'),
-    fs = require('fs'),
-    util = require('util'),
-    assert = require('assert'),
-    spawn = require('child_process').spawn;
-
-var version = fs.readFileSync(build_path + '/VERSION').toString().replace('\n', '');
-
-assert(version !== undefined);
-assert(version !== '');
-
-var create_project = spawn(build_path + '/bin/create',
-                           [project_path,
-                            package_name,
-                            project_name]);
-
-process.on('uncaughtException', function (err) {
-    console.log('Caught exception: ' + err);
-    spawn('rm', ['-rf', project_path], function(code) {
-        if(code != 0) {
-            console.log("Could not delete project directory");
-        }
-    });
-});
-
-create_project.on('exit', function(code) {
-
-    assert.equal(code, 0, 'Project did not get created');
-
-    // make sure the project was created
-    path.exists(project_path, function(exists) {
-        assert(exists, 'Project path does not exist');
-    });
-
-    // make sure the build directory was cleaned up
-//    path.exists(build_path + '/framework/libs', function(exists) {
-//        assert(!exists, 'libs directory did not get cleaned up');
-//    });
-    path.exists(build_path + util.format('/framework/assets/cordova-%s.js', version), function(exists) {
-        assert(!exists, 'javascript file did not get cleaned up');
-    });
-    path.exists(build_path + util.format('/framework/cordova-%s.jar', version), function(exists) {
-        assert(!exists, 'jar file did not get cleaned up');
-    });
-
-    // make sure AndroidManifest.xml was added
-    path.exists(util.format('%s/AndroidManifest.xml', project_path), function(exists) {
-        assert(exists, 'AndroidManifest.xml did not get created');
-        // TODO check that the activity name was properly substituted
-    });
-
-    // make sure main Activity was added 
-    path.exists(util.format('%s/src/%s/%s.java', project_path, package_as_path, project_name), function(exists) {
-        assert(exists, 'Activity did not get created');
-        // TODO check that package name and activity name were substitued properly
-    });
-   
-    // make sure plugins.xml was added
-    path.exists(util.format('%s/res/xml/plugins.xml', project_path), function(exists) {
-        assert(exists, 'plugins.xml did not get created');
-    });
-    
-    // make sure cordova.xml was added
-    path.exists(util.format('%s/res/xml/cordova.xml', project_path), function(exists) {
-        assert(exists, 'plugins.xml did not get created');
-    });
-    
-    // make sure cordova.jar was added
-    path.exists(util.format('%s/libs/cordova-%s.jar', project_path, version), function(exists) {
-        assert(exists, 'cordova.jar did not get added');
-    });
-    
-    // make sure cordova.js was added
-    path.exists(util.format('%s/assets/www/cordova-%s.js', project_path, version), function(exists) {
-        assert(exists, 'cordova.js did not get added');
-    });
-    
-    // make sure cordova master script was added
-    path.exists(util.format('%s/cordova/cordova', project_path), function(exists) {
-        assert(exists, 'cordova script did not get added');
-    });
-    
-    // make sure debug script was added
-    path.exists(util.format('%s/cordova/debug', project_path), function(exists) {
-        assert(exists, 'debug script did not get added');
-    });
-    
-    // make sure BOOM script was added
-    path.exists(util.format('%s/cordova/BOOM', project_path), function(exists) {
-        assert(exists, 'BOOM script did not get added');
-    });
-    
-    // make sure log script was added
-    path.exists(util.format('%s/cordova/log', project_path), function(exists) {
-        assert(exists, 'log script did not get added');
-    });
-    
-    // make sure clean script was added
-    path.exists(util.format('%s/cordova/clean', project_path), function(exists) {
-        assert(exists, 'clean script did not get added');
-    });
-    
-    // make sure emulate script was added
-    path.exists(util.format('%s/cordova/emulate', project_path), function(exists) {
-        assert(exists, 'emulate script did not get added');
-    });
-    
-    // make sure appinfo.jar script was added
-    path.exists(util.format('%s/cordova/appinfo.jar', project_path), function(exists) {
-        assert(exists, 'appinfo.jar script did not get added');
-    });
-
-    // check that project compiles && creates a cordovaExample-debug.apk
-    var compile_project = spawn('ant', ['debug'], {cwd: project_path});
-    
-    compile_project.on('exit', function(code) {
-        assert.equal(code, 0, 'Cordova Android Project does not compile');
-        // make sure cordovaExample-debug.apk was created
-        path.exists(util.format('%s/bin/%s-debug.apk', project_path, project_name), function(exists) {
-            assert(exists, 'Package did not get created');
-            
-            // if project compiles properly just AXE it
-            spawn('rm', ['-rf', project_path], function(code) {
-                assert.equal(code, 0, 'Could not remove project directory');
-            });
-        });
-    });
-
-});

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/bin/tests/test_create_win.js
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/bin/tests/test_create_win.js b/lib/cordova-1.9.0/lib/android/bin/tests/test_create_win.js
deleted file mode 100755
index e8202de..0000000
--- a/lib/cordova-1.9.0/lib/android/bin/tests/test_create_win.js
+++ /dev/null
@@ -1,143 +0,0 @@
-var build_path = __dirname + '/../..'
-    project_path = process.env.Temp + '\\example',
-    package_name = 'org.apache.cordova.example',
-    package_as_path = 'org/apache/cordova/example',
-    project_name = 'cordovaExample';
-
-var path = require('path'),
-    fs = require('fs'),
-    util = require('util'),
-    assert = require('assert'),
-    exec = require('child_process').exec,
-    spawn = require('child_process').spawn;
-
-var version = fs.readFileSync(build_path + '/VERSION').toString().replace('\r\n', '');
-
-assert(version !== undefined);
-assert(version !== '');
-
-process.on('uncaughtException', function (err) {
-    console.log('Caught exception: ' + err);
-    exec('rd /s /q ' + project_path);
-});
-
-var create_project = spawn('cscript',
-                           [build_path + '/bin/create.js',
-                            project_path,
-                            package_name,
-                            project_name]
-                          );
-
-create_project.stderr.on('data', function (data) {
-  console.log('ps stderr: ' + data);
-});
-
-create_project.stderr.on('data', function(data) {
-    console.log(data.toString());
-});
-
-create_project.stdout.on('data', function(data) {
-    console.log(data.toString());
-});
-
-create_project.on('exit', function(code) {
-    assert.equal(code, 0, 'Project did not get created');
-
-    // make sure the project was created
-    path.exists(project_path, function(exists) {
-        assert(exists, 'Project path does not exist');
-    });
-
-    // make sure the build directory was cleaned up
-   // path.exists(build_path + '/framework/libs', function(exists) {
-   //     assert(!exists, 'libs directory did not get cleaned up');
-   // });
-    path.exists(build_path + util.format('/framework/assets/cordova-%s.js', version), function(exists) {
-        assert(!exists, 'javascript file did not get cleaned up');
-    });
-    path.exists(build_path + util.format('/framework/cordova-%s.jar', version), function(exists) {
-        assert(!exists, 'jar file did not get cleaned up');
-    });
-
-    // make sure AndroidManifest.xml was added
-    path.exists(util.format('%s/AndroidManifest.xml', project_path), function(exists) {
-        assert(exists, 'AndroidManifest.xml did not get created');
-        // TODO check that the activity name was properly substituted
-    });
-
-    // make sure main Activity was added 
-    path.exists(util.format('%s/src/%s/%s.java', project_path, package_as_path, project_name), function(exists) {
-        assert(exists, 'Activity did not get created');
-        // TODO check that package name and activity name were substitued properly
-    });
-   
-    // make sure plugins.xml was added
-    path.exists(util.format('%s/res/xml/plugins.xml', project_path), function(exists) {
-        assert(exists, 'plugins.xml did not get created');
-    });
-    
-    // make sure cordova.xml was added
-    path.exists(util.format('%s/res/xml/cordova.xml', project_path), function(exists) {
-        assert(exists, 'plugins.xml did not get created');
-    });
-    
-    // make sure cordova.jar was added
-    path.exists(util.format('%s/libs/cordova-%s.jar', project_path, version), function(exists) {
-        assert(exists, 'cordova.jar did not get added');
-    });
-    
-    // make sure cordova.js was added
-    path.exists(util.format('%s/assets/www/cordova-%s.js', project_path, version), function(exists) {
-        assert(exists, 'cordova.js did not get added');
-    });
-    
-    // make sure cordova master script was added
-    path.exists(util.format('%s/cordova/cordova.bat', project_path), function(exists) {
-        assert(exists, 'cordova script did not get added');
-    });
-    
-    // make sure debug script was added
-    path.exists(util.format('%s/cordova/debug.bat', project_path), function(exists) {
-        assert(exists, 'debug script did not get added');
-    });
-    
-    // make sure BOOM script was added
-    path.exists(util.format('%s/cordova/BOOM.bat', project_path), function(exists) {
-        assert(exists, 'BOOM script did not get added');
-    });
-    
-    // make sure log script was added
-    path.exists(util.format('%s/cordova/log.bat', project_path), function(exists) {
-        assert(exists, 'log script did not get added');
-    });
-    
-    // make sure clean script was added
-    path.exists(util.format('%s/cordova/clean.bat', project_path), function(exists) {
-        assert(exists, 'clean script did not get added');
-    });
-    
-    // make sure emulate script was added
-    path.exists(util.format('%s/cordova/emulate.bat', project_path), function(exists) {
-        assert(exists, 'emulate script did not get added');
-    });
-    
-    // make sure appinfo.jar script was added
-    path.exists(util.format('%s/cordova/appinfo.jar', project_path), function(exists) {
-        assert(exists, 'appinfo.jar script did not get added');
-    });
-  
-  // check that project compiles && creates a cordovaExample-debug.apk
-  // XXX: !@##!@# WINDOWS
-    exec('ant debug -f ' + project_path + "\\build.xml", function(error, stdout, stderr) {
-        assert(error == null, "Cordova Android Project does not compile");
-        path.exists(util.format('%s/bin/%s-debug.apk', project_path, project_name), 
-                    function(exists) {
-                        assert(exists, 'Package did not get created');
-                        // if project compiles properly just AXE it
-                        exec('rd /s /q ' + project_path);
-                    });
-    });
-
-
-});
-

http://git-wip-us.apache.org/repos/asf/incubator-cordova-labs/blob/244fae11/lib/cordova-1.9.0/lib/android/cordova-1.9.0.jar
----------------------------------------------------------------------
diff --git a/lib/cordova-1.9.0/lib/android/cordova-1.9.0.jar b/lib/cordova-1.9.0/lib/android/cordova-1.9.0.jar
deleted file mode 100755
index 78e9d78..0000000
Binary files a/lib/cordova-1.9.0/lib/android/cordova-1.9.0.jar and /dev/null differ