Thread Tools Display Modes
03/30/19, 09:46 PM   #1
Pinion
Join Date: Apr 2016
Posts: 28
Updating Independent Libs (Libraries)

When libraries are updated should I also update those same libraries if they are included (embedded) with other addons?

For clarification, if a lib addon is installed as a directory at \Elder Scrolls Online\live\Addons should I also be updating the same lib addon if it exists elsewhere, e.g. in \Elder Scrolls Online\live\Addons\example_addon\libs\? Does it matter or is there a best practice with regard to this? I prefer to update addons myself and would rather not require Minion.

Thank you, I'm just looking to understand a bit more about this area where libraries are included in some addons but required as separate addons in others. Any time in explaining this, I appreciate!
  Reply With Quote
03/30/19, 10:03 PM   #2
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 408
Nope! You just need to update the standalone version.
  Reply With Quote
03/31/19, 02:40 AM   #3
Pinion
Join Date: Apr 2016
Posts: 28
OK. Thank you for the quick reply!
  Reply With Quote
03/31/19, 08:10 AM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
To clear things a bit more or at least I'm trying to

Independent libs, also called standalone, got an own .txt file which the game loads. Like an addon.
Where libs shipped embedded/in subfolders of other addons will just be loaded by help of the addon's .txt file itsself. They got no own .txt which the game recognizes.

The loading will be handled by the game. LiBStub is a library which tries to assure that always the newest library version gets loaded. And the game got also a routine inside the .txt files called ##AddOnVersion which does the same. Loading the newest/highest number ONLY.

So even if you got libs inside subfolders the game or LibStub will always load the newest version only. Placing and updating the standalone lib in the AddOns directory will help to always be updated. There might be constellations where older versions of the libs in subfolders of addons might break this, but I hope this will only happen if someone decides to strip LibStub from an existing library and switching to Zos routine of using ##AddOnVersion:
  Reply With Quote
04/01/19, 05:55 AM   #5
Pinion
Join Date: Apr 2016
Posts: 28
Originally Posted by Baertram View Post
To clear things a bit more or at least I'm trying to

Independent libs, also called standalone, got an own .txt file which the game loads. Like an addon.
Where libs shipped embedded/in subfolders of other addons will just be loaded by help of the addon's .txt file itsself. They got no own .txt which the game recognizes.

The loading will be handled by the game. LiBStub is a library which tries to assure that always the newest library version gets loaded. And the game got also a routine inside the .txt files called ##AddOnVersion which does the same. Loading the newest/highest number ONLY.

So even if you got libs inside subfolders the game or LibStub will always load the newest version only. Placing and updating the standalone lib in the AddOns directory will help to always be updated. There might be constellations where older versions of the libs in subfolders of addons might break this, but I hope this will only happen if someone decides to strip LibStub from an existing library and switching to Zos routine of using ##AddOnVersion:
Thank you Baertram, I believe I understand you. I guess ideally (hopefully?), one day all addons that require lib(s) will be independent of the need to self-contain them? So, was this done to reduce the system impact of addons? Am I right in understanding that this reduces the number of identical libs that get loaded? If not then why did addons/authors start using this different method?

Thanks again to both of you for filling in the blanks for me. Pretty interesting stuff since I'm curious (but clueless)
  Reply With Quote
04/01/19, 08:50 AM   #6
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
ZOS natively set it up to only load one instance (was not always the case). Let's say an addon uses 5 libs: before, this meant every time one of them was updated, the whole addon needed updated. Now, you just download the updated lib and all X addons you have that use it don't need to be updated.
  Reply With Quote
04/01/19, 09:27 AM   #7
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Originally Posted by Rhyono View Post
ZOS natively set it up to only load one instance (was not always the case). Let's say an addon uses 5 libs: before, this meant every time one of them was updated, the whole addon needed updated. Now, you just download the updated lib and all X addons you have that use it don't need to be updated.
What normally is the idea of libraries. Windows dll files e.g. are located in the system32 folder so every other programm can use them as well.
There are some circumstances where locally added dll files in the programs folder, or even included into the exe file, make sense as well.

But I can't think of any ESO addon where this might be needed.
They were "bundled" with the addon (as subfolders) in order to make it easy for the user to update the whole addon (including needed files like libraries). But as described on several threads this will lead to outdated subfolder files, total size of folders unneccessarily big and on top too much time to for the author to update ALL addons depending on a library, if a library changes.
The updates for authors contain version increasing in txt and lua files, download the library, out it in the subfolders, check that files are correct, rebundle it as zip file, upload at esoui etc.
One addon takes about 3-5minutes. Now think of having 10 addons using this lib.

A good example is libAddonMenu-2.0 or LibStub. It is used by about 90% of the addons. A simple update for the standalone lib: 1 Minion click for the user. Nothing to do for the authors (except the ones updating the library).
An update for all addons where it is bundled: 1 Minion click for the user. But some hours work for the authors who have the lib included in their addons's subfolders...

We could easily use this time to play the game we like or really improve the addons, instead of doing this non-sense (imo).
  Reply With Quote
04/01/19, 02:44 PM   #8
Greevir
 
Greevir's Avatar
Join Date: Mar 2014
Posts: 27
Originally Posted by Baertram View Post
What normally is the idea of libraries. Windows dll files e.g. are located in the system32 folder so every other programm can use them as well.
There are some circumstances where locally added dll files in the programs folder, or even included into the exe file, make sense as well.

But I can't think of any ESO addon where this might be needed.
They were "bundled" with the addon (as subfolders) in order to make it easy for the user to update the whole addon (including needed files like libraries). But as described on several threads this will lead to outdated subfolder files, total size of folders unneccessarily big and on top too much time to for the author to update ALL addons depending on a library, if a library changes.
The updates for authors contain version increasing in txt and lua files, download the library, out it in the subfolders, check that files are correct, rebundle it as zip file, upload at esoui etc.
One addon takes about 3-5minutes. Now think of having 10 addons using this lib.

A good example is libAddonMenu-2.0 or LibStub. It is used by about 90% of the addons. A simple update for the standalone lib: 1 Minion click for the user. Nothing to do for the authors (except the ones updating the library).
An update for all addons where it is bundled: 1 Minion click for the user. But some hours work for the authors who have the lib included in their addons's subfolders...

We could easily use this time to play the game we like or really improve the addons, instead of doing this non-sense (imo).
I just wish that when I install an addon via Minion, it would also automatically install any mandatory libraries as well. Many times have I installed an addon, started the game, tried to use the addon, and get a "so and so library is missing" message.
  Reply With Quote
04/02/19, 04:52 AM   #9
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Yep, I know it is on the todo list. But Minion is a non-commercial software where ppl work on in their free times. Just like addons are created.
So it will need some time as RL and other factors come first.

AND the devs need to write the addons using the ZOs intended way of "detecting dependencies" then!
Like using ##DependsOn: and ##OptionalDependsOn: in the correct way + using ##AddOnVersion in the libraries (at least in there, using it in the AddOns themselves would be fair too).
  Reply With Quote
04/02/19, 12:28 PM   #10
Pinion
Join Date: Apr 2016
Posts: 28
Originally Posted by Rhyono View Post
ZOS natively set it up to only load one instance (was not always the case). Let's say an addon uses 5 libs: before, this meant every time one of them was updated, the whole addon needed updated. Now, you just download the updated lib and all X addons you have that use it don't need to be updated.
Originally Posted by Baertram View Post
What normally is the idea of libraries. Windows dll files e.g. are located in the system32 folder so every other programm can use them as well. A good example is libAddonMenu-2.0 or LibStub. It is used by about 90% of the addons. We could easily use this time to play the game we like or really improve the addons, instead of doing this non-sense (imo).
Ah, I got it now! And a good comparison with the system32 folder also. The way it is now makes much more sense so silly question, why didn't they make it this way from the start?! And did you all (authors) have to apply a lot of pressure (nagging) to get them to implement this change? Maybe it was just a minor oversight on their part?

Originally Posted by Greevir View Post
I just wish that when I install an addon via Minion, it would also automatically install any mandatory libraries as well. Many times have I installed an addon, started the game, tried to use the addon, and get a "so and so library is missing" message.
Yes, this and the occasional RU version update getting auto-installed accidentally was why I started updating them myself. Don't get me wrong, Minion was great when I was a newer player, and still a good place for new players now. I just wanted more control over the whole process. What's perfect for me now is adding an addon to my favorites here on the site, then when they get updated I get an email. I also do this for a couple addons that are outdated *and* unusuable so in case they ever get new life to them I will know to re-install them!
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » Updating Independent Libs (Libraries)

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