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
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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