Hi,
I was trying to set the VERSION number in my Info.lua file as follows:
VERSION = {
1,1,4
},
but I must be doing this wrong as it keeps showing up as Version 1.0 in the Plugin-Manager. Any examples of how this should be formatted?
-m
John, I ended up with a long winded solution to that: I store major, minor, revision and build in a table, which I use to set the version info. I can then use the same values to compare to the latest released value on my website.
BTW John, I saw your comment on my tagset issue - thanks and looking at it now.
I just realised that my explination was bad and that LrApplication.versionTable() might do what you want...and I am trying to remember why I am not using versionTable()...I really should write more comments in my code...
I actually store the values in two places - once in info.lua and again in another script, which now makes no sense at all but was probably very sensible last year ![]()
EDIT: just realised why - it gives Lightroom's version, not the plug-in's...
Message was edited by: Mark J M Wilson
escouten wrote:
There isn't currently a way for a plug-in to look at its Info.lua declaration or its version declaration.
Not technically true.
Why don't people just do this? My latest plugin uses it and it works.
local info = require 'Info.lua'
local versionString = 'Version ' .. (info.VERSION.major or '0') .. '.' .. (info.VERSION.minor or '0')
Sure, Lightroom has to have this in memory already so this is a tad inefficient, but the files are small (and have to be present) so its relatively save to load them again.
Matt
North America
Europe, Middle East and Africa
Asia Pacific