1
votes

I'm trying to build a simple release build batch for our app. I'd like to use environment variables inside the <AppName>.cfg file. However these seem not to get expanded. Neither

-U"$(DELPHIKOMP)\VclZip;..."

nor

-U"%DELPHIKOMP%\VclZip;..."

work. However

-U"C:\DelphiKomp\VclZip;..."

does. Any idea what I'm doing wrong?

Please note: We're using BDS2006, so MSBuild is no option for now.

Update: As gabr suggested I wrote a little tool that expands the environment variables in my cfg and calls dcc32 for me. Thanks to all for their answers!

3

3 Answers

2
votes

DCC32 doesn't support expansion of environment variables.

I'm pretty sure there exists a utility on the Internet which expands all variables in the cfg file, calls dcc32.exe and restores original cfg file, but I can't locate it anymore.

You can write such program pretty easily by yourself, though.

1
votes

Why not pass them as command line parameters to dcc32 - in that case the shell will expand them.

1
votes

FWIW, using Delphi 2006 does not preclude MSBuild, or make, or another build tool; just shell out to dcc32 as necessary.