Merge branch 'develop' into cffi-unicode-fixes
This commit is contained in:
@@ -1074,17 +1074,10 @@ class HXProject extends Script
|
||||
{
|
||||
var cache = Log.verbose;
|
||||
Log.verbose = Haxelib.debug;
|
||||
var output = "";
|
||||
|
||||
try
|
||||
{
|
||||
output = Haxelib.runProcess("", ["path", name], true, true, true);
|
||||
}
|
||||
catch (e:Dynamic) {}
|
||||
|
||||
var output = Haxelib.runProcess("", ["path", name], true, true, true);
|
||||
Log.verbose = cache;
|
||||
|
||||
var split = output.split("\n");
|
||||
var split = output != null ? output.split("\n") : [];
|
||||
var haxelibName = null;
|
||||
|
||||
for (arg in split)
|
||||
|
||||
@@ -52,31 +52,39 @@ class PlatformTarget
|
||||
this.additionalArguments = additionalArguments;
|
||||
var metaFields = Meta.getFields(Type.getClass(this));
|
||||
|
||||
if (/*!Reflect.hasField (metaFields.watch, "ignore") && */ (project.targetFlags.exists("watch")))
|
||||
// known issue: this may not log in `-eval` mode on Linux
|
||||
inline function logCommand(command:String):Void
|
||||
{
|
||||
if (!Reflect.hasField(metaFields, command)
|
||||
|| !Reflect.hasField(Reflect.field(metaFields, command), "ignore"))
|
||||
{
|
||||
Log.info("", "\n" + Log.accentColor + "Running command: " + command.toUpperCase() + Log.resetColor);
|
||||
}
|
||||
}
|
||||
|
||||
if (project.targetFlags.exists("watch"))
|
||||
{
|
||||
Log.info("", "\n" + Log.accentColor + "Running command: WATCH" + Log.resetColor);
|
||||
watch();
|
||||
return;
|
||||
}
|
||||
|
||||
if ((!Reflect.hasField(metaFields, "display") || !Reflect.hasField(metaFields.display, "ignore")) && (command == "display"))
|
||||
if (command == "display")
|
||||
{
|
||||
display();
|
||||
}
|
||||
|
||||
// if (!Reflect.hasField (metaFields.clean, "ignore") && (command == "clean" || targetFlags.exists ("clean"))) {
|
||||
if ((!Reflect.hasField(metaFields, "clean") || !Reflect.hasField(metaFields.clean, "ignore"))
|
||||
&& (command == "clean"
|
||||
|| (project.targetFlags.exists("clean") && (command == "update" || command == "build" || command == "test"))))
|
||||
// if (command == "clean" || project.targetFlags.exists ("clean")) {
|
||||
if (command == "clean"
|
||||
|| (project.targetFlags.exists("clean") && (command == "update" || command == "build" || command == "test")))
|
||||
{
|
||||
Log.info("", Log.accentColor + "Running command: CLEAN" + Log.resetColor);
|
||||
logCommand("CLEAN");
|
||||
clean();
|
||||
}
|
||||
|
||||
if ((!Reflect.hasField(metaFields, "rebuild") || !Reflect.hasField(metaFields.rebuild, "ignore"))
|
||||
&& (command == "rebuild" || project.targetFlags.exists("rebuild")))
|
||||
if (command == "rebuild" || project.targetFlags.exists("rebuild"))
|
||||
{
|
||||
Log.info("", "\n" + Log.accentColor + "Running command: REBUILD" + Log.resetColor);
|
||||
logCommand("REBUILD");
|
||||
|
||||
// hack for now, need to move away from project.rebuild.path, probably
|
||||
|
||||
@@ -88,60 +96,53 @@ class PlatformTarget
|
||||
rebuild();
|
||||
}
|
||||
|
||||
if ((!Reflect.hasField(metaFields, "update") || !Reflect.hasField(metaFields.update, "ignore"))
|
||||
&& (command == "update" || command == "build" || command == "test"))
|
||||
if (command == "update" || command == "build" || command == "test")
|
||||
{
|
||||
Log.info("", "\n" + Log.accentColor + "Running command: UPDATE" + Log.resetColor);
|
||||
logCommand("update");
|
||||
// #if lime
|
||||
// AssetHelper.processLibraries (project, targetDirectory);
|
||||
// #end
|
||||
update();
|
||||
}
|
||||
|
||||
if ((!Reflect.hasField(metaFields, "build") || !Reflect.hasField(metaFields.build, "ignore"))
|
||||
&& (command == "build" || command == "test"))
|
||||
if (command == "build" || command == "test")
|
||||
{
|
||||
CommandHelper.executeCommands(project.preBuildCallbacks);
|
||||
|
||||
Log.info("", "\n" + Log.accentColor + "Running command: BUILD" + Log.resetColor);
|
||||
logCommand("build");
|
||||
build();
|
||||
|
||||
CommandHelper.executeCommands(project.postBuildCallbacks);
|
||||
}
|
||||
|
||||
if ((!Reflect.hasField(metaFields, "deploy") || !Reflect.hasField(metaFields.deploy, "ignore")) && (command == "deploy"))
|
||||
if (command == "deploy")
|
||||
{
|
||||
Log.info("", "\n" + Log.accentColor + "Running command: DEPLOY" + Log.resetColor);
|
||||
logCommand("deploy");
|
||||
deploy();
|
||||
}
|
||||
|
||||
if ((!Reflect.hasField(metaFields, "install") || !Reflect.hasField(metaFields.install, "ignore"))
|
||||
&& (command == "install" || command == "run" || command == "test"))
|
||||
if (command == "install" || command == "run" || command == "test")
|
||||
{
|
||||
Log.info("", "\n" + Log.accentColor + "Running command: INSTALL" + Log.resetColor);
|
||||
logCommand("install");
|
||||
install();
|
||||
}
|
||||
|
||||
if ((!Reflect.hasField(metaFields, "run") || !Reflect.hasField(metaFields.run, "ignore"))
|
||||
&& (command == "run" || command == "rerun" || command == "test"))
|
||||
if (command == "run" || command == "rerun" || command == "test")
|
||||
{
|
||||
Log.info("", "\n" + Log.accentColor + "Running command: RUN" + Log.resetColor);
|
||||
logCommand("run");
|
||||
run();
|
||||
}
|
||||
|
||||
if ((!Reflect.hasField(metaFields, "trace") || !Reflect.hasField(metaFields.trace, "ignore"))
|
||||
&& (command == "test" || command == "trace" || command == "run" || command == "rerun"))
|
||||
if ((command == "test" || command == "trace" || command == "run" || command == "rerun")
|
||||
&& (traceEnabled || command == "trace"))
|
||||
{
|
||||
if (traceEnabled || command == "trace")
|
||||
{
|
||||
Log.info("", "\n" + Log.accentColor + "Running command: TRACE" + Log.resetColor);
|
||||
this.trace();
|
||||
}
|
||||
logCommand("trace");
|
||||
this.trace();
|
||||
}
|
||||
|
||||
if ((!Reflect.hasField(metaFields, "uninstall") || !Reflect.hasField(metaFields.uninstall, "ignore")) && (command == "uninstall"))
|
||||
if (command == "uninstall")
|
||||
{
|
||||
Log.info("", "\n" + Log.accentColor + "Running command: UNINSTALL" + Log.resetColor);
|
||||
logCommand("UNINSTALL");
|
||||
uninstall();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ class AssetLibrary
|
||||
}
|
||||
else
|
||||
{
|
||||
return AudioBuffer.fromFile(paths.get(id));
|
||||
return AudioBuffer.fromFile(getPath(id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ class AssetLibrary
|
||||
}
|
||||
else
|
||||
{
|
||||
return Bytes.fromFile(paths.get(id));
|
||||
return Bytes.fromFile(getPath(id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ class AssetLibrary
|
||||
}
|
||||
else
|
||||
{
|
||||
return Font.fromFile(paths.get(id));
|
||||
return Font.fromFile(getPath(id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ class AssetLibrary
|
||||
}
|
||||
else
|
||||
{
|
||||
return Image.fromFile(paths.get(id));
|
||||
return Image.fromFile(getPath(id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -498,7 +498,7 @@ class AssetLibrary
|
||||
}
|
||||
else
|
||||
{
|
||||
return Bytes.loadFromFile(paths.get(id));
|
||||
return Bytes.loadFromFile(getPath(id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -521,9 +521,9 @@ class AssetLibrary
|
||||
else
|
||||
{
|
||||
#if (js && html5)
|
||||
return Font.loadFromName(paths.get(id));
|
||||
return Font.loadFromName(getPath(id));
|
||||
#else
|
||||
return Font.loadFromFile(paths.get(id));
|
||||
return Font.loadFromFile(getPath(id));
|
||||
#end
|
||||
}
|
||||
}
|
||||
@@ -579,7 +579,7 @@ class AssetLibrary
|
||||
}
|
||||
else
|
||||
{
|
||||
return Image.loadFromFile(paths.get(id));
|
||||
return Image.loadFromFile(getPath(id));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -607,7 +607,7 @@ class AssetLibrary
|
||||
else
|
||||
{
|
||||
var request = new HTTPRequest<String>();
|
||||
return request.load(paths.get(id));
|
||||
return request.load(getPath(id));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -242,7 +242,8 @@ import flash.media.Sound;
|
||||
else
|
||||
{
|
||||
var basePath = rootPath == null || rootPath == "" ? "" : Path.addTrailingSlash(rootPath);
|
||||
var libPath = paths.exists(id) ? paths.get(id) : id;
|
||||
var libPath = getPath(id);
|
||||
if (libPath == null) libPath = id;
|
||||
|
||||
var path = Path.join([basePath, libPath]);
|
||||
path = __cacheBreak(path);
|
||||
|
||||
Reference in New Issue
Block a user