Add lime.tools.* and keep Project-based tool code
This commit is contained in:
@@ -4,39 +4,22 @@ package;
|
||||
import haxe.io.Path;
|
||||
import haxe.Json;
|
||||
import haxe.Template;
|
||||
#if (hxp > "1.0.0")
|
||||
import hxp.AssetHelper;
|
||||
import hxp.AssetType;
|
||||
import hxp.DeploymentHelper;
|
||||
import lime.tools.AssetHelper;
|
||||
import lime.tools.AssetType;
|
||||
import lime.tools.DeploymentHelper;
|
||||
import lime.tools.ProjectHelper;
|
||||
import hxp.FileHelper;
|
||||
import hxp.FlashHelper;
|
||||
import lime.tools.FlashHelper;
|
||||
import hxp.Haxelib;
|
||||
import hxp.HTML5Helper;
|
||||
import hxp.LogHelper;
|
||||
import lime.tools.HTML5Helper;
|
||||
import hxp.Log;
|
||||
import hxp.PathHelper;
|
||||
import hxp.Platform;
|
||||
import lime.tools.Platform;
|
||||
import hxp.PlatformHelper;
|
||||
import hxp.PlatformTarget;
|
||||
import lime.tools.PlatformTarget;
|
||||
import hxp.ProcessHelper;
|
||||
import hxp.Project;
|
||||
import lime.tools.Project;
|
||||
import hxp.WatchHelper;
|
||||
#else
|
||||
import hxp.helpers.AssetHelper;
|
||||
import hxp.helpers.DeploymentHelper;
|
||||
import hxp.helpers.FileHelper;
|
||||
import hxp.helpers.FlashHelper;
|
||||
import hxp.helpers.HTML5Helper;
|
||||
import hxp.helpers.LogHelper;
|
||||
import hxp.helpers.PathHelper;
|
||||
import hxp.helpers.PlatformHelper;
|
||||
import hxp.helpers.ProcessHelper;
|
||||
import hxp.helpers.WatchHelper;
|
||||
import hxp.project.AssetType;
|
||||
import hxp.project.Haxelib;
|
||||
import hxp.project.HXProject in Project;
|
||||
import hxp.project.Platform;
|
||||
import hxp.project.PlatformTarget;
|
||||
#end
|
||||
import sys.io.File;
|
||||
import sys.FileSystem;
|
||||
|
||||
@@ -105,7 +88,7 @@ class FlashPlatform extends PlatformTarget {
|
||||
|
||||
}
|
||||
|
||||
if (LogHelper.verbose) {
|
||||
if (Log.verbose) {
|
||||
|
||||
project.haxedefs.set ("verbose", 1);
|
||||
|
||||
@@ -221,14 +204,14 @@ class FlashPlatform extends PlatformTarget {
|
||||
var context = generateContext ();
|
||||
context.OUTPUT_DIR = targetDirectory;
|
||||
|
||||
FileHelper.recursiveSmartCopyTemplate (project, "haxe", targetDirectory + "/haxe", context);
|
||||
FileHelper.recursiveSmartCopyTemplate (project, "flash/hxml", targetDirectory + "/haxe", context);
|
||||
FileHelper.recursiveSmartCopyTemplate (project, "flash/haxe", targetDirectory + "/haxe", context, true, false);
|
||||
ProjectHelper.recursiveSmartCopyTemplate (project, "haxe", targetDirectory + "/haxe", context);
|
||||
ProjectHelper.recursiveSmartCopyTemplate (project, "flash/hxml", targetDirectory + "/haxe", context);
|
||||
ProjectHelper.recursiveSmartCopyTemplate (project, "flash/haxe", targetDirectory + "/haxe", context, true, false);
|
||||
|
||||
if (project.targetFlags.exists ("web") || project.app.url != "") {
|
||||
|
||||
PathHelper.mkdir (destination);
|
||||
FileHelper.recursiveSmartCopyTemplate (project, "flash/templates/web", destination, generateContext ());
|
||||
ProjectHelper.recursiveSmartCopyTemplate (project, "flash/templates/web", destination, generateContext ());
|
||||
|
||||
}
|
||||
|
||||
@@ -273,7 +256,7 @@ class FlashPlatform extends PlatformTarget {
|
||||
var path = PathHelper.combine (destination, asset.targetPath);
|
||||
|
||||
PathHelper.mkdir (Path.directory (path));
|
||||
FileHelper.copyAsset (asset, path, context);
|
||||
AssetHelper.copyAsset (asset, path, context);
|
||||
|
||||
}
|
||||
|
||||
@@ -301,9 +284,9 @@ class FlashPlatform extends PlatformTarget {
|
||||
|
||||
public override function watch ():Void {
|
||||
|
||||
var dirs = WatchHelper.processHXML (project, getDisplayHXML ());
|
||||
var command = WatchHelper.getCurrentCommand ();
|
||||
WatchHelper.watch (project, command, dirs);
|
||||
var dirs = WatchHelper.processHXML (getDisplayHXML (), project.app.path);
|
||||
var command = ProjectHelper.getCurrentCommand ();
|
||||
WatchHelper.watch (command, dirs);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user