Thread Tools Display Modes
08/07/17, 08:17 AM   #1
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
AddOn Manifest File Changes

With API version 100021 we are considering a couple changes to the manifest file processing:

1) File paths in the manifest file extend from the directory that the manifest file is in. Currently these file paths extend from "EsoUI/AddOns/<Manifest File Name>/" which is unintuitive and doesn't allow putting addons into a deeper file structure.
2) We will scan all sub-directories in the AddOns folder for manifest files. Currently we only scan the top level directories which also prevents putting addons into a deeper file structure.
3) Manifest files must have the same name as the directory they are in to be processed. This prevents ReadMe.txt files from being picked up as addons (along with other stray .txts), which becomes more important as the scan goes deeper. This seems to be the standard based on a subset of addons that I looked at, so hopefully most addons will already comply with this.

The main benefit of these changes is that it allows an addon to embed its libraries as addons instead of loading the files as part of the main addon manifest. Combined with the "# AddOnVersion:" directive, only the highest version of each library will be loaded which saves time that would be spent on loading the same library lua files many times and throwing out most of the results.

Let me know if you have any feedback on these changes.
  Reply With Quote
08/07/17, 09:21 AM   #2
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
So if you include 3 libs, will they then show up in someone's addon list for them to individually enable/disable? Inb4 commoners riot that we're installing bloatware!
  Reply With Quote
08/07/17, 09:21 AM   #3
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 167
Just to be sure:
The OnAddonLoaded event will still use <Manifest File Name> as addon name argument and SavedVariables files will still be called <Manifest File Name>.lua?

General feedback:
I think this is great, because it will automatically load newer libraries.
Currently an addon can load a bundled outdated library, if no newer version of the library was loaded via LibStub yet. This can cause errors if the outdated library isn't able to properly "unload", i.e. restore hooked API functions, when the newer addon version is loaded.
With the new changes the load order of the addons bundling the libraries doesn't matter anymore.
  Reply With Quote
08/07/17, 09:34 AM   #4
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 167
So if you include 3 libs, will they then show up in someone's addon list for them to individually enable/disable? Inb4 commoners riot that we're installing bloatware!
If I recall correctly, in the WOW addon community libs aren't bundled but have to be installed on their own. So users have all the libs in their addon list as well. However, I think you are totally right that there will be lots of question why the addon list suddenly increased by so many libX entries.

Even more fun will be the no longer maintained addons where the dev copied the txt of the libraries into the lib folder as well, but the lib's lua files are still loaded from the addon's txt. Then the checkbox in the addon list is totally useless because the lib will be loaded regardless.
  Reply With Quote
08/07/17, 09:52 AM   #5
silvereyes
 
silvereyes's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2015
Posts: 66
Originally Posted by ZOS_ChipHilseberg View Post
3) Manifest files must have the same name as the directory they are in to be processed. This prevents ReadMe.txt files from being picked up as addons (along with other stray .txts)....[snip]

The main benefit of these changes is that it allows an addon to embed its libraries as addons instead of loading the files as part of the main addon manifest.
I like the change to txt file processing, but I think there will only be a few libraries that want to go the full addon route. Users don't need to see "LibAsync", "LibTimeout", "LibLootSummary", "LibCustomMenu", etc. These are technical implementation libraries that will only serve to confuse users if they see them in their addons list. Perhaps if they were grouped together in a Libraries section of the addons list that is collapsed/hidden by default, it would reduce the confusion.
  Reply With Quote
08/07/17, 09:55 AM   #6
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
Originally Posted by silvereyes View Post
Perhaps if they were grouped together in a Libraries section of the addons list that is collapsed/hidden by default, it would reduce the confusion.
I'm in favor of that.
  Reply With Quote
08/07/17, 10:21 AM   #7
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
This change won't suddenly make libraries appear in the addon list out of nowhere. The author of the library will first have to update the lib so it properly works with this new feature. Existing libs will just continue to work like they have until now. I also suggest that old libraries don't just switch to the new way, and instead increase their "major" version so it won't affect existing addons.

LibAsync for example can stay how it is and doesn't have to be bundled as a standalone addon. That way it won't show up in the addon list. If an addon author doesn't read the description of a lib and includes it with a manifest file instead of how the lib author specified, it's something they should correct on their end. If it absolutely mustn't be included with a txt, then maybe do it like some other libs and just don't add one at all?

I would also wait and see if any user even notices this or is bothered at all. I don't believe it will be that much of a problem seeing as some addons already come with a lot of baggage anyways (e.g. Harvest Map, Master Merchant).

