From 2375b60d20c17cb4691528c61ae25ec1b37f47aa Mon Sep 17 00:00:00 2001 From: underscorediscovery Date: Sat, 30 Nov 2013 00:42:32 -0330 Subject: [PATCH] Removing old build scripts stuff --- lime/WindowHandler.hx | 1 - run.n | Bin 119683 -> 119679 bytes script/CHANGES.md | 7 -- script/build.lime.hxml | 5 - script/build.luxe.hxml | 6 -- script/src/RunScript.hx.bak | 182 ------------------------------------ 6 files changed, 201 deletions(-) delete mode 100644 script/CHANGES.md delete mode 100644 script/build.lime.hxml delete mode 100644 script/build.luxe.hxml delete mode 100644 script/src/RunScript.hx.bak diff --git a/lime/WindowHandler.hx b/lime/WindowHandler.hx index e2757b94a..00e796653 100644 --- a/lime/WindowHandler.hx +++ b/lime/WindowHandler.hx @@ -330,7 +330,6 @@ class WindowHandler { //Cursor and window control (desktop only obviously) private static var lime_stage_set_window_position = Libs.load("lime","lime_stage_set_window_position", 3); - private static var lime_stage_show_cursor = Libs.load("lime","lime_stage_show_cursor", 2); private static var lime_stage_constrain_cursor_to_window_frame = Libs.load("lime","lime_stage_constrain_cursor_to_window_frame", 2); private static var lime_stage_set_cursor_position_in_window = Libs.load("lime","lime_stage_set_cursor_position_in_window", 3); diff --git a/run.n b/run.n index ea6f22266d94aab00fc7e49fd112dcfb5a11780c..99c454a6675c652232186de182afed9b8ed6e4f4 100644 GIT binary patch delta 46 zcmZo(&i;QH`-Yv2(pn7qp~b01#rnZzsd@S-sb%^(r4^|_MnQ4&4aV&^7#UYz1OT1F B5;y<= delta 50 zcmeyrjJ ) { - //fetch the commands - var command = args[0]; - var data = args[1]; - var data2 = (args.length > 2) ? args[2] : ''; - - #if pathtools - switch(command) { - -//create - case "create": - - var sample = data; - var name = data2; - - var samples_path = PathHelper.getHaxelib (new Haxelib("luxe")) + 'template_projects/'; - var sample_path = samples_path + sample + '/'; - - if(FileSystem.exists(sample_path)) { - //now check if they can make this here - var output_folder = (name!='') ? name : sample; - var output_path = cwd + output_folder; - - if(FileSystem.exists(output_path)) { - throw "Cannot create `" + sample + "` here, as that folder already exists!"; - } else { - trace(' - creating template at ' + output_path); - FileHelper.recursiveCopy(sample_path, output_path); - trace(' - Done!'); - } - } else { - throw "Sample project not found at : " + sample_path; - } - - return true; - -//buildto - case "copy": - - var target = data; - var dest = data2; - //lab copy html5 ~/Sven/Sites/out - var bin_dir = (target == 'html5') ? 'bin/' + target + '/bin' : 'bin/' + target + '/cpp/bin/'; - var bin_path = cwd + bin_dir; - - if(FileSystem.exists(bin_path)) { - trace(' - copying build output from ' + bin_path + ' to ' + dest); - FileHelper.recursiveCopy(bin_path, dest); - trace(' - Done!'); - } else { - throw "Cannot copy build output, did you run build/test first? looking for : " + bin_path; - } - - return true; - - case "serve": - - //non blocking open the page - var system = Sys.systemName(); - if(system == "Windows") { - new sys.io.Process('cmd', ['/C start http://localhost:55555/']); - } else { - new sys.io.Process('open', ['http://localhost:55555/']); - } - //blocking server call - - var args = ['server', '-p', '55555', '-h', 'localhost' ,'-d' , cwd + 'bin/html5/bin/']; - //run the server - Sys.command("nekotools", args); - - return true; - - default: - return false; - }#end - - 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 - var args = Sys.args(); - //get the current folder - cwd = args[args.length-1]; - //remove the CWD from the args - args = args.splice(0,args.length-1); - - if(args.length-1 > 0 || args[0] == 'serve') { - - 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", "hxtools" ].concat(args); - //enforce the folder to the current one - Sys.setCwd(cwd); - //and then execute - return Sys.command("haxelib", full_args); - - } //!local command - - } else { - Sys.println(""); - - var version = "1.0.3"; - - #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"); - Sys.println("\tserve \n\t This is for html5 target, launches a server and opens the page. \n\t i.e luxe build html5 && luxe serve"); - - #if pathtools - Sys.println("\tcreate \n\t Create a copy of inside present working directory"); - Sys.println("\tcopy \n\t Copy the bin folder for to "); - #end - - Sys.println(""); - return 0; - } //if we have enough args - - return 0; - } -}