Installaware variable build type

In my FB project I would like to run InstallAware twice. Each time with a different InstallAware build type, once a "compressed single exe", and once a "compressed web based exe".

Since the IA action includes quite a lot of compiler variables and other settings, I would prefer if I didn't have to copy the IA action and keep them both updated in case of changes to the action settings.

Is there a way to loop the IA action and change the build type? Since the build type is selected using a drop-down, I don't see how it can be done just by changing a variable.

I assume that it can be done using scripting, and setting the Action BuildType in the BeforeAction event, but I can't get it to work. I have tried just adding this code in the BeforeAction event on the IA action:

Action.BuildType = btCompressedWebExe

but this fails with the error "Type mismatch: 'Action.BuildType'".

Any help will be greatly appreciated.

Hi

The build type constants were not being correctly registered for the scripting engine. This has been fixed in the following build:
https://www.finalbuilder.com/downloads/finalbuilder/aex6/FB700_1353.exe

The easiest way to do this would be to place your InstallAware action nested under the For Loop action (you don’t need to provide a variable to store the current iteration). Then in the BeforeAction event of your InstallAware action you can use the following code:

Javascript:
[code] // Get the action properties of the for loopvar loopAction = Action.Parent();// Get the current iteration number and set the build type accordinglyswitch (loopAction.CurrentIteration){ case 1: Action.BuildType = btCompressedExe; break; case 2: Action.BuildType = btCompressedWebExe; break;}[/code]

Hope this helps.

Regards,
Steve

Yes it works, thank you.