Improve 'lime display' when templates have not been processed
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
package;
|
||||
|
||||
import hxp.Haxelib;
|
||||
import hxp.HXML;
|
||||
import hxp.Log;
|
||||
import hxp.Path;
|
||||
import hxp.NDLL;
|
||||
import haxe.Template;
|
||||
import hxp.System;
|
||||
import lime.tools.Architecture;
|
||||
import lime.tools.Asset;
|
||||
import lime.tools.AssetHelper;
|
||||
@@ -10,25 +13,18 @@ import lime.tools.AssetType;
|
||||
import lime.tools.CPPHelper;
|
||||
import lime.tools.CSHelper;
|
||||
import lime.tools.DeploymentHelper;
|
||||
import hxp.System;
|
||||
import lime.tools.GUID;
|
||||
import hxp.Haxelib;
|
||||
import lime.tools.HTML5Helper;
|
||||
import lime.tools.HXProject;
|
||||
import lime.tools.Icon;
|
||||
import lime.tools.IconHelper;
|
||||
import lime.tools.JavaHelper;
|
||||
import hxp.Log;
|
||||
import lime.tools.ModuleHelper;
|
||||
import lime.tools.NekoHelper;
|
||||
import lime.tools.NodeJSHelper;
|
||||
import hxp.Path;
|
||||
import lime.tools.Platform;
|
||||
import hxp.System;
|
||||
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;
|
||||
|
||||
@@ -420,13 +416,27 @@ class WindowsPlatform extends PlatformTarget
|
||||
|
||||
private function getDisplayHXML():String
|
||||
{
|
||||
var hxml = System.findTemplate(project.templatePaths, targetType + "/hxml/" + buildType + ".hxml");
|
||||
var template = new Template(File.getContent(hxml));
|
||||
var path = targetDirectory + "/haxe/" + buildType + ".hxml";
|
||||
|
||||
var context = generateContext();
|
||||
context.OUTPUT_DIR = targetDirectory;
|
||||
|
||||
return template.execute(context);
|
||||
if (FileSystem.exists(path))
|
||||
{
|
||||
return File.getContent(path);
|
||||
}
|
||||
else
|
||||
{
|
||||
var context = project.templateContext;
|
||||
var hxml = new HXML();
|
||||
hxml.noOutput = true;
|
||||
switch (targetType)
|
||||
{
|
||||
case "hl": hxml.hl = "_.hl";
|
||||
case "neko": hxml.neko = "_.n";
|
||||
case "java": hxml.java = "_";
|
||||
case "nodejs", "winjs": hxml.js = "_.js";
|
||||
default: hxml.cpp = "_";
|
||||
}
|
||||
return context.HAXE_FLAGS + "\n" + hxml.toString();
|
||||
}
|
||||
}
|
||||
|
||||
public override function rebuild():Void
|
||||
|
||||
Reference in New Issue
Block a user