Quantcast [open] api to get addon file status - ESOUI
Thread Tools Display Modes
05/31/18, 07:40 AM   #1
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,064
[open] 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.
__________________
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
  Reply With Quote
05/31/18, 08:47 AM   #2
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 114
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)
  Reply With Quote
05/31/18, 02:23 PM   #3
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,064
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.

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.
__________________
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
  Reply With Quote
06/01/18, 01:40 PM   #4
ArtOfShred
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 62
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.
  Reply With Quote
06/01/18, 05:14 PM   #5
Sorondor
AddOn Author - Click to view addons
Join Date: Sep 2015
Posts: 7
Originally Posted by ArtOfShred View Post
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.
  Reply With Quote

ESOUI » Developer Discussions » Wish List » [open] api to get addon file status

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off