Build and run app directly from antOSDK

This commit is contained in:
Xuan Sang LE 2018-03-19 19:21:45 +01:00
parent 8643b819fd
commit 1e4c134454

View File

@ -39,6 +39,7 @@ class AntOSDK extends this.OS.GUI.BaseApplication
initWorkspace: () -> initWorkspace: () ->
me = @ me = @
@dirty = true
@fileview = @find "fileview" @fileview = @find "fileview"
div = @find "datarea" div = @find "datarea"
@currfile = "Untitled".asFileHandler() @currfile = "Untitled".asFileHandler()
@ -328,6 +329,7 @@ class AntOSDK extends this.OS.GUI.BaseApplication
me = @ me = @
file.write "text/plain", (d) -> file.write "text/plain", (d) ->
return me.error __("Error saving file {0}", file.basename) if d.error return me.error __("Error saving file {0}", file.basename) if d.error
me.dirty = true
file.dirty = false file.dirty = false
file.text = file.basename file.text = file.basename
me.tabarea.update() me.tabarea.update()
@ -620,6 +622,7 @@ class AntOSDK extends this.OS.GUI.BaseApplication
me.copy copylist, "#{me.prjfile.cache.root}/build" me.copy copylist, "#{me.prjfile.cache.root}/build"
.then () -> .then () ->
me.log "INFO", __("Build done") me.log "INFO", __("Build done")
me.dirty = false
return new Promise (r, e) -> r() return new Promise (r, e) -> r()
run: () -> run: () ->
@ -644,6 +647,7 @@ class AntOSDK extends this.OS.GUI.BaseApplication
, "json" , "json"
bnR: () -> bnR: () ->
return @run() unless @dirty
me = @ me = @
@build().then () -> @build().then () ->
me.run() me.run()