From 7ae766d4485a0e85693a358958f1a143d9fcb59c Mon Sep 17 00:00:00 2001 From: Joseph Cloutier Date: Fri, 13 Jan 2023 21:19:52 -0500 Subject: [PATCH] Use `applicationDirectory` to locate assets. `programPath()` returns the directory of the executable, but that isn't always the asset root. (Notably, in the case of Mac apps.) --- templates/haxe/ManifestResources.hx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/templates/haxe/ManifestResources.hx b/templates/haxe/ManifestResources.hx index a938f5686..cfaede1fb 100644 --- a/templates/haxe/ManifestResources.hx +++ b/templates/haxe/ManifestResources.hx @@ -59,10 +59,8 @@ import sys.FileSystem; rootPath = "assets/"; #elseif android rootPath = ""; - #elseif console + #elseif (console || sys) rootPath = lime.system.System.applicationDirectory; - #elseif sys - rootPath = Path.directory(Sys.programPath()) + "/"; #else rootPath = "./"; #end