Value should address compiler

How can I address a compiler version and the path of an output directory with a variable with is set in a Loop? I use FinalBuilder professional with the compiler verison Delphi XE2, the Versions Delphi XE5 and Delphi XE7 are also installed. My goal is to compile and test all my programs with these three different compiler. And for each compiler I want to adress a special output directory. To sum up: if the variable changes it`s value (e.g. from 1 to 2), a new Compiler and a new Output Directory should be used. So every value should address a scpecial compiler and directory. Do you have any solutions to solve this problem?

The solution you speak of requires using scripting events.

In the BeforeAction event you could have a switch statement that changes behaviour based on the loop variable. Then inside each case statement you could have script which updates the properties of the build action.

Below is how to update the compiler version on the build action.

Action.CompilerVersion = 16; //XE2
Action.CompilerVersion = 19; //XE5
Action.CompilerVersion = 21; //XE7

Action.OutputDir = ‘C:\MyOutputDirectory’;

Note however this is not how we suggest building multiple compiler versions of the same code. The reason for this is that there are a number of properties which need to be setup dependent on compiler version. Such as Unit Aliases, Namespace Prefixes and Framework version.

These will all need to be set correctly otherwise you will experience issues with the build. It is for this reason that we always suggest using three separate actions.

With that said, the iteration solution you wish to implement should work with the use of scripting.

Thank you for this information.

My problem is that if I use three different actions for my build, only the first one (with Compiler Delphi XE2) addresses the Output Directory correctly.
When the next action is called and executed (e.g. with Compiler Delphi XE5 and the belonging Output Directory), my used Folders, where I should see my proved applications and programms, are empty.
Do you know why this is happening?

What is the reason when I write in the action:

 Action.OutputDir = 'C:\Lukas_Test\Finalbuilder_Test\bin_Test_32bit\32XE5'; 


and it looks like:

C:Lukas_TestFinalbuilder_Testin_Test_32bitXE5

instead of:

C:\Lukas_Test\Finalbuilder_Test\bin_Test_32bit\32XE5

when I look after my Output Directory after the Action?

Sorry, the Action Looks like:

Action.OutputDir = ‘C:\Lukas_Test\Finalbuilder_Test\bin_Test_32bit\32XE5’;

Hi Lukas,

Please feel free to send us the project causing you issue to our support email address. From here we will be able to give a better answer as to what is going on.

If you are using Javascript, then the \ needs to be escaped (\ is used for escaping special characters in javascript and many other languages) :

 Action.OutputDir = 'C:\\Lukas_Test\\Finalbuilder_Test\\bin_Test_32bit\\32XE5';