lime
lime copied to clipboard
Version 7.6.0 problems with assets path on different platforms
Fix /haxe/ManifestResources.hx:
if (rootPath == null) {
#if (ios || tvos || emscripten)
rootPath = "assets/";
#elseif console
rootPath = lime.system.System.applicationDirectory;
#else
rootPath = "./";
#end
}
```to
if (rootPath == null) {
#if (ios || tvos || emscripten)
rootPath = "assets/";
#elseif console
rootPath = lime.system.System.applicationDirectory;
#elseif html5
rootPath = "./";
#else
rootPath = "";
#end
}
Tested with PiratePig sample project on linux, android, html5, mac, ios
For ios also need to change src/lime/utils/Assets.hx:
if (libraryPaths.exists(id))
{
path = libraryPaths[id];
rootPath = (defaultRootPath != "" ? defaultRootPath + "/" : "") + Path.directory(path);
}
else
{
to
if (libraryPaths.exists(id))
{
path = libraryPaths[id];
rootPath = Path.directory(path);
}
else
{
I can confirm not being able to build on ios for assets paths problems
for html5 target, in Ubuntu, I pass rootPath
as:
lime.embed ("MyApp", aHolderID, 0, 0, { rootPath: "<%= lab_assets %>", parameters: {id: "lab_canvas"} });
but it has no effect, its set as blank
Any update? @maaniv Can you please create a PR that has your fix? or you just fix the generated file after compilation?
I don't know if the problem still exists, but I think it's worth noting that the second change (the part involving Assets.hx) has already been incorporated. Does the manifest still cause problems?