How to use compiler variable to set VERSION?

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

How to use compiler variable to set VERSION?

Postby afriesen3 » Fri May 29, 2009 5:37 pm

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

Postby ALive » Mon Jun 01, 2009 3:32 am

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

Postby afriesen3 » Mon Jun 01, 2009 10:46 am

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


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 36 guests