Working with Packages and Components - Overview

From RAD Studio
Jump to: navigation, search

Go Up to Working with Packages and Components Index

A package is a special dynamic-link library used by applications, the IDE, or both. Run-time packages provide functionality when a user runs an application. Design-time packages are used to install components in the IDE and to create special property editors for custom components. A single package can function at both design time and run time, and design-time packages frequently work by calling run-time packages. To distinguish them from other DLLs, package libraries are stored in files that end with the .bpl (Borland package library) extension.

Like other run-time libraries, packages contain code that can be shared among applications. For example, the most frequently used VCL components reside in a package called vcl . Each time you create a new default VCL application, it automatically uses vcl. When you compile an application created this way, the application's executable image contains only the code and data unique to it; the common code is in the run-time package called vcl280.bpl. A computer with several package-enabled applications installed on it needs only a single copy of vcl280.bpl, which is shared by all the applications and the IDE itself.

Several run-time packages encapsulate VCL components while several design-time packages manipulate components in the IDE.

You can build applications with or without packages. However, if you want to add custom components to the IDE, you must install them as design-time packages.

You can create your own run-time packages to share among applications. If you write Delphi components, you can compile your components into design-time packages before installing them.

See Also