Permalink
Browse files

Fixed doubling of template paths

  • Loading branch information...
1 parent a6ea788 commit 28114d4290f1ab20f36e664f2591bd612039fb37 @jgranick jgranick committed Mar 20, 2013
View
@@ -6,6 +6,6 @@
<ndll name="zlib" haxelib="hxcpp" />
<ndll name="nme" />
- <!-- <template path="templates/default" /> -->
+ <templatePath name="templates/default" />
</extension>
@@ -792,6 +792,12 @@ class CommandLineTools {
}
+ project.command = command;
+ project.debug = debug;
+ project.target = target;
+ project.targetFlags = targetFlags;
+ project.templatePaths = [ nme + "/templates/default", nme + "/tools/command-line" ].concat (project.templatePaths);
+
}
}
@@ -803,12 +809,6 @@ class CommandLineTools {
}
- project.command = command;
- project.debug = debug;
- project.target = target;
- project.targetFlags = targetFlags;
- project.templatePaths = project.templatePaths.concat ([ nme + "/templates/default", nme + "/tools/command-line" ]);
-
project.merge (config);
if (architectures.length > 0) {
@@ -852,12 +852,11 @@ class CommandLineTools {
attribute = components.join ("");
}
-
-
+
if (field == "template" && attribute == "path") {
-
+
project.templatePaths.push (projectDefines.get (key));
-
+
} else {
if (Reflect.hasField (project, field)) {
@@ -160,13 +160,13 @@ class WindowsPlatform implements IPlatformTool {
if (asset.type != AssetType.TEMPLATE) {
- PathHelper.mkdir (Path.directory (applicationDirectory + "/" + asset.targetPath));
- FileHelper.copyAssetIfNewer (asset, applicationDirectory + "/" + asset.targetPath);
+ PathHelper.mkdir (Path.directory (PathHelper.combine (applicationDirectory, asset.targetPath)));
+ FileHelper.copyAssetIfNewer (asset, PathHelper.combine (applicationDirectory, asset.targetPath));
} else {
- PathHelper.mkdir (Path.directory (applicationDirectory + "/" + asset.targetPath));
- FileHelper.copyAsset (asset, applicationDirectory + "/" + asset.targetPath, context);
+ PathHelper.mkdir (Path.directory (PathHelper.combine (applicationDirectory, asset.targetPath)));
+ FileHelper.copyAsset (asset, PathHelper.combine (applicationDirectory, asset.targetPath), context);
}
@@ -1102,6 +1102,7 @@ class NMMLParser extends NMEProject {
} else {
+ templatePaths.remove (path);
templatePaths.push (path);
}
@@ -1114,7 +1115,10 @@ class NMMLParser extends NMEProject {
case "templatePath":
- templatePaths.push (PathHelper.combine (extensionPath, substitute (element.att.name)));
+ var path = PathHelper.combine (extensionPath, substitute (element.att.name));
+
+ templatePaths.remove (path);
+ templatePaths.push (path);
case "preloader":

0 comments on commit 28114d4

Please sign in to comment.