Compiler variable value being truncated in InstallAware action

I have a project that that has an InstallAware action and I pass in a couple of compiler variables that are set earlier in the script.  One of the variables should "9.10", but it gets passed to InstallAware action as "9.". 

Under the Settings tab for the InstallAware action, I set the followiing compiler variables:

PRODUCTVERSION=%VERSIONNUM%
PRODUCTSHORTVERSION=%SHORTVERSIONNUM%

When I step through the code and log the output, I can see the SHORTVERSIONNUM variable being set to the correct value of "9.10".   I generate this value by reading in each part of the app's version number from an .ini file and for this variable, I am just concatenating the major and minor parts of the version number with the "." separating them. The log file displays it as

Set Variable SHORTVERSIONNUM to [ 9.10 ]

When it gets to InstallAware action, the following command is logged:

Executing InstallAware with commandline: "C:\BuildBox\installers\elinkrp\9.10\gui\elinkgui.mpr" /b=1 PRODUCTVERSION=9.10.0.103 PRODUCTSHORTVERSION=9.1

I have also specified "Extra Command Line Parameters" with the following being specified for the "Extras Params At End":

+qf +qr +qi

These parameters were not present on the command line that was logged.  Should they have appeared on the command line in the log file?  If I reverse the order of the two compiler variables, the same result occurs except the placement of the variables on the command line is switched.  If I replace the FB variable with the actual value of "9.10", that does work.

This is with version 5.5.0.518.

Hi Chris,

Thanks for your post. I'll try to explain the behaviour that you're seeing here.


Because FinalBuilder variables are variants, sometimes FB gets confused about what type they are. In the example you've shown above, the Set Variable doesn't know whether 9.10 is a string or a floating point value, so it's chosen floating point value.

To get around this, the Set Variable action has a "Force Type" field. If you set this to "String", FinalBuilder knows that you want a string and not a floating point number, and you should get 9.10 when you read it back.

Regards,

Angus

PS With the "Extra Command Line Parameters", this is a shortcoming in the action - the command line is actually being logged before that data has been added. I'll fix this for a future release.

Thanks Angus, forcing the variable type to string fixed the problem.