ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Help/Support (https://www.esoui.com/forums/forumdisplay.php?f=164)
-   -   Addon Libraries Question (https://www.esoui.com/forums/showthread.php?t=8749)

amber1019 09/05/19 05:35 PM

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?

Rhyono 09/05/19 06:13 PM

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.

amber1019 09/05/19 07:13 PM

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.)

Rhyono 09/05/19 07:17 PM

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"

Baertram 09/06/19 06:19 AM

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).

Micke2nd 09/16/19 11:05 AM

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.

btrudel 09/17/19 12:26 PM

cookerywiz
 
hi, I just added cookerywiz and it say it needs Easyframe. cant find that

Rhyono 09/17/19 12:49 PM

It's bundled as a second addon in the zip, which is generally frowned upon.

Baertram 09/18/19 09:04 AM

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


All times are GMT -6. The time now is 02:58 AM.

vBulletin © 2019, Jelsoft Enterprises Ltd
© 2014 - 2019 MMOUI