Thread Tools Display Modes
07/03/23, 10:03 AM   #1
NeuroticPixels
Addon Addict
 
NeuroticPixels's Avatar
Premium Member
Join Date: May 2019
Posts: 211
Question Are embedded libs made priority even when disabled?

See here:

https://www.esoui.com/downloads/file...=3665#comments

Even if I disable addons with embedded libraries, does ESO still use embedded libraries before loose libraries?

For example:
Does ESO prioritize the file for LibAddonMenu-2.0 in location
C:\Users\LoneS\Documents\Elder Scrolls Online\live\AddOns\DolgubonsLazySetCrafter\Libs\LibAddonMenu-2.0
before it uses the file for LibAddonMenu-2.0 in location
C:\Users\LoneS\Documents\Elder Scrolls Online\live\AddOns\LibAddonMenu-2.0
???
Even when addon with included library is disabled?
  Reply With Quote
07/03/23, 11:18 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
Hi,

disabled libraries ingame will not load anymore, but these are ONLY the ones having their own txt file so you can see them in the addon manager!
If libs are included in subfolders without any txt and are hardcoded called from the addon's txt file you cannot disable them unless you disable the whole addon!
So if the addon is disabled the library included won't load anymore as the library was loaded from the txt file of the disabled addon.



Here with more detail:


https://www.esoui.com/forums/showthread.php?t=9149
"If you see dependencies in subfolders (e.g. "libs") of addons"

The graphic there shows you what to do in case of embedded libaries.


Basically the game is doing this:
1. Load and check all txt files of addons and libraries. No txt? Not found by addon manager!
Addons/Libraries txt and folder name on 1st level (live/AddOns) must match (case sensitive!) to get recognized!
2. Check ## DependsOn or OptionalDependsOn in the txt files and build a list of "load order"
3. If many same txt files, e.g. 3 LibAddonMenu-2.0.txt are found in live/AddOns (and up to 3 folder depth below in subfolders like AddonName/libs): ONLY the newest version, comparing AddOnVersion, will be loaded!
That's why libraries and other dependencies MUST use ## AddOnVersion at best to make the game handle the versioning and not even think to load any older version if a newer is found
4. If a DependsOn is missing: Addon/lib won't be loaded as dependency is missing. Attention: ONLY if DependsOn, not if OptionalDependsOn as these are optional and can be missing
5. If the DependsOn / OptionalDependsOn is adding >= after the library/Addon name, e.g. LibAddonMenu-2.0>=28, that number there is checked against that other addons/libraries txt file's tag ## AddOnVersion. In the example it would look in the LibAddonMenu-2.0.txt file and check the ## AddOnVersion to be equal or higher integer 28.
If a version only < is found: Addon/lib won't be loaded as the DependsOn is not fullfilled! Version too old.
This version check is used by the game's c code even before lua is in place! So no LibStub versioning checks any longer in lua code, but 1 addon manager thing of vanilla game.


Only bad thing that still is in older addons, and which might make the libraries still load a very old version is:
Including a library in /libs/ subfolder BT do NOT include an ytxt file! Just using the addon's txt file to "hardcode load" these embedded librariies e.g.
in live/AddOns/MyAddon/MyAddon.txt there is:
/libs/LibAddonMenu-2.0/LibAddonMenu-2.0.lua
/libs/LibAddonMenu-2.0/controls/checkbox/checkbox.lua
and so on
This will make the main library file ALWAYS be loaded and if this is version 24 and was never updated, there also exists a version 34 (newest) in live/AddOns/LibAddonMenu-2.0/LibAddonMenu-2.0.txt, it might still make the whole library break and thus all dependend adodns break

So to fix this:
Remove ANY library in subfolders like /libs/ IF they are not included with their txt file properly!
If those libraies are never released on esoui here, then it might be okay to leave them inside IF they do work.
If they were released on esoui: Strip those libsin subfolders, install once the newest version to live/AddOns WITH their proper tyt file, and let it be loaded by the addon manager by enabling it there then.


Hint:
Hardcoded lines in txt files will not work anymore if the files in the subfolders are missing so thiswill silently fail then. No need to remove those lines in the addons txt file.
BUT you should add the proper ## DependsOn: LibAddonMenu-2.0>>=34 to th txt file of those addons then so it will make sure the library is loaded properly BEFORE the addon loads.



And if you still got any LibStub calls in addons here is described how to remove it and replace with the libraries global variable, which msot libs got added with Summerset or later then:
https://www.esoui.com/forums/showthread.php?t=9149
-> "If the addon is old and still uses "LibStub" (an obsolete library for versioning)"

Last edited by Baertram : 07/03/23 at 11:20 AM.
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » Are embedded libs made priority even when disabled?


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