View Single Post
09/06/19, 06:19 AM   #5
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,962
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