Jump to content

Adding a file version to a compiled vi


Recommended Posts

Hello everybody. I have an interesting problem. The company I work for requires that all programs released have a version number associated with them that can be read by the GetFileVersionInfo function. None of my LabView programs return a version number, they actually return 0.0.0.0. Is there a way to provide version information that will eventually be stored in the final executable?

Thanks

java script:emoticon(':headbang:')

smilie

Link to comment

I talked with NI about this and it turns out that LabView executables do not have a version resource area for any version information to be stored in. NI may implement this in a future version of LabView.

Link to comment
Hello everybody. I have an interesting problem.  The company I work for requires that all programs released have a version number associated with them that can be read by the GetFileVersionInfo function. None of my LabView programs return a version number, they actually return 0.0.0.0. Is there a way to provide version information that will eventually be stored in the final executable?

I do not know of a way to add a version number so it can be read by the GetFileVersionInfo function, but I do have a way to store version information in any VI including those without a diagram and/or front panel. There are a set of VI properties exposed for scripting that allow reading and writing tag information to any LabVIEW file. I have found this so useful that I have created a toolkit called VI_Tag Toolkit. There is a beta release available on my website. I use VI tagging to add version information to all of my applications and toolkits. I recommend creating a string tag with the following naming structure "company.product.version" for version information. For example the dqGOOP Toolkit has the string tag "DA.dqGOOP.Version" which can be read to get the version.

Here are the links:

VI_Tag Information

Download link

Brian

Link to comment
  • 3 weeks later...
I do not know of a way to add a version number so it can be read by the GetFileVersionInfo function, but I do have a way to store version information in any VI including those without a diagram and/or front panel.  There are a set of VI properties exposed for scripting that allow reading and writing tag information to any LabVIEW file.  I have found this so useful that I have created a toolkit called VI_Tag Toolkit.  There is a beta release available on my website.  I use VI tagging to add version information to all of my applications and toolkits.  I recommend creating a string tag with the following naming structure "company.product.version" for version information.  For example the dqGOOP Toolkit has the string tag "DA.dqGOOP.Version" which can be read to get the version.

Here are the links:

VI_Tag Information

Download link

Brian

5382[/snapback]

The version information is just another resource in the executable image resource table. However there is no built in functionality in Windows to add resources to exectuables files as far as I know. For this you need so called resource compilers which are usually part of any C/C++ development environment. I believe there are open source variants around although their quality and ease of use as external tool from other applications does vary. One possible canditate should be contained in the MingW tool chain which is a Windows compiler and linker based on the every so popular Gnu C compiler tool chain.

Rolf Kalbermatter

Link to comment

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.