I do however agree that a library section and a way to see which path a library or addon was loaded from might be nice.

Last edited by sirinsidiator : 08/07/17 at 10:23 AM.
  Reply With Quote
08/07/17, 07:46 PM   #8
haggen
 
haggen's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2015
Posts: 137
Shinni and sirinsidiator make very good points. Now you mentioned AddOnVersion and I wonder, how is it parsed and compared? Is it just a string? Does the game understand major, minor and revision numbers?
  Reply With Quote
08/08/17, 01:48 AM   #9
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
Originally Posted by haggen View Post
Shinni and sirinsidiator make very good points. Now you mentioned AddOnVersion and I wonder, how is it parsed and compared? Is it just a string? Does the game understand major, minor and revision numbers?
It's an unsigned integer.
  Reply With Quote
08/08/17, 03:11 AM   #10
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
I don't know what to think about it, it's both very good but it will be confusing and hard to implement without some global update..

So basically, now I have my libs loaded throught libstub, they don't have access to xml and savedvars (but for saved vars, I can cheat with zo_ingame..) and with this, my libs will be able to be full addons with their metafile and so on..

so why still embedding libs ?.. why not pushing them as full addons ?.. we're only doing the half of the way even if there is all we need to do the full thing.. Well, I'll still have to rethink about consequence and migration.

One thing is sure, I would really like to see the requests about addonmanager being done at same time. (API flag & System explorer)
  Reply With Quote
08/09/17, 02:13 PM   #11
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
I talked to our UI designer about this and we came up with adding a new checkbox to the addon window that auto manages dependencies and a new directive to mark an addon as a library. When you enable an addon it enables all addons marked as libraries that it depends on. And when you disable an addon, if libraries it was using became unused they are disabled. The addons marked as libraries would not be shown in the list in this mode. You could toggle off this auto mode and the libraries will be shown in the window and can be managed directly. Would something like this work?
  Reply With Quote
08/09/17, 02:23 PM   #12
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
That sounds pretty good to me. Is the "auto mode" enabled by default?
  Reply With Quote
08/09/17, 03:51 PM   #13
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
For addons being marked as libraries: is that automatic for nested addons (likely libraries) or is it something only possible via authors specifying it as such?
  Reply With Quote
08/10/17, 08:21 AM   #14
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
Originally Posted by sirinsidiator View Post
That sounds pretty good to me. Is the "auto mode" enabled by default?
It would be default, yes.
  Reply With Quote
08/10/17, 08:22 AM   #15
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
Originally Posted by Rhyono View Post
For addons being marked as libraries: is that automatic for nested addons (likely libraries) or is it something only possible via authors specifying it as such?
I think it would be safer to do it manually since there aren't too many libraries and it prevents weird issues when people use non-standard organizations of their addons into folders.
  Reply With Quote
08/10/17, 08:35 AM   #16
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Something that came into my mind:
How should we "register" our libraries?

Should we continue to embed LibStub?
Or is it wise to make LibStub build-in???

LibStub has changed exactly once to support minor version numbers. Which will be obsolete again.
  Reply With Quote
08/10/17, 09:13 AM   #17
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
Originally Posted by ZOS_ChipHilseberg View Post
I think it would be safer to do it manually since there aren't too many libraries and it prevents weird issues when people use non-standard organizations of their addons into folders.
Probably. I was just thinking about the many outdated addons whose libraries will now appear in the list simply because they haven't been updated. So if an old addon with LAM loads, then a new addon with LAM loads (let's assume they are the same version), will LAM show up in the addon (not the library) list because of the older one that was not specified as a library?
  Reply With Quote
08/10/17, 09:21 AM   #18
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
Originally Posted by Rhyono View Post
Probably. I was just thinking about the many outdated addons whose libraries will now appear in the list simply because they haven't been updated. So if an old addon with LAM loads, then a new addon with LAM loads (let's assume they are the same version), will LAM show up in the addon (not the library) list because of the older one that was not specified as a library?
No. LAM has never been bundled with a txt until now. If I did change to the new system, it would be as LAM3.0
  Reply With Quote
08/10/17, 09:35 AM   #19
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
I didn't literally mean LAM, just any lib that a lot use. :P
  Reply With Quote
08/10/17, 09:46 AM   #20
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
Originally Posted by Rhyono View Post
I didn't literally mean LAM, just any lib that a lot use. :P
It's the same for any lib that exists right now. I don't know of any that is bundled with an txt file included.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » AddOn Manifest File Changes

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