diff --git a/build-tool/src/compiler/java/Javac.hx b/build-tool/src/compiler/java/Javac.hx index 2e9a608..4b779b2 100644 --- a/build-tool/src/compiler/java/Javac.hx +++ b/build-tool/src/compiler/java/Javac.hx @@ -19,14 +19,29 @@ class Javac extends Compiler override public function compile(data:Data):Void { - if (cmd.output == null) + var name = if (data.main != null) + { + var idx = data.main.lastIndexOf("."); + if (idx != -1) + data.main.substr(idx + 1); + else + data.main; + } + else { var name = Sys.getCwd(); name = name.substr(0, name.length - 1); if (name.lastIndexOf("\\") > name.lastIndexOf("/")) - cmd.output = name.split("\\").pop(); + name = name.split("\\").pop(); else - cmd.output = name.split("/").pop(); + name = name.split("/").pop(); + } + if (data.defines.exists("debug")) + name += "-Debug"; + + if (cmd.output == null) + { + cmd.output = name; } else { cmd.output = Tools.addPath(data.baseDir, cmd.output); } diff --git a/haxelib.json b/haxelib.json index 85bc7e1..052990d 100644 --- a/haxelib.json +++ b/haxelib.json @@ -4,7 +4,7 @@ "license":"Public", "tags":["java","core"], "description":"Support library for the Java backend of the Haxe compiler", - "version":"3.0.0-rc.1", - "releasenote":"Added Java standard lib JAR file", + "version":"3.1.0", + "releasenote":"Update to haxe 3.1 release and changed output file to a better naming scheme", "contributors":["waneck"] } diff --git a/run.n b/run.n index 22d7095..48fca5a 100644 Binary files a/run.n and b/run.n differ