LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Set EXE, DLL build file version information to increment Automatically

I am curious to learn if there is a way to have the project auto-increment the File Version (Major, Minor, Revision, Build) information the same way that TestStand does for sequence files. Is there a Macro or other means to have the project update one or more of these values when a DLL or EXE Target build is performed so that an installer can tell if it should update/replace a file if it was installed from a different source?
 
Thanks for any advice/help on this!
 
-Jack
0 Kudos
Message 1 of 5
(6,123 Views)
Cap'n -

Great question - I haven't seen that there's a way to do it but there might be if you were to use the ActiveX automation to build your application.  It would have to programmatically manipulate the target settings window to diddle the file version info.  The auto-increment feature in the deployment tool simply ensures that the distribution kit is uniquely identified.

It might be possible to set the file version after the fact by re-writting the meta-data in the exe or dll file header, but then it would be crossed up with what you have configured in the IDE.

Menchar
Message 2 of 5
(6,122 Views)
There are currently a couple ways to programmatically change the version numbers built into your binaries:

1. The CVI ActiveX automation interface (samples\activex\cvi\cvisrvr.fp) has a function CVI_AppSetProjectVersionInfo which allows you to change the version numbers.

2. The CVI command line utility (compile.exe, in the root CVI directory) supports overriding the version numbers found in the project.  For information on all the supported command line arguments, call compile with /?.  A number of users have successfully implemented auto version increment by calling compile.exe from a script or batch file.

You'll be happy to know that improvements to the file versioning (most notably, auto-increment functionality) are in the works, and will likely be seen in a forthcoming release of CVI.

Mert A.
National Instruments

Message Edited by Mert A. on 09-06-2007 01:19 PM

Message 3 of 5
(6,117 Views)

Gentlemen! Thank you for your speedy and informative answers. You've given me quite a bit to ponder as to how best to approach the file versioning question.

Thanks again!

-Jack

0 Kudos
Message 4 of 5
(6,102 Views)
One caveat that I hinted at, but probably should make explicit, is that when using compile.exe any version settings that you provide at the command line are temporary overrides and will not be persisted in the project.  This means that for versioning purposes, binaries built by compile.exe and by the CVI environment are not interchangeable.  Your binaries built in the environment will not have the incremented version numbers.

Mert A.
National Instruments
0 Kudos
Message 5 of 5
(6,098 Views)