Switch FB files between XE4 and XE2 compile actions

in our software development team we use DELPHI XE2 and Final Builder EMBA edition as a main tool for building our complex software projects.

My role as a project owner  is to make sure the upgrade path of our project to the next Delphi compiler version, therefore  I#m using Delphi XE2 and XE4 as well as the FB full edition.

I want to build  the project on a dedicated test computer using XE 4 compile option and FB full edition using  one FB script / project file   which should be used on all other computers in our team with XE2  compile option.

 

How to make a fast switch of the Delphi compile action in all steps ?  Manual editiong of the properties is to time consuming  and 2 scripts is also no good solution as we have to maintain both files ....

 

 

Hi Bernard

I have the same situation here, and I solve this using a “Read Registry Value” action and attribute his value to a variable.
This way I can compile Projects with XE2 and XE4 at the same FB project.

Regards

Another option is to alter the properties of the action in the BeforeAction script on the Build Delphi action. This script passes the action object, on which there is a CompilerVersion. This is an integer representation of the Delphi Compiler. From the help;

property CompilerVersion : integer; // D3 = 0, D4 = 1, D5 = 2, D6 = 3, D7 = 4, D2005 = 10, D2006 = 11, D2007 = 12

This means the following javascript in the BeforeAction would do what you require;

Action.CompilerVersion = FBVariables.DelphiBuildVersion;

“FBVariables.DelphiBuildVersion;” is a reference to an integer variable in the FinalBuilder project. EX2 is 16 and EX4 is 18.

Hi,
I have the same problem like Bernhard. Do you mean i have to create a new Action Package?
if i want to run the project on a PC with Delphi xe2, FBVariables.DelphiBuildVersion will be referenced to an integer 16?

Maybe you can describe your approach more detailed.

Regards
Michael

problem solved