How can I override BDSCOMMONDIR for Delphi 2010?

Hello,

is it possible somehow, to override BDSCOMMONDIR ?

I define variable called BDSCOMMONDIR. I set it to something, and when I want to use it in a Delphi project to set the output location for DCP, and BPL files like $(BDSCOMMONDIR)\mycommon\dcp and $(BDSCOMMONDIR)\mycommon\bpl, the output is still put in the standard BDSCOMMONDIR. I've checked the settings in debug mode, but when the compiling is started, the BDSCOMMONDIR still points to the standard delphi path. If I use any variable other than BDSCOMMONDIR then the output redirection works fine.

To get the BDSCOMMONDIR value for the registry is not an option, because I have many Delphi configuration on my machine, with different settings. (see -r key for bds.exe).

thanks 

Hi

To do this create your own variable called BDSCOMMONDIR, if creating the variable within the variables editor dialog you should see the variable highlighted in bold green font indicating that this variable will override the existing BDSCOMMONDIR variable.

Now assign this variable a value (either using default value field or set variable action).

When you want to reference the new value in your Delphi action, use %BDSCOMMONDIR%\Dcp rather than $(BDSCOMMONDIR)\Dcp this should solve your problem.

Regards,
Steve

Hello Steve,
 
thank you for the help. The %...% form does the trick. Interesting, that any variable other than BDSCOMMONDIR works with the $(...) form too.
Thank you again.
 
Abu