From 466c7ccaff6d09d059da83ec6187cf7c8c1b8d4c Mon Sep 17 00:00:00 2001 From: Brian LeRoux Date: Wed, 24 Feb 2010 15:23:33 -0800 Subject: [PATCH] some cleanup of droidgap --- droidgap | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/droidgap b/droidgap index a10b4c04..8ca95427 100755 --- a/droidgap +++ b/droidgap @@ -7,13 +7,8 @@ class Build def initialize(*a) @android_sdk_path, @name, @pkg, @www, @path = a -<<<<<<< HEAD:droidgap - @s = File::SEPARATOR - @dir = Dir.pwd + @s -======= @android_dir = File.expand_path(File.dirname(__FILE__)) @framework_dir = File.join(@android_dir, "framework") ->>>>>>> 594e77690c3ea072feb173168127c8c4fe83aeec:droidgap end # runs the build script @@ -47,14 +42,14 @@ class Build # TODO need to allow more flexible SDK targetting # TODO validate Android SDK def create_android - puts "Creating Android project..." - `android create project -t 5 -k #{ @pkg } -a #{ @name } -n #{ @name } -p #{ @path }` + target_id = 5 # `android list targets` =~ /id:\s*(\d+).*android-5/ ? $1 : 5 + puts "Creating Android project... #{ target_id }" + `android create project -t #{ target_id } -k #{ @pkg } -a #{ @name } -n #{ @name } -p #{ @path }` end def include_www puts "Adding www folder to project..." - target_id = `android list targets` =~ /id:\s*(\d+).*android-5/ ? $1 : 5 - `android create project -t #{target_id} -k #{ @pkg } -a #{ @name } -n #{ @name } -p #{ @path }` + FileUtils.mkdir_p File.join(@path, "assets", "www") FileUtils.cp_r File.join(@www, "."), File.join(@path, "assets", "www") end