Reputation: 14001
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!
Upvotes: 1
Views: 1660
Reputation: 42172
FWIW, using Delphi 2006 does not preclude MSBuild, or make, or another build tool; just shell out to dcc32 as necessary.
Upvotes: 1
Reputation: 26850
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.
Upvotes: 2
Reputation: 32344
Why not pass them as command line parameters to dcc32
- in that case the shell will expand them.
Upvotes: 1