LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

custom version number for target settings

Is there a way to input the version settings at compile time, outside of the Version Info dialog of Target Settings? 

 

What I'm really after is this: I would like to append the SVN revision of a project to its compiled binary.  Something like:

 

3.1.0.3167

...where 3167 is the SVN revision, the other numbers are specific to CVI and this build.

 

I see in the version dialog where we have access to built-in macros and modifiers for the parts of this version system.  Yet, I'm not seeing a way to have a pre-compiler script send values directly to the version number before it's built.

 

Here's a look at my project's version setup:

 

cvi file version dialog.PNG

 

And the corresponding EXE that was built has this file properties:

 

file version.PNG

You'll notice that the "File Version" is not the second file version (not sure what that one's for), but the first.

 

I would love to insert my SVN revision so that I can track back problems in production to a specific revision to recreate the issue and debug.

0 Kudos
Message 1 of 3
(2,194 Views)

Hi ElectroLund,

You try to use CVI's command line interface to build since it allows specifying product and file versions. 

Because it's a command line application, you may be able to create a batch file that reads the version from SVN and pass it to CVI's command line interface.

Message 2 of 3
(2,146 Views)

Would it be possible to send command line parameters into CVI's build steps window?  I'm thinking of using the "fileVersion" switch:

 

CVI build steps.jpg

 

I'm not opposed to doing all this from command line, but I'd prefer to be able to launch that process from CVI somehow, with the project loaded.  

0 Kudos
Message 3 of 3
(1,807 Views)