3
votes

In building components for installation, I know that registration units are generally a "should be separate" thing, but what are the guidelines for when one should divide the component installation into two separate packages (typically one being runtime, and the other being design time).

Bonus question: What are the accepted package naming conventions, for when runtime and designtime packages are separate?

3
"Bonus question" :DEdwin Yip

3 Answers

4
votes

Anything that is specific to use within the IDE like interacting with the designers, the object inspector (property editors...) or the components registration (icon, palette info...) should go into a design-time package, usually prefixed by dcl.

Anything else that is the minimum necessary to use the components in an application goes into the run-time package. Any reference to the Design units are forbidden in the run-time package.

It is common to have the compiler version number as a suffix to both design-time and runtime package: dclMyPackage120.bpl and MyPackage120.bpl (for D2009 which is version 20.0 of the compiler and sets the define VER200; for D2007 it was version 10.5 and a mixed bag of *100.bpl and *105.bpl thanks to binary compatibility).

1
votes

Have a look at the Delphi Wiki on that topic: http://delphi.wikia.com/wiki/Creating_Packages Does it answer your question? If not, maybe, you should restate it.

0
votes

Naming of packages is more or less up to you, but you should try to mimic one of the package naming schemes other providers are using.

The goals of proper package naming are to:

  • group packages of one provider and separate them from those of other providers
  • clearly separate runtime and design time packages
  • make parallel installation of various incompatible versions of the product as well as for various versions of Delphi / BCB possible

So generally the name of the package should consist of a short letter combination for the company / product, one or two digits for the version number, one of the accepted Delphi / BCB keys (like D5, D2007 or BCB6). For design time packages there is usually a "ds" or similar in the name, which is otherwise identical to that of the runtime package.