An answer to this question describes how to override the command line compiler settings for Delphi 2007 by specifying them on the msbuild command line like this:
msbuild yourproject.dproj /p:DCC_DcpOutput="d:\bla\blub"
I have tested it and it works.
The Delphi IDE allows me to specify this path in the project options and if I leave it empty, it uses the default which suits me fine. Unfortunately I have some 3rd party packages that set this path to a subdirectory of the sources. Rather than editing the project settings, I would like to override this on the msbuild command line.
I tried this
msbuild yourproject.dproj /p:DCC_DcpOutput=""
and this
msbuild yourproject.dproj /p:DCC_DcpOutput=
but neither of them worked the way I want it. Both result in the .dcp file being generated in the directory where the .dproj file is located rather than the default output directory.
If I explicitly specify that directory like this
msbuild yourproject.dproj /p:DCC_DcpOutput=C:\Users\Public\Documents\RAD Studio\5.0\Dcp
it works, but that means it will be specific to a particular Delphi installation, since this path is different depending on the Windows version (the above is Windows 8, in Windows XP the path is different).
Since I want to use this in a script that automatically compiles and installs all required packages for a project in a given Delphi 2007 installation, which can be on Windows XP, Windows 7 32 bits, Windows 7 64 bits and Windows 8 64 bits, I would like to avoid this.
I could try to use some environment variable, but none seems to fit the requirement.
So, is there any way to get the behaviour as if there was no DCC_DcpOutput entry in the .dproj file?