03-19-2021 05:05 PM
I need to reed the version that I released a library, does anyone know how I can read the version of the exe or packed library programatically?
03-19-2021 05:13 PM - edited 03-19-2021 05:15 PM
MGI has some really nice stuff in their tools package. Get executable version is specifically from the "MGI Application Control" package. Fire up VI Package manager and install that or MGI Tools.
03-19-2021 05:19 PM
Version of the exe can be read with vi.lib\Platform\fileVersionInfo.llb.
03-19-2021 05:23 PM
For just a library you don't need MGI. Just an invoke node and a property node:
The first invoke node there is pretty easy to make. If you just drop down a default invoke node, either from the "Application control" palette or using quickdrop, it's already on "App", and you just select "Library ► Open" and you're there.
03-20-2021 02:44 PM
@Kyle97330 wrote:
For just a library you don't need MGI. Just an invoke node and a property node:
The first invoke node there is pretty easy to make. If you just drop down a default invoke node, either from the "Application control" palette or using quickdrop, it's already on "App", and you just select "Library ► Open" and you're there.
This only works for Windows. For other platforms the version is nowhere stored by the application builder.
Also you should make sure the close the refnum returned by Library.Open. Each open refnum uses up some memory and also will keep the library loaded in memory.
03-22-2021 12:10 PM
Following the solution that was recommended to me, when reading the version information what I always read is a fixed number, I clean the reference in case the library stayed in memory but still read the same number, even when I change the version when packing the bookshop.I don't know if I have to do any settings for this to work.
I have this possible solution at the time of packaging the library, I have to generate the text file and read the version with which it is generated by converting to an ini file and reading the section Output File Version.
03-23-2021 10:07 AM
If you want to build cRIO PPLs, those won't have the nice "Product Version" that you can see in Windows Explorer for Windows PPLs either...
I just add a VI at build time that contains a version string as a constant - then I can iterate over PPLs in my project and call that VI in each to produce nice lists: