Role out Compiler Version on Action Lists

Hi,

I build Delphi Packages for every Delphi Version from D5 to D2010. There are 6 different packages I have to build.

Currently I copy all Project Compiler Actions for each Delphi Version.

Is it possible to roll out the "Compiler Version" and create one Action for the 6 packages? Then I may call the Action List for every Delphi Version.

Regards

Oliver

Hi Oliver,

You can set the compiler version in the action’s BeforeAction script event which will allow you to change the compiler version based on an action list parameter. The property name is ‘CompilerVersion’ and is an integer. The possible values are:

cvDelphi3 = 0
cvDelphi4 = 1
cvDelphi5 = 2
cvDelphi6 = 3
cvDelphi7 = 4
cvBCB3 = 5
cvBCB4 = 6
cvBCB5 = 7
cvBCB6 = 8
cvBCB7 = 9
cvDelphi2005 = 10
cvDelphi2006 = 11
cvDelphi2007 = 12
cvDelphi2009 = 13
cvDelphi2010 = 14

Example BeforeAction script to select Delphi 2007:

[code]Action.CompilerVersion = 12;[/code]

Regards,
Paul.

Hi,

the compiler changing seems to work. But the Library Path seems to be the same for all project.

When chaning from D7 to D2005 he stops compiling with the message "Variable Delphi does not exists".

When changing the Compiler manually the Library Path is changed from $(Delphi)\Lib to $(BDS)\Lib.

I already buy one FinalBuilder Licence this morning, i am very pleased with the fast supprt ...

Regards from Germany

Oliver

Hi Oliver

If you have the “Use Global Delphi Library Path” option checked then it will use the correct library path (although it will not show the correct lib path in the edit field). When that option is not checked, the action has control over the library path. If you want more control over the library path then you can use a variable for it instead, and set the variable value based on the compiler version you are using.

Works fine, thanx a lot