LibraryUpdater

Abandoned
Keeps embedded libraries up to date.
<p>The simple library updater!</p>

The simple library updater!

Description

LibraryUpdate

A simple Java program to keep your embedded libraries up to date. This may not have an impact on your day-to-day play, but it can make sure that you are always running the latest libraries (hidden addons which help the "real" addons do their job). This can be important if you run with some addons disabled.

This is an initial release; it creates backups, runs the optimization, and has an ugly but functional graphic interface. It's pretty self-explanatory:

  1. Double-click the JAR you downloaded
  2. Paste your WoW folder location into the text field
  3. Click "Optimize."

USER'S Q & A:

Q: Keylogger!

A: Nope. It's Java, it only runs as long as the window is open. You can look at the code if you like.

Q: Something broke!

A: No worries, it creates a backup in Interface\AddOnsBackup. Use that and you're good to go!

Q: How often should I run this?

A: I would classify this as pretty non-essential, it's just nice to keep things up-to-date. Usually addon authors will keep libraries up to date for you (if you update with Curse or similar), this just makes sure. If you run this when you change a bunch of addons, you'll be fine.

Q: How can I report a bug?

A: The bottom text field is the debug log. You can click there and Control-A to select all text. Then, paste it somewhere like here and tell me about it.

DEVELOPER'S Q & A:

Q: How can I make my addon work with LibraryUpdate?

A: Firstly, LibraryUpdate assumes you use LibStub, the de-facto standard for library versioning. Use it. LibraryUpdate looks for your call to LibStub:NewLibrary, which takes your minor revision as the second param.

LibraryUpdate tries three methods to get your minor addon number:

  1. Evaluate the second parameter as an integer.
    An example from LibDataBroker (result is 3):
    local lib, oldminor = LibStub:NewLibrary("LibDataBroker-1.1", 3)
  1. Evaluate the second parameter as a LUA statemnt, useful for string evals.
    An example from LibSink (result is 90072):
    local SINK20_MINOR = 90000 + tonumber(("$Revision: 72 $"):match("(%d+)"))
    local sink = LibStub:NewLibrary(SINK20, SINK20_MINOR)
  1. Assume the parameter is a variable name, and attempt to find it.
    An example from CallbackHandler (result is 6):
    local MAJOR, MINOR = "CallbackHandler-1.0", 6
    local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)

Note that it cannot be a variable reference to yet another variable (LibStub itself fails at this). I decided to not go on crazy, recursive goose chases for the one true variable. If there's significant noise on this, that may change. Maybe.

Q: My library doesn't work or is mauled by LibraryUpdate, I hate you and your Java!

A: LibraryUpdate includes a debug log, so the easiest way to test things would be to place an addon using your library in your addons folder and run it! If you don't see your library reporting a minor version number, something's wrong.

LibraryUpdate is also smart enough to leave well enough alone what it can't figure out, so if your addon does not match one of the three methods alone, LibraryUpdate shouldn't touch it. If it does, that's a serious bug, please let me know.

In the worst-case, the determineAddonMinorVersion() function in Versioning.java is the code that looks for the minor version. You shouldn't have to, but you could take a look at it or even submit improvements if so desired.

The LibraryUpdater Team

profile avatar
  • 4
    Projects
  • 12.2K
    Downloads

More from _ForgeUser75082

  • CoolRepair project image

    CoolRepair

    • 10.8K
    • Addons

    Automatically uses guild or personal funds to repair items!

    • 10.8K
    • October 26, 2011
    • Addons
    • +3
  • LibSync project image

    LibSync

    • 0
    • Addons

    A library to help syc data between players.

    • 0
    • January 3, 2011
    • Addons
    • +1
  • SpamSay project image

    SpamSay

    • 1.3K
    • Addons

    Provides slash commands to only say phrases every few seconds. Useful for macros.

    • 1.3K
    • January 3, 2011
    • Addons
    • +4
  • CoolRepair project image

    CoolRepair

    • 10.8K
    • Addons

    Automatically uses guild or personal funds to repair items!

    • 10.8K
    • October 26, 2011
    • Addons
    • +3
  • LibSync project image

    LibSync

    • 0
    • Addons

    A library to help syc data between players.

    • 0
    • January 3, 2011
    • Addons
    • +1
  • SpamSay project image

    SpamSay

    • 1.3K
    • Addons

    Provides slash commands to only say phrases every few seconds. Useful for macros.

    • 1.3K
    • January 3, 2011
    • Addons
    • +4