ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Wish List (https://www.esoui.com/forums/forumdisplay.php?f=177)
-   -   [outdated] api to get addon file status (https://www.esoui.com/forums/showthread.php?t=7824)

sirinsidiator 05/31/18 07:40 AM

[outdated] api to get addon file status
 
I'd like to see an extension to the addon manager api that allows to get the addon path relative to the addon root (in order to be able to check if the addon is loaded from a nested directory), the file paths specified in the addon manifest and their loading state.
Possible states could be "queued" before it starts loading, "loaded" afterwards and "failed" if it could not be opened. For the failed state there could also be an extra return which shows why it failed. For example because the file is missing or it could not be parsed or whatever other reasons there could be.

Shinni 05/31/18 08:47 AM

Example use case:
1)
We sometimes get "bug" reports, where users (or the minion app) did not copy all the files.
With the API we could check if every file is loaded and display a more useful error message to the user, when a file is missing.

2) With nested addons, we sometimes get the following "bug": Users install some addon (let's call it exampleAddon) as AddOns/exampleAddon/exampleAddon/exampleAddon.txt instead of AddOns/exampleAddon/exampleAddon.txt
The addon is properly loaded, but custom textures for instance can not be found, since they point to AddOns/exampleAddon/someTexture.dds instead of AddOns/exampleAddon/exampleAddon/someTexture.dds
When detecting that an addon is installed incorrectly, we can display an error message to the user.
(@sirinsidiator I guess this is also a usecase you were thinking of, but technically we can check the addon folder location already via pcall+error)

sirinsidiator 05/31/18 02:23 PM

That's pretty much it. Might also be nice for authors to check if their manifest contains invalid paths for example. pChat had the wrong folder name to LAM for years and nobody noticed. :D

As for textures, using the addon name as a prefix for the image path to allow them to be loaded relative to the manifest would be nice. Something like "AwesomeGuildStore:images/weapon/twohand_up.dds" should then load "AwesomeGuildStore/images/weapon/twohand_up.dds" regardless of the folder it is nested in.

ArtOfShred 06/01/18 01:40 PM

I get a lot of bug reports from users with this issue from LUIE (seems like Minion sometimes fails to update all the files properly and I'm not sure why) on top of the standard nested folder issue. This would definitely be really nice - to be able to intercept the addon load if the directory structure isn't correct and display a message like: "The file structure of the addon is compromised, please manually reinstall the addon" or something.

Sorondor 06/01/18 05:14 PM

Quote:

Originally Posted by ArtOfShred (Post 34892)
I get a lot of bug reports from users with this issue from LUIE (seems like Minion sometimes fails to update all the files properly and I'm not sure why) on top of the standard nested folder issue. This would definitely be really nice - to be able to intercept the addon load if the directory structure isn't correct and display a message like: "The file structure of the addon is compromised, please manually reinstall the addon" or something.

I don't use Minion, but does Minion check file date/time stamps and therefore skips "new" files if they are seen as older than files already installed? I've noticed that updated add-ons sometimes contain files with older date/time stamps than the previous version I have installed.


All times are GMT -6. The time now is 05:20 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI