Created
September 12, 2011 17:04
-
-
Save ajayk/1211776 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: android.rb | |
=================================================================== | |
--- android.rb (revision 13816) | |
+++ android.rb (working copy) | |
@@ -77,11 +77,11 @@ | |
$properties = $sys_properties.read_properties() | |
$sdk_path = $properties["androidsdkpath"] | |
$platform = $properties["androidplatform"] | |
- $adb = Platform.path_for(File.join($sdk_path, "platform-tools", "adb")) | |
+ $adb = Platform.path_for(File.join($sdk_path, "platform-tools", "adb.exe")) | |
$aapt = get_binary("aapt") | |
- $builder = Platform.path_for(File.join($sdk_path, "tools", "apkbuilder")) | |
- $android = Platform.path_for(File.expand_path(File.join($sdk_path, "tools", "android"))) | |
- $emulator = Platform.path_for(File.expand_path(File.join($sdk_path, "tools", "emulator"))) | |
+ $builder = Platform.path_for(File.join($sdk_path, "tools", "apkbuilder.bat")) | |
+ $android = Platform.path_for(File.expand_path(File.join($sdk_path, "tools", "android.bat"))) | |
+ $emulator = Platform.path_for(File.expand_path(File.join($sdk_path, "tools", "emulator.exe"))) | |
class CheckPreconditions | |
def handle(fun, dir, args) | |
@@ -180,7 +180,9 @@ | |
if (android_installed?) | |
android_target = $properties["androidtarget"].to_s | |
sh "#{$android} update project -p android/app/ --target #{android_target}" | |
- sh "cd android/app; ant debug; cd ../../;" | |
+ temp = "android" | |
+ cmd = "cd #{temp} && cd app && ant debug " | |
+ sh cmd | |
apk = File.join('build', 'android', 'app', 'android-server.apk') | |
sh "cp android/app/bin/MainActivity-debug.apk #{apk}" | |
copy_to_prebuilt(apk, fun) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment