tags:

views:

156

answers:

1

I have a Delphi code library that I want to put in a central directory, say:

C:\delphi\codelibs\fastMM

I have 5/7/2009 versions of Delphi installed. Now, I want to use the library from all these Delphi versions without the .dcu file conflicts. (Each delphi versions compile to slightly different .dcu files, you know that!)

Also each compiled .dcu files should be in directories like :

C:\delphi\codelibs\libs\D5

C:\delphi\codelibs\libs\D7

C:\delphi\codelibs\libs\D2009

How can I add these dirs to delphi browsing path?

+5  A: 

The directory with the source code should appear in the browsing path. The directory with the compiled code should appear in the search path and the library path. (If you include source code in the search path, then Delphi might recompile it, even when it doesn't really need recompiling, and that can lead to even more unnecessary compilation. Keep as little code as possible in the search path. My search path typically has no source code.)

Delphi can put the DCU files in the correct directory for you. Open the package project for the library and configure the unit output directory to be the version-specific folder you've chosen.

The BPL files generated from the packages will not need to be put into separate directories because they will simply take the names of their corresponding DPK files, and those files should already have version-specific names. If they don't, then you can specify a suffix for Delphi to apply to the binaries' names.

Rob Kennedy