Doable, but risky.
Doable, but risky.
AddOns with dependencies (libraries) almost never bundle them in or refer to them in their repository.
- You could symlink to the repository of that library, giving you the latest version of it. However, there is no guarantee that the latest version of an AddOn uses the latest versions of its libraries.
So you are usually stuck with manually downloading the complete bundled AddOn, extracting it and pulling out the libraries. That defeats the entire purpose of repository updating, leaving it solely as a change detection mechanism. Boo.
SVN/GIT updating ∞
Note that at the time I didn't know Mercurial, and I didn't want to spend the time to learn it after deciding that this entire affair wasn't working out.
Library Linker ∞
This script is run while in any arbitrary addon's 'libs' folder. It checks to see if you already have that library installed alongside your other addons, and it replaces the addon's embedded library with a symbolic link to the 'official' one (which is probably svn/git-updated).
It wouldn't be hard to expand this to have it walk through all
Interface/AddOns/* directories and search for 'libs', 'Libs' etc. I didn't do this because I wanted finer control.
The reason why this is a bad idea is that libraries don't have obvious minor version numbers. So any particular addon could bundle specific revisions of a library which are not compatible with the current svn/git edition you're linking-to.
That is, you're taking away the addon's specific reference to a specific major and minor revision of a library. You're replacing it with the latest and greatest. Things can break even with minor revisions, and I learned this the hard way.
Authors are retarded for:
- Not keeping their libraries absolutely up-to-date.
- Not having their svn repository reference the repository for each of their libraries.
Embedding modified versions of libraries which are not identified/named differently.
- I don't even know how conflicts like this are resolved, but I'd bet this causes issues.
.. this screws over my whole idea of updating addons via repositories.. at least for addons with libraries. I'm going to slowly remove reliance on addons which embed libraries (Hi, Tekkub!).
After going through all of this, it makes me really wonder how all the different embedded libraries are handled by wow. Do I seriously have that many editions of every single library all running concurrently? Shit.