Skip to content

Commit

Permalink
better naming scheme for output file; haxelib update
Browse files Browse the repository at this point in the history
  • Loading branch information
waneck committed Mar 4, 2014
1 parent 401314f commit 3e4930f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
21 changes: 18 additions & 3 deletions build-tool/src/compiler/java/Javac.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions haxelib.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
Binary file modified run.n
Binary file not shown.

0 comments on commit 3e4930f

Please sign in to comment.