tags:

views:

349

answers:

3

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  A: 

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).

François
Actually it is common to suffix the Delphi compiler version to the packages, not the package's own version. There is also some magic project settings (which I currently can't look up because I have no Delphi at hand), that automates this and ensures that the corresponding .dcp-File does not have that suffix. See also the Delphi wiki on packages: http://delphi.wikia.com/wiki/Creating_Packages
dummzeuch
That is precisely what I meant. I updated my answer.
François
What does "dcl" stand for?... anyone know for sure?
Jamo
I'm not sure but there was an explanation floating around as "Design Component Library"
François
A: 

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.

mghie
The prefix for design-time packages is dcl in the VCL and for most of the 3rd party libraries I know.
François
+1  A: 

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.

dummzeuch