Skip navigation
micahjwalter
Currently Being Moderated

VERSION

Jun 29, 2009 6:02 PM

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

 
Replies
  • Currently Being Moderated
    Jun 30, 2009 2:14 AM   in reply to micahjwalter

    It was documented on page 21 of the 2.2 SDK manual update and there is an example of syntax in the flickr.lrdevplugin:

     

    VERSION = { major=2, minor=0, revision=0, build=200000, },

     

    You can also specify 'display' to show something different or localise the displayed string.

     

    Hope that helps.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2009 5:31 AM   in reply to Mark J M Wilson

    As a follow up, is it possible for the plug-in to detect the version - and therefore use an LrHTTP call to show a "newer version available" message in the Info panel?

     

    I've tried _PLUGIN.version, _PLUGIN.VERSION. Neither of which are documented, and neither of which work.

     

    John

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2009 5:55 AM   in reply to johnbeardy

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2009 6:52 AM   in reply to Mark J M Wilson

    Thanks  Mark, that gives me a way forward. Can't get it to work 

    though!

     

    John

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2009 7:36 AM   in reply to johnbeardy

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2009 7:39 AM   in reply to Mark J M Wilson

    Isn't that the version of Lightroom?

    John

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2009 7:51 AM   in reply to johnbeardy

    johnbeardy wrote:

     

    Isn't that the version of Lightroom?

    John

    Yes, my edit must have crossed with your reply.  That does explain why it is commented out in my code and replaced with a recreation of the version table.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 6, 2009 2:32 PM   in reply to johnbeardy

    Those calls aren't documented because they aren't implemented.

     

    There isn't currently a way for a plug-in to look at its Info.lua declaration or its version declaration. I'll interpret this as a feature request for such.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 6, 2009 8:15 PM   in reply to escouten

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 6, 2009 11:35 PM   in reply to escouten

    Thanks Eric - that's a correct interpretation.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 7, 2009 9:06 AM   in reply to Matt Dawson

    D'oh! I stand corrected.

     

    I don't see any problem with this approach.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points