From 82b6e6576fbd46095c6fe54be652d461a6c66d02 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Fri, 16 Jun 2017 11:40:41 -0700 Subject: [PATCH] Fix .bundle directory with include.xml --- lime/project/ProjectXMLParser.hx | 41 ++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/lime/project/ProjectXMLParser.hx b/lime/project/ProjectXMLParser.hx index b4aecd106..6973b0042 100644 --- a/lime/project/ProjectXMLParser.hx +++ b/lime/project/ProjectXMLParser.hx @@ -521,7 +521,7 @@ class ProjectXMLParser extends HXProject { } - if (!FileSystem.isDirectory (path) || Path.extension (path) == "bundle") { + if (!FileSystem.isDirectory (path)) { var asset = new Asset (path, targetPath, type, embed); asset.library = library; @@ -540,6 +540,31 @@ class ProjectXMLParser extends HXProject { assets.push (asset); + } else if (Path.extension (path) == "bundle") { + + var includePath = findIncludeFile (path); + + if (includePath != null && includePath != "" && FileSystem.exists (includePath) && !FileSystem.isDirectory (includePath)) { + + var includeProject = new ProjectXMLParser (includePath, defines); + merge (includeProject); + return; + + } else { + + var asset = new Asset (path, targetPath, type, embed); + asset.library = library; + + if (element.has.id) { + + asset.id = substitute (element.att.id); + + } + + assets.push (asset); + + } + } else { var exclude = ".*|cvs|thumbs.db|desktop.ini|*.fla|*.hash"; @@ -706,20 +731,6 @@ class ProjectXMLParser extends HXProject { private function parseAssetsElementDirectory (path:String, targetPath:String, include:String, exclude:String, type:AssetType, embed:Null, library:String, glyphs:String, recursive:Bool):Void { - if (StringTools.endsWith (path, ".bundle")) { - - var includePath = findIncludeFile (path); - - if (includePath != null && includePath != "" && FileSystem.exists (includePath) && !FileSystem.isDirectory (includePath)) { - - var includeProject = new ProjectXMLParser (includePath, defines); - merge (includeProject); - return; - - } - - } - var files = FileSystem.readDirectory (path); if (targetPath != "") {