diff --git a/examples/HerokuShaders/project.nmml b/examples/HerokuShaders/project.lime.xml similarity index 100% rename from examples/HerokuShaders/project.nmml rename to examples/HerokuShaders/project.lime.xml diff --git a/examples/SimpleOpenGL/project.nmml b/examples/SimpleOpenGL/project.lime.xml similarity index 100% rename from examples/SimpleOpenGL/project.nmml rename to examples/SimpleOpenGL/project.lime.xml diff --git a/lime/LiME.hx b/lime/LiME.hx index f7792b1e6..121c0b143 100644 --- a/lime/LiME.hx +++ b/lime/LiME.hx @@ -126,7 +126,7 @@ class LiME { //if any post ready things that need //to happen, do it here. - window.post_ready(); + window.post_ready(); } //on_window_ready @@ -181,12 +181,27 @@ class LiME { //keyboard case SystemEvents.char: + _event.result = 1; input.lime_onchar(_event); case SystemEvents.keydown: + + #if android + if(_event.value == 27) { + _event.result = 1; + } + #end //android + input.lime_onkeydown(_event); case SystemEvents.keyup: + + #if android + if(_event.value == 27) { + _event.result = 1; + } + #end //android + input.lime_onkeyup(_event); case SystemEvents.gotinputfocus: @@ -269,8 +284,7 @@ class LiME { } - result = __updateNextWake(); - return result; + return __updateNextWake(); } //on_lime_event diff --git a/run.n b/run.n index 60c560053..e7b278f1b 100644 Binary files a/run.n and b/run.n differ diff --git a/script/CHANGES.md b/script/CHANGES.md index cdc37a456..af5f382d5 100644 --- a/script/CHANGES.md +++ b/script/CHANGES.md @@ -1,5 +1,6 @@ ### lime build tools version changes +_1.0.2_ Added code to handle injecting default project names, adding separate luxe/lime build files. _1.0.1_ Added helpers for `create` and `copy` _1.0.0_ Initial tools to forward commands to openfl-tools \ No newline at end of file diff --git a/script/build.hxml b/script/build.lime.hxml similarity index 100% rename from script/build.hxml rename to script/build.lime.hxml diff --git a/script/build.luxe.hxml b/script/build.luxe.hxml new file mode 100644 index 000000000..00d382889 --- /dev/null +++ b/script/build.luxe.hxml @@ -0,0 +1,6 @@ +-main RunScript +-neko ../../luxe/run.n +-lib openfl-tools +-D pathtools +-D luxe +-cp src \ No newline at end of file diff --git a/script/src/RunScript.hx b/script/src/RunScript.hx index cb41957fd..2634e1aff 100644 --- a/script/src/RunScript.hx +++ b/script/src/RunScript.hx @@ -77,6 +77,36 @@ class RunScript { return false; } + public static function append_project_file(args:Array) : Array { + + var explicit_project = false; + + for(i in 0...args.length) { + var arg = args[i]; + if( arg.indexOf('.xml') != -1 ) { + + var prevarg = ''; + if(i > 0) { prevarg = args[i-1]; } + + if(prevarg.substr(0,2) != '--') { + explicit_project = true; + } + + } //if there is an xml mentioned + } //for each argument + + if(!explicit_project) { + #if luxe + args.insert(1,'project.luxe.xml'); + #else + args.insert(1,'project.lime.xml'); + #end + } + + return args; + + } //append_project_file + public static var cwd : String = './'; public static function main() { //take all args and forward them to build tools @@ -91,18 +121,29 @@ class RunScript { var local_command = process_command(args); if(!local_command) { - + //check if they specify a project file, if not, append our default + var args = append_project_file(args); + //make a full command line var full_args = [ "run", "openfl-tools" ].concat(args); //enforce the folder to the current on Sys.setCwd(cwd); //and then execute return Sys.command("haxelib", full_args); - } + + } //!local command } else { Sys.println(""); - Sys.println(" lime build tools 1.0.1"); + + var version = "1.0.2"; + + #if luxe + Sys.println(" luxe build tools " + version); + #else + Sys.println(" lime build tools " + version); + #end + Sys.println(" commands : "); Sys.println("\ttest \n\t Build and run"); Sys.println("\tbuild \n\t Build");