Add initial support for '--output-file' option on 'display' command
This commit is contained in:
@@ -1015,6 +1015,15 @@ class CommandLineTools
|
||||
Log.println(" \x1b[1m--source\x1b[0;3m=value\x1b[0m -- Add an additional <source/> value");
|
||||
Log.println(" \x1b[1m--certificate-\x1b[0;3moption=value\x1b[0m -- Override a project <certificate/> setting");
|
||||
}
|
||||
|
||||
if (command == "display")
|
||||
{
|
||||
Log.println("");
|
||||
Log.println(" " + Log.accentColor + "Display Options:" + Log.resetColor);
|
||||
Log.println("");
|
||||
Log.println(" \x1b[3m(no option)\x1b[0m -- Display HXML build arguments");
|
||||
Log.println(" \x1b[1m--output-file\x1b[0m -- Display the output file for the project");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2117,6 +2126,10 @@ class CommandLineTools
|
||||
{
|
||||
targetFlags.set("help", "");
|
||||
}
|
||||
else if (argument == "--output-file")
|
||||
{
|
||||
targetFlags.set ("output-file", "");
|
||||
}
|
||||
else if (argument.substr(0, 1) == "-")
|
||||
{
|
||||
if (argument == "-dce" || argument.substr(1, 1) == "-")
|
||||
|
||||
@@ -168,7 +168,30 @@ class AndroidPlatform extends PlatformTarget
|
||||
|
||||
public override function display():Void
|
||||
{
|
||||
Sys.println(getDisplayHXML());
|
||||
if (project.targetFlags.exists("output-file"))
|
||||
{
|
||||
var build = "-debug";
|
||||
if (project.keystore != null)
|
||||
{
|
||||
build = "-release";
|
||||
}
|
||||
|
||||
var outputDirectory = null;
|
||||
if (project.config.exists("android.gradle-build-directory"))
|
||||
{
|
||||
outputDirectory = Path.combine(project.config.getString("android.gradle-build-directory"), project.app.file + "/app/outputs/apk");
|
||||
}
|
||||
else
|
||||
{
|
||||
outputDirectory = Path.combine(FileSystem.fullPath(targetDirectory), "bin/app/build/outputs/apk");
|
||||
}
|
||||
|
||||
Sys.println(Path.combine(outputDirectory, project.app.file + build + ".apk"));
|
||||
}
|
||||
else
|
||||
{
|
||||
Sys.println(getDisplayHXML());
|
||||
}
|
||||
}
|
||||
|
||||
private function getDisplayHXML():String
|
||||
|
||||
@@ -233,7 +233,14 @@ class EmscriptenPlatform extends PlatformTarget
|
||||
|
||||
public override function display():Void
|
||||
{
|
||||
Sys.println(getDisplayHXML());
|
||||
if (project.targetFlags.exists("output-file"))
|
||||
{
|
||||
Sys.println(outputFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
Sys.println(getDisplayHXML());
|
||||
}
|
||||
}
|
||||
|
||||
private function getDisplayHXML():String
|
||||
|
||||
@@ -55,7 +55,14 @@ class FlashPlatform extends PlatformTarget
|
||||
|
||||
public override function display():Void
|
||||
{
|
||||
Sys.println(getDisplayHXML());
|
||||
if (project.targetFlags.exists ("output-file"))
|
||||
{
|
||||
Sys.println (Path.combine(targetDirectory, project.app.file + ".swf"));
|
||||
}
|
||||
else
|
||||
{
|
||||
Sys.println(getDisplayHXML());
|
||||
}
|
||||
}
|
||||
|
||||
private function generateContext():Dynamic
|
||||
|
||||
@@ -117,7 +117,14 @@ class HTML5Platform extends PlatformTarget
|
||||
|
||||
public override function display():Void
|
||||
{
|
||||
Sys.println(getDisplayHXML());
|
||||
if (project.targetFlags.exists("output-file"))
|
||||
{
|
||||
Sys.println(outputFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
Sys.println(getDisplayHXML());
|
||||
}
|
||||
}
|
||||
|
||||
private function getDisplayHXML():String
|
||||
|
||||
@@ -72,7 +72,14 @@ class IOSPlatform extends PlatformTarget
|
||||
|
||||
public override function display():Void
|
||||
{
|
||||
Sys.println(getDisplayHXML());
|
||||
if (project.targetFlags.exists("output-file"))
|
||||
{
|
||||
Sys.println(Path.combine(targetDirectory, project.app.file + ".xcodeproj"));
|
||||
}
|
||||
else
|
||||
{
|
||||
Sys.println(getDisplayHXML());
|
||||
}
|
||||
}
|
||||
|
||||
private function generateContext():Dynamic
|
||||
|
||||
@@ -234,7 +234,14 @@ class LinuxPlatform extends PlatformTarget
|
||||
|
||||
public override function display():Void
|
||||
{
|
||||
Sys.println(getDisplayHXML());
|
||||
if (project.targetFlags.exists("output-file"))
|
||||
{
|
||||
Sys.println(executablePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
Sys.println(getDisplayHXML());
|
||||
}
|
||||
}
|
||||
|
||||
private function generateContext():Dynamic
|
||||
|
||||
@@ -221,7 +221,14 @@ class MacPlatform extends PlatformTarget
|
||||
|
||||
public override function display():Void
|
||||
{
|
||||
Sys.println(getDisplayHXML());
|
||||
if (project.targetFlags.exists("output-file"))
|
||||
{
|
||||
Sys.println(Path.combine(targetDirectory, project.app.file));
|
||||
}
|
||||
else
|
||||
{
|
||||
Sys.println(getDisplayHXML());
|
||||
}
|
||||
}
|
||||
|
||||
private function generateContext():Dynamic
|
||||
|
||||
@@ -72,7 +72,14 @@ class TVOSPlatform extends PlatformTarget
|
||||
|
||||
public override function display():Void
|
||||
{
|
||||
Sys.println(getDisplayHXML());
|
||||
if (project.targetFlags.exists("output-file"))
|
||||
{
|
||||
Sys.println(Path.combine(targetDirectory, project.app.file + ".xcodeproj"));
|
||||
}
|
||||
else
|
||||
{
|
||||
Sys.println(getDisplayHXML());
|
||||
}
|
||||
}
|
||||
|
||||
private function generateContext():Dynamic
|
||||
|
||||
@@ -402,7 +402,14 @@ class WindowsPlatform extends PlatformTarget
|
||||
|
||||
public override function display():Void
|
||||
{
|
||||
Sys.println(getDisplayHXML());
|
||||
if (project.targetFlags.exists("output-file"))
|
||||
{
|
||||
Sys.println(executablePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
Sys.println(getDisplayHXML());
|
||||
}
|
||||
}
|
||||
|
||||
private function generateContext():Dynamic
|
||||
@@ -521,7 +528,6 @@ class WindowsPlatform extends PlatformTarget
|
||||
{
|
||||
if (targetType == "winrt")
|
||||
{
|
||||
|
||||
commands.push(["-Dwinrt", "-DHXCPP_M64"]);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user