diff --git a/crashdumper/hooks/Util.hx b/crashdumper/hooks/Util.hx index aef5d00..dce62dc 100644 --- a/crashdumper/hooks/Util.hx +++ b/crashdumper/hooks/Util.hx @@ -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()); - } - } } \ No newline at end of file diff --git a/crashdumper/hooks/openfl/HookOpenFL.hx b/crashdumper/hooks/openfl/HookOpenFL.hx index f6e7146..ef1bb4e 100644 --- a/crashdumper/hooks/openfl/HookOpenFL.hx +++ b/crashdumper/hooks/openfl/HookOpenFL.hx @@ -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