Delphi – finding out the design-time package name of a unit
Posted by jpluimers on 2009/04/24
Somehow I keep forgetting this ‘be aware though’ part below, hence this blog post :-)
When you are developing packages, sometimes you need units that are part of the VCL/RTL source tree.
Normally when compiling such a package, Delphi suggests the depending VCL/RTL package to add to your required package list.
However, that does not always work, especially with design-time packages (those start with ‘dcl’ in stead of ‘vcl’).
The last time I bumped into this was when I developed a package that needed the MessageDigest_5
unit.
The easiest way to find out which package to add to the required package list, is to use ModelMaker , aka MMX: a great Delphi productivity tool well worth its price (only a mere EUR 99!).
MMX adds a Tools submenu (shown on the right), which has the “package classes report” option.
When you select that, you get a list of all classes and interfaces that are part of any loaded package:
So this is a quick way to find that the MessageDigest_5
unit is in the dclsoap100
package.
Another way to find out is to add the VCL/RTL unit you need to the package you are developing, then try to install that package.
Upon installing, you then get an error message like this (I was developing the MD5Package
package):
---------------------------
Error
Cannot load package 'MD5Package.' It contains unit 'MessageDigest_5,'which is also contained in package 'dclsoap100'
OK Details >>
This gets you the RTL/VCL package you need to add to your required packages list: dcpsoap100
.
Be aware though:
you must add required packages without a version number (because they change with each new Delphi version), so in stead of adding dclsoap100
you must add dclsoap
to the required list of packages.
–jeroen
Leave a Reply