Created
July 11, 2015 00:20
-
-
Save james4k/49431c4daa6a303516e0 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
diff --git a/tools/CommandLineTools.hx b/tools/CommandLineTools.hx | |
index 8c36f02..4512cfc 100644 | |
--- a/tools/CommandLineTools.hx | |
+++ b/tools/CommandLineTools.hx | |
@@ -489,13 +489,17 @@ class CommandLineTools { | |
if (project.targetHandlers.exists (Std.string (project.target))) { | |
LogHelper.info ("", LogHelper.accentColor + "Using target platform: " + Std.string (project.target).to- | |
+ | |
var handler = project.targetHandlers.get (Std.string (project.target)); | |
var projectData = Serializer.run (project); | |
var temporaryFile = PathHelper.getTemporaryFile (); | |
File.saveContent (temporaryFile, projectData); | |
- var args = [ "run", handler, command, temporaryFile ]; | |
+ var targetDir = PathHelper.getHaxelib (new Haxelib (handler)); | |
+ var exePath = Path.join ([targetDir, "run.exe"]); | |
+ var exeExists = FileSystem.exists (exePath); | |
+ | |
+ var args = [ command, temporaryFile ]; | |
if (LogHelper.verbose) args.push ("-verbose"); | |
if (!LogHelper.enableColor) args.push ("-nocolor"); | |
@@ -507,8 +511,16 @@ class CommandLineTools { | |
args = args.concat (additionalArguments); | |
} | |
+ | |
+ if (exeExists) { | |
+ | |
+ ProcessHelper.runCommand ("", targetDir + "run.exe", args); | |
+ | |
+ } else { | |
- ProcessHelper.runCommand ("", "haxelib", args); | |
+ ProcessHelper.runCommand ("", "haxelib", ["run", handler].concat (args)); | |
+ | |
+ } | |
try { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment