Thread Tools Display Modes
09/01/15, 06:25 PM   #1
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Manifest Version Number

This is a long shot, but is there any way to get the manifest version number
Lua Code:
  1. ## Version: 0.9
from lua code? I never remember to change it in both places when I do updates
  Reply With Quote
09/01/15, 07:32 PM   #2
Halja
 
Halja's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 111
Chip added it for us awhile back.
GetAPIVersion()
  Reply With Quote
09/01/15, 11:38 PM   #3
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by Halja View Post
Chip added it for us awhile back.
GetAPIVersion()
circonian means addon version, not API version.

And yes, would be nice to have all meta data from manifest available in Lua.
  Reply With Quote
09/02/15, 04:13 AM   #4
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
That's why I don't put version in the manifest I'm afraid it's not only inaccessible, but silently ignored because it's not one of the known keywords.

AddOnManager could keep a table of all "^## (%w+): ?(.*)" key-value pairs, and provide a function that would return the corresponding value for any given key.
  Reply With Quote
09/02/15, 04:18 PM   #5
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by merlight View Post
That's why I don't put version in the manifest I'm afraid it's not only inaccessible, but silently ignored because it's not one of the known keywords.

AddOnManager could keep a table of all "^## (%w+): ?(.*)" key-value pairs, and provide a function that would return the corresponding value for any given key.
Did I misunderstand? Don't you have to put the version in the manifest? That's how the game knows if your addon is out of date?
  Reply With Quote
09/02/15, 04:32 PM   #6
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by circonian View Post
Did I misunderstand? Don't you have to put the version in the manifest? That's how the game knows if your addon is out of date?
That's APIVersion. Version is ignored.
  Reply With Quote
09/02/15, 04:36 PM   #7
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by merlight View Post
That's APIVersion. Version is ignored.
Oh, woops, yeah what was I thinking
  Reply With Quote
11/24/15, 02:38 AM   #8
CaptainBlagbird
 
CaptainBlagbird's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 53
Originally Posted by merlight View Post
AddOnManager could keep a table of all "^## (%w+): ?(.*)" key-value pairs, and provide a function that would return the corresponding value for any given key.
That would be awesome

bump bump
  Reply With Quote
11/24/15, 07:35 AM   #9
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
yes or ..


Lua Code:
  1. number numAddons = GetAddonsInstalled()
  2. string addonName = GetAddonName(number index)
  3. boolean isLoaded, string:nilable addonVersion, string:nilable addonAPI, string:nilable addonDescription, string:nilable addonAuthor = GetAddonInfo(addonName)

so we could do

Lua Code:
  1. for i, GetAddonsInstalled() do
  2.       local addonName = GetAddonName(i)
  3.       if GetAddonInfo(addonName) then
  4.             -- Addon addonName is loaded !
  5.       end
  6. end

or

Lua Code:
  1. if GetAddonInfo("anObviousAddonWhichDontLeakAnyGlobal") then

There is also SavedVars and Depends and and Optional depends on, but it could be a really good start

Last edited by Ayantir : 11/24/15 at 07:41 AM.
  Reply With Quote
11/24/15, 07:52 AM   #10
haggen
 
haggen's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2015
Posts: 137
Ayantir nailed it, thank you!
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Manifest Version Number


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