Thread Tools Display Modes
12-12-06, 05:28 PM   #1
Maelos
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 9
Embedded vs shared libraries

What is the optimal way to package a compilation of Ace2-based mods: using embedded libraries included with the addons that provide them, or remove the lib directories from everything and use globally installed/shared libraries? Part of the reason for this question is that I am unfamiliar with how Lua treats libraries. If it is anything like a *nix dynamic linker, none of this would matter because only one instance of a particular method would be loaded and used by everything

There are obvious pros and cons for each method. Prod of embedded being that authors can control and test against particular versions of libraries. They do not have to worry about a library upgrade breaking their mod. The downside is that if any bugs are discovered in a given library, each mod has to be patched separately. Where, with shared libraries, you reduce the code duplication and allow every mod leveraging a library to receive the benefits/bugfixes of a new version.

I recently began maintaining a compilation and my latest release shares all the Ace2 libraries across Ace2-based mods. Basically, I removed the lib directories under each addon and installed everything globally. Everything works just fine, but I ask the question because I want to know what the preferred/recommend method actually is.

Developer input on this would be greatly appreciated
__________________
Maelos / Garona
http://www.maelos.com
  Reply With Quote
12-12-06, 07:30 PM   #2
Purity
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 16
me, too.

I have same worries. I have addons and duplicate libraries embedded and some not in my addon folder. Can I delete the embedded ones in each folder and rely on the !!!Libs folder? Or is it a cut paste each time I update an addon? Or should I only worry about an update to Ace2 being posted ?

Confused Ace-brarian
  Reply With Quote
12-12-06, 07:42 PM   #3
tardmrr
Lua Ninja
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 133
Purity:
You should not use !!!Libs at all. It was removed from the svn for a reason. If you want to run standalones, do it properly.

ddensity:
No more than one instance of a library will ever be loaded into memory. However, loading the embeds in each addon if you have enough of them starts to show in increased load time. If you're sending out the addons as a comilation, I suggest you run the libraries as standalones. They should all be LoD so they won't be loaded unless an addon requests it. You can use the WoWAceUpdater to aid in installing standalone version of libraries by grabbing the !!!Standalonelibraries folder from /files, reading the READMEDAMNIT file and following the instructions there.
  Reply With Quote
12-12-06, 10:37 PM   #4
Maelos
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 9
Originally Posted by tardmrr
Purity:
ddensity:
No more than one instance of a library will ever be loaded into memory. However, loading the embeds in each addon if you have enough of them starts to show in increased load time. If you're sending out the addons as a comilation, I suggest you run the libraries as standalones. They should all be LoD so they won't be loaded unless an addon requests it. You can use the WoWAceUpdater to aid in installing standalone version of libraries by grabbing the !!!Standalonelibraries folder from /files, reading the READMEDAMNIT file and following the instructions there.
Great, that confirms what I thought and have been applying as the best practice. I suspect loading relying on libs/ directories produces even more unpredictable results, as I would expect that the first instance of the library to be loaded is the one that wins, yuck.

Thanks for the answer.
__________________
Maelos / Garona
http://www.maelos.com
  Reply With Quote
12-12-06, 10:55 PM   #5
Trimble Epic
An Aku'mai Servant
 
Trimble Epic's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 31
Originally Posted by tardmrr
No more than one instance of a library will ever be loaded into memory.
It should be noted that clean loading of libaries is NOT a feature of Lua, but rather a clever feature put in by the brilliant creators of Ace2 and others (Thx Iriel).

It's quite easy to create poorly designed libraries that load redundant copies. Luckily, Ace2 isn't a poorly designed library.
  Reply With Quote
12-12-06, 11:06 PM   #6
Maelos
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 9
!!!StandaloneLibraries doesn't seem to be available.
http://wowace.com/files/!!!Standalon...eLibraries.zip

It's not listed in the index at all, I found a link to it from:
http://www.wowace.com/wiki/How_To_Update_Beta_Addons

Has it been deprecated? It's definitely an easier way to maintain a copy of all the latest libraries than what I've been doing thus far.
__________________
Maelos / Garona
http://www.maelos.com
  Reply With Quote
12-13-06, 12:39 AM   #7
tardmrr
Lua Ninja
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 133
Originally Posted by ddensity
Great, that confirms what I thought and have been applying as the best practice. I suspect loading relying on libs/ directories produces even more unpredictable results, as I would expect that the first instance of the library to be loaded is the one that wins, yuck.

Thanks for the answer.
Actually, no. The version with the highest minor revision (read: newest) is the one kept.
  Reply With Quote
12-13-06, 02:44 AM   #8
Purity
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 16
TY for the reply. I deleted !!!libs. Bug sack is still collecting a bag full, but no errors that required !!!Libs/other addons to be disabled this time.
  Reply With Quote
12-16-06, 06:39 AM   #9
Mizpah
A Murloc Raider
Join Date: Dec 2006
Posts: 8
Can I seek some clarity here !?

I was attempting to use one set of libaries, as I run many many ace2 mods.

My first step was to use wowaceupdater, and I selected !!!StandAloneLibraries

The readme describes it as a collection of folders, yet there were no folders in there ? Running an update against it did not do anything ;-(

I then thought that perhaps I need to populate the folder structure myself, so I cut the contents of my libs folders (leaving the empty libs folder behind) to that directory, assuming on update, the latest of each would be dropped in.

However nothing, wowaceupdater simple reports that the toc for !!!STandaloneLibries is up to date.

I then notice that wowaceupdater is not even listing my libaries as beiung installed, so I wonder if perhaps they need to be in the root ? So I copy every folder from !!!StandAloneLibaries to the root of my addons, some of them now show in the wowaceupdater list, and I run an update (all of my updates have been without externals btw).

Yet all is not well, many of my mods refuse to recongnice these 'shared libary' files, and thus my UI is offically banjaxed.

Sorry for the long explanation, but could someone please explainwhat I have done wrong, and how the folder structure should be set up please ??!

Many Thanks in advance,

Mizpah

PS: Searching on wowace and here seemed to indicate the all I needed to do was download !!!Libraries and run an update without externals, however this did not do anything at all!
  Reply With Quote
12-16-06, 07:10 AM   #10
limdul
A Murloc Raider
Join Date: Jan 2006
Posts: 6
Originally Posted by Mizpah
Can I seek some clarity here !?

I was attempting to use one set of libaries, as I run many many ace2 mods.

My first step was to use wowaceupdater, and I selected !!!StandAloneLibraries

The readme describes it as a collection of folders, yet there were no folders in there ? Running an update against it did not do anything ;-(

I then thought that perhaps I need to populate the folder structure myself, so I cut the contents of my libs folders (leaving the empty libs folder behind) to that directory, assuming on update, the latest of each would be dropped in.

However nothing, wowaceupdater simple reports that the toc for !!!STandaloneLibries is up to date.

I then notice that wowaceupdater is not even listing my libaries as beiung installed, so I wonder if perhaps they need to be in the root ? So I copy every folder from !!!StandAloneLibaries to the root of my addons, some of them now show in the wowaceupdater list, and I run an update (all of my updates have been without externals btw).

Yet all is not well, many of my mods refuse to recongnice these 'shared libary' files, and thus my UI is offically banjaxed.

Sorry for the long explanation, but could someone please explainwhat I have done wrong, and how the folder structure should be set up please ??!
!!!StandaloneLibraries are to be used with Ace Updater, but not updatede with it, first you download it form the file section:

http://www.wowace.com/files/!!!StandaloneLibraries/!!!StandaloneLibraries-r20411.zip

this zip will contain a lot of empty folders, place these in you addon folder, now run ace updater, it will now find all of these extra libraries, set ace updater to delete old files and skip version check and mark all your addons (F4) then select to update WITHOUT embedded libraries. This should now update all of your addons including the ace2 libraries. Next time you run Ace Updater you can turn version check back on.
  Reply With Quote
12-16-06, 11:02 AM   #11
Mizpah
A Murloc Raider
Join Date: Dec 2006
Posts: 8
Many thanks Limdal!

The information above resolved my issues, the error stemmed from having a version of !!!Standalonelibaries from the updater with no folders in.
  Reply With Quote
12-17-06, 02:39 PM   #12
Naimen
A Kobold Labourer
Join Date: Jun 2006
Posts: 1
Question wowaceupdater?

quick question here. Where do I find wowaceupdater? I looked and apparently it is something that is too high level for my skill to detect
  Reply With Quote
12-19-06, 11:22 AM   #13
Maegrette
A Murloc Raider
Join Date: Dec 2006
Posts: 9
here ya go...

http://www.wowace.com/wiki/WinAceUpdater
  Reply With Quote
02-24-07, 12:11 AM   #14
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
I know this is like 2 months later (I found this thread on the forum search- knowing I had seen an explanation before), but HOLY WOW! My addon folder went from 113MB down to 41.7MB!!

Thank you for your explanation on how to do it with WAU. I had already read on WoWAce to download StandaloneLibraries with WAU so that it unpacks the empty folders automatically. But your explanation helped me with the question of "what do I do now?"
  Reply With Quote
02-24-07, 08:17 PM   #15
blay
An Aku'mai Servant
Join Date: Dec 2006
Posts: 36
Not to beat a dead horse, but I have switched to using many Ace addons, came across this thread, and am now curious. Should I just keep running things as I have been, with libs in each individual ace addon folder, or try this method? I admit I don't have the clearest understanding of how the "inner-workings" work, but am trying my best to learn. At this point I just have each addon folder containing it's own libs, and update them via WAU w/ externals. Any advice or input? Thanks in advance.
  Reply With Quote
02-24-07, 09:05 PM   #16
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
What this does is give you one copy of each library in your AddOns folder instead of 20 copies, one for each addon that used them. Then they all reference the libraries in your AddOns directory.

(NOTE: DeuceCommander broke when its libraries got pulled out. Its menu in FuBar was behaving erratically and was empty, so I had to put its embeds back in.)

I believe that WoW only loads one copy of each library anyhow, but this might decrease loading times (if there was a difference in mine, it wasn't much). What it definitely does is make your folder smaller and make sure that all of your libraries are kept up to date (when using WAU). The smaller file size is what I was aiming for, since I'm planning on releasing my UI here shortly. If you don't feel comfortable with using standalone libraries and don't have a need for it, then just stick with what's working for you.

Last edited by Seerah : 02-24-07 at 09:06 PM. Reason: DECREASE loading times..... not increase... /sigh :)
  Reply With Quote
02-24-07, 09:35 PM   #17
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Scratch that last part about DeuceCommander. I think I messed up pulling out some of the embeds from Ace2 addons that aren't on SVN. I overwrote some of the libraries with older versions. All fixed now!
  Reply With Quote
02-24-07, 11:07 PM   #18
blay
An Aku'mai Servant
Join Date: Dec 2006
Posts: 36
I don't use too many addons, so I guess I'll just stick w/ what I know, as it's worked so far. Thanks for the prompt reply tho.
  Reply With Quote
02-28-07, 11:58 PM   #19
Garland
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jan 2007
Posts: 5
Personally, I unpack each library myself from files.wowace.com but that's because I like having a very carefully managed and sanitised environment, being a scatterminded developer. I did take a look at WoWAceUpdater though and I heartily recommend that to just about anyone, I love the ways in which it can be customised and if ever I were to create a compilation, I'd toss that in with it.

As for libraries versus embeds, what I've heard and learned is that there are only two real downsides of embeds, disk space and loading times, both of which were covered earlier. If you feel you're getting into game fast enough and you don't feel you're lacking a few megabytes here and there that you could put to better use elsewhere, then you're probably best off running with embeds. It's less to worry about and more time to play, since Ace2 manages them gloriously. If you find that your loading times are getting a bit out of hand, especially if you run a lot of Ace2 stuff then it might be time to clean out the embeds and use standalones.

The best way to do this in my opinion is to write down the Ace2 mods you use and then delete them (thus clearing out all embedded files), after that grab the WoWAceUpdater program and run through it, first of all tick all the Addons you used to have and download those, tell the updater to not download the embeds (it's an option from the File menu) and away you go. After that you'll need the libraries and here's where another option comes into play.

If you're not feeling adventurous, simply check anything that says its a library in the updater and download as before. If you are then go into the toc files of each of your Addons and note down anything following the RequiredDeps, Dependencies or OptionalDeps lines. With that info at hand, return to the updater and tick only the names of the items you found.

To make this process easier, you could use a batch file to scan the tocs for you and present the information on the libs you need, it wouldn't be perfect but it would save having to open up lots of toc files. I've actually got such a file and I've uploaded the toc at pastebin.co.uk. Download the file to your Addons folder then rename it to peektoc.cmd or similar, you can open it in notepad first if you like to make sure it does nothing bad. All it does is uses findstr to collect the OptionalDeps, RequiredDeps and Dependencies lines from each of the tocs.

Anyway, I hope that was helpful. If anyone has any other questions, I'll do my best to answer... though I'm no authority I have to warn, so there's a lot I don't know either.

(Edit)

Oops, forgot to mention, the batch creates Libs.txt which contains the toc info.

Last edited by Garland : 03-01-07 at 12:03 AM.
  Reply With Quote
03-01-07, 12:07 AM   #20
Tekkub
A Molten Giant
 
Tekkub's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 960
Figuring out and installing only the libs you need is a bit excessive. They are all LoD, so only ones you need will be loaded when you log into the game.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Embedded vs shared libraries


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