3
votes

[background]

I am creating common runtime package to use in my projects. I don't like to make a mess in

C:\Users\Public\Documents\Embarcadero\Studio\*\Dcp

directory without a purpose. I have to add directory with all of my *.DCU files to library path anyway. So I was thinking about redirecting DCP files into same directory...

[question(s)]

Can I change default DCP output directory without worrying about side effects?

What is the purpose of placing DCP file in other place than DCUs? What's the point of common DCP output directory? Does it offer any advantage I don't know?

I understand point of common package output directory - it's listed in system PATH variable.

1
It is that way so that other projects can find itDavid Heffernan
But does it make any difference if I store DCP files inside common folder or with project DCU files if my path with DCUs is listed in "Library path" anyway?Mad Scientist
In my Delphi installs, I always have a Lib2 folder that I use as the output folder for DCUs, BPLs and DCPs and have never had any problems with that.MartynA

1 Answers

6
votes

The IDE uses DCP files for identifier resolution at design time. This applies equally to applications configured to use run time BPLs as well as the IDE itself (for extensions and components). If you are a component developer the BPL and DCP are technically the only files you need to ship. The DCUs as well as the source are optional, though most component developers do offer them for convenience and debugging purposes.

The IDE's extension APIs are a good example of this. There are classes that exist in the DCP and BPL files but don't exist in the source or dcus shipped with the IDE.

DCPs only need to be in the IDE's search path. They don't necessarily have to be in the public DCP folder. I believe the primary reason this folder is the default is for component developer's benefit. They need a convenient location to put DCP files and it needs to be somewhere with lax permissions so the compiler can write them and the IDE can load them.