05-11-2011 12:03 PM - edited 05-11-2011 12:03 PM
I have several build specifications in the same project under the same version control and I base my version numbers in part on my revision number:
<Major>.<Minor>.<Revision>
Right now, I'm keeping the full number in a text file which is distributed with all build specifactions. However, I notice the build specification configuration diaglogue contains an option to execute a VI before the build. I'm wondering if a VI executed at this stage can somehow edit the version number within the build specification that called it, such that I don't have to manually change the version number in every build spec, every time I want to build one.
Are there any canned functions that let you edit build specification things like version numbers?
05-12-2011 10:29 PM
Hey Kgolden,
I don't believe what you are asking is a current feature. However, I have found this suggestion in our database.
Regards,
A. Zaatari
05-13-2011 02:47 AM
Hi Kgolden and A. Zaatari,
Maybe it's not a current feature (I have to believe a NI Engineer ) but it's possible to do it.
I made a VI that automatically creates Build and Installer specifications and also changes their configuration (like name, path, and version number).
So, here is how:
- all this information are stored in the project file My_Project.lvproj
- My_Project.lvproj is actually a !!! XML file !!!
- Make a small VI that search in the XML for the following lines/properties:
(1) App_fileVersion.build
(2) App_fileVersion.major
(3) App_fileVersion.minor
(4) App_fileVersion.patch
For the App_fileVersion.build it should look like :<Property Name="App_fileVersion.build" Type="Int">115</Property>. Search for the pattern and change the value 115. Do the same for all four of them.
Pay attention!! After you change this value you have to restart (close and than open) the Project in order to apply changes. This can also be done automatically by using LabView Application invoke and property node: Invoke Node: Project/Close + App/Open.LV Document/Path. Be carefull that you should do this from a VI that is not added to the project.
Regards,
Paul