How to use compiler variable to set VERSION?

Got a problem you cannot solve? Try here.
Post Reply
afriesen3
Posts: 32
Joined: Thu Apr 16, 2009 4:58 pm

How to use compiler variable to set VERSION?

Post 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,
Aaron
ALive
Posts: 109
Joined: Mon Apr 27, 2009 5:54 am
Location: Russia

Post 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!
afriesen3
Posts: 32
Joined: Thu Apr 16, 2009 4:58 pm

Post 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.
Aaron
Post Reply