Advertisement
Guest User

Untitled

a guest
Jul 30th, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. diff --git a/tools/CommandLineTools.hx b/tools/CommandLineTools.hx
  2. index 8c36f02..4512cfc 100644
  3. --- a/tools/CommandLineTools.hx
  4. +++ b/tools/CommandLineTools.hx
  5. @@ -489,13 +489,17 @@ class CommandLineTools {
  6. if (project.targetHandlers.exists (Std.string (project.target))) {
  7.  
  8. LogHelper.info ("", LogHelper.accentColor + "Using target platform: " + Std.string (project.target).to-
  9. +
  10. var handler = project.targetHandlers.get (Std.string (project.target));
  11. var projectData = Serializer.run (project);
  12. var temporaryFile = PathHelper.getTemporaryFile ();
  13. File.saveContent (temporaryFile, projectData);
  14.  
  15. - var args = [ "run", handler, command, temporaryFile ];
  16. + var targetDir = PathHelper.getHaxelib (new Haxelib (handler));
  17. + var exePath = Path.join ([targetDir, "run.exe"]);
  18. + var exeExists = FileSystem.exists (exePath);
  19. +
  20. + var args = [ command, temporaryFile ];
  21.  
  22. if (LogHelper.verbose) args.push ("-verbose");
  23. if (!LogHelper.enableColor) args.push ("-nocolor");
  24. @@ -507,8 +511,16 @@ class CommandLineTools {
  25. args = args.concat (additionalArguments);
  26.  
  27. }
  28. +
  29. + if (exeExists) {
  30. +
  31. + ProcessHelper.runCommand ("", targetDir + "run.exe", args);
  32. +
  33. + } else {
  34.  
  35. - ProcessHelper.runCommand ("", "haxelib", args);
  36. + ProcessHelper.runCommand ("", "haxelib", ["run", handler].concat (args));
  37. +
  38. + }
  39.  
  40. try {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement