Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions crashdumper/hooks/Util.hx
Original file line number Diff line number Diff line change
Expand Up @@ -240,17 +240,4 @@ class Util
#end
}

macro public static function getProjectVersion(path:String) {
try {
var p = Context.resolvePath(path);
var s:String = sys.io.File.getContent(p);
var r = new EReg('<\\s?app[^>]*?\\sversion="([.\\d]+)"[^>]*?>', "i");
if (r.match(s)) return macro $v{r.matched(1)};
else return macro $v{""};
//else return Context.error('No version found in xml file', Context.currentPos());
}
catch(e:Dynamic) {
return Context.error('Failed to load file $path: $e', Context.currentPos());
}
}
}
2 changes: 1 addition & 1 deletion crashdumper/hooks/openfl/HookOpenFL.hx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class HookOpenFL implements IHookPlatform
#else
fileName = Application.current.meta.get("file");
packageName = Application.current.meta.get("packageName");
version = Util.getProjectVersion("project.xml");
version = Application.current.meta.get("version");
#end
#end
#else
Expand Down