Improve 'lime display' when templates have not been processed

This commit is contained in:
Joshua Granick
2019-02-26 14:01:45 -08:00
parent 2fd940239f
commit 44bf137f9b
12 changed files with 239 additions and 222 deletions

View File

@@ -1,25 +1,22 @@
package;
import hxp.ArrayTools;
import hxp.Haxelib;
import hxp.HXML;
import hxp.Log;
import hxp.Path;
import haxe.Template;
import hxp.System;
import lime.tools.AndroidHelper;
import lime.tools.Architecture;
import hxp.ArrayTools;
import lime.tools.AssetHelper;
import lime.tools.AssetType;
import lime.tools.CPPHelper;
import lime.tools.DeploymentHelper;
import hxp.System;
import hxp.Haxelib;
import lime.tools.HXProject;
import lime.tools.Icon;
import lime.tools.IconHelper;
import hxp.Log;
import hxp.Path;
import lime.tools.PlatformTarget;
import hxp.System;
import lime.tools.HXProject;
import lime.tools.ProjectHelper;
import hxp.System;
import sys.io.File;
import sys.FileSystem;
@@ -176,15 +173,20 @@ class AndroidPlatform extends PlatformTarget
private function getDisplayHXML():String
{
var hxml = System.findTemplate(project.templatePaths, "android/hxml/" + buildType + ".hxml");
var path = targetDirectory + "/haxe/" + buildType + ".hxml";
var context = project.templateContext;
context.CPP_DIR = targetDirectory + "/obj";
context.OUTPUT_DIR = targetDirectory;
var template = new Template(File.getContent(hxml));
return template.execute(context);
if (FileSystem.exists(path))
{
return File.getContent(path);
}
else
{
var context = project.templateContext;
var hxml = new HXML();
hxml.noOutput = true;
hxml.cpp = "_";
return context.HAXE_FLAGS + "\n" + hxml.toString();
}
}
public override function install():Void