Page 1 of 1

How to use compiler variable to set VERSION?

Posted: Fri May 29, 2009 5:37 pm
by afriesen3
I want to set the VERSION variable via a compiler variable, which will be handed to miabuild on the command line:

$ miabuild project.mpr BUILDVERSION="1.0.567"

In the project settings dialog, I have "Product Version:" set to #BUILDVERSION#. A balloon message warns me that version numbers must be "only numbers and periods" but everything builds without error.

In the debugger, I have added a watch on VERSION, and VERSION contains #BUILDVERSION#, not 1.0.567.

Evidently, the balloon message is correct. So how do I set VERSION via a compiler variable?

InstallAware 9 on XP Pro SP2.

Thanks,

Posted: Mon Jun 01, 2009 3:32 am
by ALive
Hi, afriesen3!

You can set VERSION inside the design tab on the Project Properties window. Just type the #BUILDNUMBER# inside "Product Version" text box. That will do it. Then you can specify BUILDNUMBER as a compiler variable (in the project properties, or in miabuild.exe) and set whatever version number you like. Btw this is how i used in our installer project.

Hope this helps!

Posted: Mon Jun 01, 2009 10:46 am
by afriesen3
Thanks for trying to help, but your suggestion appears to be functionally equivalent to accessing the Project Properties via the Project Options dialog, which is what I described in my original message as not working.

I found a work-around of simply setting VERSION to #BUILDVERSION# as the first line in the MSIcode.