CB-937 fixing debug for windows

This commit is contained in:
Anis Kadri 2012-06-28 17:11:21 -07:00
parent 17ff6be6a9
commit e069bbb800

View File

@ -71,11 +71,14 @@ function clean() {
} }
function debug() { function debug() {
exec("%comspec% /c ant.bat debug -f "+ROOT+"\\build.xml 2>&1"); if(emulator_running()) {
} exec("%comspec% /c ant.bat debug install -f "+ROOT+"\\build.xml 2>&1");
} else {
function debug_install() { exec("%comspec% /c ant.bat debug -f "+ROOT+"\\build.xml 2>&1");
exec("%comspec% /c ant.bat debug install -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() { function log() {
@ -90,15 +93,8 @@ function launch() {
function BOOM() { function BOOM() {
clean(); clean();
if(emulator_running()) { debug();
debug_install(); launch();
launch();
} else {
debug();
WScript.Echo("##################################################################");
WScript.Echo("# Plug in your device or launch an emulator with cordova/emulate #");
WScript.Echo("##################################################################");
}
} }
var args = WScript.Arguments; var args = WScript.Arguments;
if(args.count() != 1) { if(args.count() != 1) {