Quantcast Addon Libraries Question - ESOUI
Thread Tools Display Modes
09/05/19, 05:35 PM   #1
amber1019
Addon Addict
 
amber1019's Avatar
Premium Member
Join Date: May 2019
Posts: 83
Question Addon Libraries Question

Hey, I hope you're all doing great today!!!!
I have a question about libraries.

Some addons, especially ones that haven't been updated recently, still contain libraries like "LibAddonMenu-2.0" and "LibStub", etc.

Is it okay to manually delete these bundled libraries if I've installed them separately already?

Or could deleting the bundled libraries cause an addon not to work correctly or at all?
  Reply With Quote
09/05/19, 06:13 PM   #2
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 561
Some of the very oldest might have it bundled without a .txt file for the lib and will be referencing it directly without a dependson. In those cases, I think it might break. In general, yes, it's safe to delete. If an addon stops working, then you just know you need to revert that one.
  Reply With Quote
09/05/19, 07:13 PM   #3
amber1019
Addon Addict
 
amber1019's Avatar
Premium Member
Join Date: May 2019
Posts: 83
Question Any Reason To Delete Them?

Ahh. Okay. So I should check txt files first?

Are there any pros/benefits/good reasons to delete libraries that are bundled with addons?
Or is it 100% okay to leave them alone?

What would be a good reason to delete a library that's been bundled with an addon?
Could an out-dated bundled library cause problems, even if I had the fully (most recent) updated library installed independently?

(Just to reiterate: I would have the libraries installed separately before removing the ones that were included/bundled in addons.)
  Reply With Quote
09/05/19, 07:17 PM   #4
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 561
It is possible for bundled versions to interfere if they are modified or improperly setup and somehow load along with the current version. The game does have to waste X amount of time looking at and comparing each duplicate every time it loads addons. I'd go with "delete first, revert if need be"
  Reply With Quote
09/06/19, 06:19 AM   #5
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 2,530
MAybe this helps as a technial information for "bundled libraries without their own txt file":
https://wiki.esoui.com/Libraries#Shi...ng_problems.29

If you delete them from the subfolders of an addon make sure you check the addon's txt file.
e.g. if the Addon's folder is "MyAddon" there is a "MyAddon.txt" (it's called "manifest").
In there you'll most likely find something like
/libs/Library1/file1.lua
/libs/Library1/file2.lua
/libs/Library1/folder1/file1.lua

/libs/Library2/file1.lua

Remove all of these which you have deleted in the subfolders and got installed as standalone libraries, which got their own txt manifest file and will load properly ingame as "own addon/library" then.

And then check in the manifest txt "MyAddon.txt" if there is a tag like:
## OptionalDependsOn: Library1 Library2
Or
## DependsOn: Library1 Library2

Remove the entry "LibStub" from both first.
-> LibStub will be in the txt file of the library where it is needed so addons should not use LibStub (or at least I can't think of any reason or have it seen yet).

Add the library names like LibAddonMenu-2.0 or LibDialog behind the ## DependsOn: if the addon uses them to work.
-> Here you need to add the libraries which you have deleted from the subfolders.
If the addon CAN use the library but does not need it under all circumstances you can also add it after the ## OptionalDependsOn: tag.
Multiple addons/Libraries can be seperated in the same line with a single space, like:
Code:
## DependsOn: LibAddonMenu-2.0 LibDialog
## OptionalDependsOn: TheOtherAddonName
DependsOn means this addon NEEDS this library to run so it won't be enabled ingame if the libraries are missing. Missing means the game will check ingame if the library got loaded/is enabled in the addon manager. Therefor the library needs it's own txt manifest, or needs to be loaded via the /libs/LibAddonMenu-2.0/LibAddonMenu-2.0.lua file directly -> Which you are removing in your example for good reasons.

You can remove the whole lines for ## DependsOn: or ## OptionalDependsOn: if there are finally not any addon or library name after the : left.


The only reason I could think of why deleting a bundled library could destroy the addon is, that it relies on this library and you haven't installed it as standalone version, or you have removed the /libs/ThisNeededLibrary /ThisNeededLibrary .lua and forgot the ## DependsOn: ThisNeededLibrary in the addon's manifest txt, where you have deleted the library from the subfolder.
And of course: If the library you have downloaded and installed does NOT have it's own txt manifest where it get's loaded, then it is not known ingame in the addon manager and addons cannot load or find it, except via using their own AddonMnifest.txt and load it from there. But one should then contact the librray author and ask for an updated standalone version with own txt imo (if the lib is not ONLY designed to work in his 1 addon :-) and was just released for whatever reason then).

Last edited by Baertram : 09/06/19 at 06:27 AM.
  Reply With Quote
09/16/19, 11:05 AM   #6
Micke2nd
AddOn Author - Click to view addons
Join Date: Mar 2017
Posts: 6
Thumbs up

Hi,
good question, answer - yes you can delete the libraries.
and no, you dont need to update the *.txt files, cause the calls then just call nothing.

Last edited by Micke2nd : 09/22/19 at 03:39 AM.
  Reply With Quote
09/17/19, 12:26 PM   #7
btrudel
Join Date: Dec 2018
Posts: 1
cookerywiz

hi, I just added cookerywiz and it say it needs Easyframe. cant find that
  Reply With Quote
09/17/19, 12:49 PM   #8
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 561
It's bundled as a second addon in the zip, which is generally frowned upon.
  Reply With Quote
09/18/19, 09:04 AM   #9
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 2,530
Libraries which are only used for some addons and are not officially released with their own txt file here at esoui are mostly included in the zip files of these addons and should
-either be created as standalone lib here on esoui, with the ## IsLibrary: true tag and their own txt file
-or be still included in the addons where they are needed, loaded from the addon's txt file then
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » Addon Libraries Question

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