tags:

views:

550

answers:

2

I use buildbot to compile my Qt/C++/nmake project.

I would like to add the version number to the executable and the company details (on the properties of the file).

Does anybody know where I can set this information?

Note: I am using buildbot not Visual Studio so I need a command line way of doing this.

+1  A: 

Unless your version will remain static (i.e. you are only reporting a major build versions or you don't incorporate the version control revision into your version number) you will likely want the version to be generated as part of the build. This could be done in the pro file as another answer indicated but this would mean having to modify the pro file which is likely also checked into your repository.

In this case, the best solution is a Windows resource file. This will also allow you to specify the other information you requested (company info, etc.) which I am not sure if you can do via the pro file.

Then you can include it as part of the project by setting the RC_FILE variable in your pro file.

RC_FILE = application.rc

Another example of a windows resource file can be found in the Google Chrome Repository. There they have an rc file for the application that references another rc file for the version information. I assume that part of the build process generates this version rc file from the template.

Jesse
+2  A: 

Add VERSION = x.y.z to your pro file.

rpg