Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you determine from a BPL if it is design time only

We build all our packages to the same output directory.

The directory includes both design time and runtime packages.

Looking at the resulting BPL's is there a way to determine that a packages is Design Time only?

I want to be able to filter these out of my deployment list, as I am building with runtime packages.

In the past I have built custom lists, of the run time packages. I am looking for away to automate this process.

We are using Delphi XE if there is a version specific answer.

like image 496
Robert Love Avatar asked May 04 '11 22:05

Robert Love


2 Answers

Use GetPackageInfo and check for pfDesignOnly in the Flags parameter. Or, if you'd like to skip the unnecessary enumeration of contained units and required packages, have a look at PackageInfoTable in SysUtils (which is, unfortunately, hidden in the implementation section).

like image 76
Ondrej Kelle Avatar answered Nov 09 '22 03:11

Ondrej Kelle


AFAIK, not externally without analyzing the imports of the BPL to see if it has any dependencies on the design-only IDE packages (eg., DesignIntf). You can do this with TDump or DependencyWalker. You can also use TOndrej's suggestion if you want to try and load the packages with an app.

A quick check of one of the design only packages on my system with DependencyWalker shows this:

DependencyWalker image

The usual solution to this issue (as you can see in the Virtual Treeview package in the image) is to add a D suffix to design-time packages; some component sets (like some of the TurboPower ones, IIRC) use an R suffix for runtime packages as well.

like image 30
Ken White Avatar answered Nov 09 '22 03:11

Ken White