Quantcast
Download
(6 Kb)
Download
Updated: 08-08-13 03:40 AM
Updated:08-08-13 03:40 AM
Created:06-15-13 05:03 AM
Downloads:77
Favorites:2
MD5:
LibVersionCheck
Version: 0.05
by: Wym [More]
Information for Players - i.e. Not Addon Developers

Dear player,

this Addon is NOT intended to be used by you directly. If you just download this addon and install it, nothing will happen at all. So just don't do that.

If you came to this site because you get errors in LibVersionCheck while playing, downloading the addon here and installing it will probably not fix your problem. LibVersionCheck is intended to be embedded in other Addons, and you have to download the newest version of that other addon that uses LibVersionCheck to fix your error.

If you really want to use LibVersionCheck standalone, make sure you don't mess with it when you unpack it. Especially, don't remove the Translations.lua file - you need it even if you use the english client to play.

Currently, the Addons that use LibVersionCheck (that i know of, there might be more) are:

BankIt, Docker, Equalizer, Heartometer, JaBoB, MoneyBags, PopupItems, RareDar, RareTracker, Rifter, SightSeer, TomTom, ToonInfo, WhereAmI

So if you use one of those addons, please upgrade them first. Remove your LibVersionCheck installation if you have installed it standalone.

Thank you!


Information for Developers

LibVersionCheck collects addon version information from other players, and tells you if your version numbers are smaller than the ones collected.

This is an Addon for Developers to embed into their own Addon, it's not usably in any way by normal players.

- Any Addon can embed LibVersionCheck, and register itself and its version number with the library. - Whenever the library "sees" another player (Event.Unit.Available.Full), it sends a query to that player. This is done only once per player name and session to conserve bandwith. - When the library gets a query from another player, it will start sending messages about the registered addons and version numbers to that player. These response messages are limited to one every 0.1 sec, again to conserve bandwith. - When a response message arrives, the library will save the version number in its own list, IF this version number is higher than the current maximum. No user interaction is done at this point, to prevent messages popping up in combat etc. - When a user logs in, the library compares the user's addon version to the maximum versions it has found elsewhere. If there are addons that are outdated, the user is given a message window that lists addon name, own version, and maximum detected version. Then, he can choose between buttons when to show the message again (5 choices between "next login" and "never").

From a user perspective, the library tries to be as non-invasive as possible - the worst thing that can happen to a user is he has to press "never" once after a login. But if a user is interested in getting update information at all, he will get it without having to know and issue any macros, press any buttons or anything.

From the server perspective, the addon tries to use as little bandwith as possible - it sends only one query to users who don't have any addons using the library installed, and it limits response data to about then 100 bytes per second.

For a developer, it's very easy to use the library. Everything you have to do is:

- embed the library folder in your addon folder - put the following into your RiftAddon.toc:

Embed = {
LibVersionCheck = true,
}
Dependencies = {
LibVersionCheck = {"required", "before"},
};


- at an appropriate location in your code, typically in an Event.Addon.Load.End handler, call something like

LibVersionCheck.register(AddonData.toc.Identifier, AddonData.toc.Version)

or

LibVersionCheck.register("MyAddon", "12.3r5alpha")

Everything else is handled by the Library. (Version numbers are strings, not numbers, so embedding something like alpha into the version should work fine).

If you're developing newer versions, and have already bumped the version number, you should use "/libversioncheck developer on" to prevent your libversioncheck from telling other people version numbers that don't exist yet.

You can use "/libversioncheck spy on" to generate an exhausive list of who answered to your queries, and which version numbers they sent, to get an idea of which other addons are used along with yours (that might cause problems when using the same global vars etc.).
V0.05:

* Added support for ApiBrowser. No functional differences though, so there's no need to upgrade unless you are a developer and want to see documentation in ApiBrowser.

V0.04:

* Register Event.Addon.Startup.End with a priority of -99 now - we want our handler to be called after every other addon had a chance to register itself.
* Addons that don't register themselves (which probably means the player removed them from their list) assume a version number of "0" now which means their version isn't checked.

V0.03:

* Implemented some suggestions by Mere to reduce CPU usage
* don't put addons with MyVersion="0" into the reply list anymore - these are addons that we don't use ourselves, but have heard about, no reason to tell anybody about them
* added a developer mode: "/libversioncheck developer on" sets a flag that prevents your LibVersionCheck from responding to queries, so you can try out newer versions of your addons without incorrectly telling people they should update
* added a mode to remember all replies: "/libversioncheck spy on" causes all replies by all other players to be remembered, and put into the global SavedVariables file. This is for devs who want to know which other addons people are using together with theirs, which might be the source of some problems. Don't use this lightly, the saved file gets large quickly.
Optional Files (0)


Archived Files (3)
File Name
Version
Size
Author
Date
0.04
5kB
Wym
07-29-13 07:32 AM
0.03
5kB
Wym
06-30-13 01:24 AM
0.02
5kB
Wym
06-15-13 05:03 AM


Post A Reply Comment Options
Unread 07-29-13, 07:46 AM  
Wym
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 16
Uploads: 8
Quote:
Originally Posted by adelea
Theres something not quite right about out of date version reporting.

13:42:09: [EZRebuff] v2.03v03.B loaded.
13:42:09: [LibVersionCheck] Addon EZRebuff has version 2.03v01.R but Demi uses version 2.03v02.R.

/script print(Inspect.Addon.Detail("EZRebuff").toc.Version)
2.03v03.B

Now, this only happens the first time you login with a new version.



Now, what is happening is your event handler is getting called before mine, where I register the new version!

I would suggest you register your event handler for Load.End with a very low priority, so it gets handled last - ie after every one elses has had a chance to register a version!
I implemented that in 0.04, and set the priority to -99. However, i have the version check in Event.Addon.Startup.End (which is called after all addons are loaded), not in Event.Addon.Load.End (which is called after each single addon). So, maybe EZRebuff uses LibVersionCheck.register() in the Startup.End handler, instead of the Load.End handler where it should?
Anyway, Startup.End should work as well now, at least unless your addon registers with a priority of -100, which counts as malice that i won't work around
Wym is offline Report comment to moderator  
Reply With Quote
Unread 07-16-13, 04:55 PM  
Wym
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 16
Uploads: 8
New version due in a few days

Thank you for your input, Adeala and Naifu. I'm going to include those suggestions into a new version (0.4) soon, but i want to be able to test it at least a bit, so i guess it will take me until this weekend until i release it.

Wym
Wym is offline Report comment to moderator  
Reply With Quote
Unread 07-16-13, 12:17 PM  
Naifu
Claw of Regulos
AddOn Author - Click to view AddOns

Forum posts: 22
File comments: 10
Uploads: 6
Hey

Really like the lib and the idea behind. I use it in nkRebuff and will add it to all my addons. Thanks for the work!

One thing I noticed is that if you install an addon using your lib and then remove that addon you'll still get new version infos.

So if you could include a check if the addon is actually installed, that would be simply awsome!

Cheers
N.
Naifu is offline Report comment to moderator  
Reply With Quote
Unread 07-16-13, 07:59 AM  
adelea
Claw of Regulos
AddOn Author - Click to view AddOns

Forum posts: 22
File comments: 285
Uploads: 6
Theres something not quite right about out of date version reporting.

13:42:09: [EZRebuff] v2.03v03.B loaded.
13:42:09: [LibVersionCheck] Addon EZRebuff has version 2.03v01.R but Demi uses version 2.03v02.R.

/script print(Inspect.Addon.Detail("EZRebuff").toc.Version)
2.03v03.B

Now, this only happens the first time you login with a new version.

Quote:
- at an appropriate location in your code, typically in an Event.Addon.Load.End handler, call something like

LibVersionCheck.register(AddonData.toc.Identifier, AddonData.toc.Version)
Now, what is happening is your event handler is getting called before mine, where I register the new version!

I would suggest you register your event handler for Load.End with a very low priority, so it gets handled last - ie after every one elses has had a chance to register a version!
adelea is offline Report comment to moderator  
Reply With Quote
Unread 07-06-13, 09:26 AM  
adelea
Claw of Regulos
AddOn Author - Click to view AddOns

Forum posts: 22
File comments: 285
Uploads: 6
Quote:
Originally Posted by Wym
Quote:
Originally Posted by adelea
Wyt - this statement on the front page isnt quite true!

If the user installs this standalone, and it has a newer version than any that are embedded in any other addons, then the rift client will use the standalone version.
You're right, yes.

The reason i included this is, i get mails every day about "Translations.lua" not found in LibVersionCheck. When i upgraded to 0.03, i even got these mails the next day. I strongly assume that's not because some addon author distributes a stripped down version of LibVersionCheck - addon authors know better than to remove files from a distro - but instead, someone had errors and messed around by pulling files from the LibVersionCheck zip and copying them to where they don't belong. (I also get errors about createAndShowUI not existing, which probably means someone messed around and deleted UI.lua from the distro).

Anyway, the point is, there are Copies of V0.03 around that don't work, in ways that can only be explained by "someone messed with them". Installing the same version standalone won't help, and i can only assume some users broke their version by trying. I trust addon authors more to embed the library correctly than i trust users to install it standalone, that's why i'm trying to discourage them. Obviously, people like you who know the details aren't my audience

And, after all, i don't want to get Mails from people saying "hey, i installed LibVersionCheck, and don't get notfiied, your library doesn't work".
You know the frightening thing.. For you to get the errors, more than one person has to be doing this!

But you're right, discouraging the direct installation of libraries is probably best.

BTW - Good job on the library! Nice and easy to use - as I release updates to my addons, they all get it added in!
Last edited by adelea : 07-06-13 at 09:27 AM.
adelea is offline Report comment to moderator  
Reply With Quote
Unread 07-06-13, 03:17 AM  
Wym
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 16
Uploads: 8
Quote:
Originally Posted by adelea
Wyt - this statement on the front page isnt quite true!

If the user installs this standalone, and it has a newer version than any that are embedded in any other addons, then the rift client will use the standalone version.
You're right, yes.

The reason i included this is, i get mails every day about "Translations.lua" not found in LibVersionCheck. When i upgraded to 0.03, i even got these mails the next day. I strongly assume that's not because some addon author distributes a stripped down version of LibVersionCheck - addon authors know better than to remove files from a distro - but instead, someone had errors and messed around by pulling files from the LibVersionCheck zip and copying them to where they don't belong. (I also get errors about createAndShowUI not existing, which probably means someone messed around and deleted UI.lua from the distro).

Anyway, the point is, there are Copies of V0.03 around that don't work, in ways that can only be explained by "someone messed with them". Installing the same version standalone won't help, and i can only assume some users broke their version by trying. I trust addon authors more to embed the library correctly than i trust users to install it standalone, that's why i'm trying to discourage them. Obviously, people like you who know the details aren't my audience

And, after all, i don't want to get Mails from people saying "hey, i installed LibVersionCheck, and don't get notfiied, your library doesn't work".
Wym is offline Report comment to moderator  
Reply With Quote
Unread 07-06-13, 01:46 AM  
adelea
Claw of Regulos
AddOn Author - Click to view AddOns

Forum posts: 22
File comments: 285
Uploads: 6
Quote:
If you came to this site because you get errors in LibVersionCheck while playing, downloading the addon here and installing it will NOT fix your problem. LibVersionCheck is intended to be embedded in other Addons, and you have to download the newest version of that other addon that uses LibVersionCheck to fix your error.
Wyt - this statement on the front page isnt quite true!

If the user installs this standalone, and it has a newer version than any that are embedded in any other addons, then the rift client will use the standalone version.
adelea is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: