From 923c29aa2b9624e5be59cb6b10e095733fdeb048 Mon Sep 17 00:00:00 2001 From: Brian LeRoux Date: Tue, 26 Jan 2010 16:24:35 -0800 Subject: [PATCH] cleanup continued --- droidgap | 21 +++++++++---------- {framework/assets/www => example}/index.html | 0 {framework/assets/www => example}/master.css | 0 {framework/assets/www => example}/phonegap.js | 0 4 files changed, 10 insertions(+), 11 deletions(-) rename {framework/assets/www => example}/index.html (100%) rename {framework/assets/www => example}/master.css (100%) rename {framework/assets/www => example}/phonegap.js (100%) diff --git a/droidgap b/droidgap index 2b7780b0..f97d6f81 100755 --- a/droidgap +++ b/droidgap @@ -11,12 +11,11 @@ class Build write_java end - # creates framework/phonegap.jar using android_sdk_path - # - # TODO - # - write out local.properties with android sdk every time + # removes local.properties and recreates based on android_sdk_path + # then generates framework/phonegap.jar def build_jar - `touch #{ @android_sdk_path }` unless File.exists? @android_sdk_path + `rm framework/local.properties` + `ECHO 'sdk-location=#{ @android_sdk_path }' > framework/local.properties` `ant jar` end @@ -31,7 +30,7 @@ class Build open('framework/AndroidManifest.xml', 'r') do |old| manifest = old.read manifest.gsub! 'package="com.phonegap"', "package=\"#{ @pkg }\"" - manifest.gsub! 'android:name=".StandAlone"', ".#{ @name }" + manifest.gsub! 'android:name=".StandAlone"', "android:name=\".#{ @name }\"" end open("#{ @path }/AndroidManifest.xml", 'w') {|x| x.puts manifest } end @@ -80,10 +79,10 @@ if(ARGV.length == 5) else puts <<-EOF - DroidGap: An Android PhoneGap Project Generator - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + DroidGap: PhoneGap/Android Project Generator + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Creates a fresh Android/PhoneGap app for hybrid mobile web hacking. + Creates a fresh app for hybrid mobile web hacking. Delicious robot! Usage: @@ -94,8 +93,8 @@ else android_sdk_path ... The path to your Android SDK install. name ............... The name of your application. package_name ....... The name of your package (For example: com.nitobi.demo) - www ................ The name of your Web App. - path ............... Location of where you want to work on your application. + www ................ The path to your www folder. (Wherein your HTML, CSS and JS app is.) + path ............... The path to generate the application. EOF end diff --git a/framework/assets/www/index.html b/example/index.html similarity index 100% rename from framework/assets/www/index.html rename to example/index.html diff --git a/framework/assets/www/master.css b/example/master.css similarity index 100% rename from framework/assets/www/master.css rename to example/master.css diff --git a/framework/assets/www/phonegap.js b/example/phonegap.js similarity index 100% rename from framework/assets/www/phonegap.js rename to example/phonegap.js