Creating a Package
Go Up to Creating and Editing Packages
Refer to Understanding the structure of a package for more information about the steps outlined here.
To create a package in Delphi
- Choose File > New > Package - Delphi. The generated package appears in the Project Manager. The Project Manager displays a Requires node and a Contains node for the new package.
- To add a unit to the Contains clause:
- Right-click the Contains node in the Project Manager and select Add.
- In the Add Unit page, type a .pas file name in the Unit file name edit box, or click Browse to browse for the file, and then click OK. The unit you've selected appears under the Contains node in the Project Manager.
- You can add additional units by repeating this step.
- To add a package to the Requires clause:
- Right-click the Requires node in the Project Manager and select Add Reference.
- In the Requires page, type a .dcp file name in the Package name edit box, or click Browse to browse for the file, and then click OK. The package you've selected appears under the Requires node in the Project Manager.
- You can add additional packages by repeating this step.
- In the Project Manager, right-click your package and select Compile.
To create a package in C++Builder
- Choose File > New > Package - C++Builder.
- The generated package is displayed in the Package editor.
- The Package editor shows a Requires node and a Contains node for the new package.
- To add a unit to the Contains list, click the Add to package speed button. In the Add unit page, type a .cpp file name in the Unit file name edit box, or click Browse to browse for the file, and then click OK. The unit you've selected appears under the Contains node in the Package editor. You can add additional units by repeating this step.
- To add a package to the Requires list, click the Add to package speed button. In the Requires page, type a .bpi file name in the Package name edit box, or click Browse to browse for the file, and then click OK. The package you've selected appears under the Requires node in the Package editor. You can add additional packages by repeating this step.
- Click the Options speed button, and decide what kind of package you want to build.
- To create a design-time only package (a package that cannot be used at run time), select the Designtime only radio button.
- To create a runtime-only package (a package that cannot be installed), select the Runtime only radio button.
- To create a package that is available at both design time and runtime, select the Designtime and runtime radio button.
- In the Package editor, click the Compile package speed button to compile your package.
Note: You can also click the Install button to force a make.