Allow running native apps from other directories.
It isn't always safe to assume `./` is the app directory, and removing that assumption opens up options. Requires at least Haxe 3.4, but I don't think Lime supports 3.3 anyway.
This commit is contained in:
@@ -3,6 +3,7 @@ package;
|
||||
|
||||
|
||||
import haxe.io.Bytes;
|
||||
import haxe.io.Path;
|
||||
import lime.utils.AssetBundle;
|
||||
import lime.utils.AssetLibrary;
|
||||
import lime.utils.AssetManifest;
|
||||
@@ -44,6 +45,8 @@ import sys.FileSystem;
|
||||
rootPath = "";
|
||||
#elseif console
|
||||
rootPath = lime.system.System.applicationDirectory;
|
||||
#elseif sys
|
||||
rootPath = Path.directory(Sys.programPath()) + "/";
|
||||
#else
|
||||
rootPath = "./";
|
||||
#end
|
||||
|
||||
Reference in New Issue
Block a user