Install components and IDE extensions into the Delphi IDE
In this tip I draw together in one place information on how to install components into the Delphi IDE for various Win32 versions of Delphi. The notes also cover how to install IDE extensions or make simple units available in design time packages. The tip assumes you are installing source code, not pre-compiled units or packages.
Before you start copy all the files needed to install the component, IDE
extension or unit into some suitable location on your hard disk.
Files should included .pas files and any associated
.dfm, .res, .dfm and, for
components, .dcr files.
You then proceed differently for different versions of Delphi:
Installation with Delphi 2005 and later
To add a component or IDE extenstion to the IDE it must be included in a design package. You can either create a new design package or add the component to an existing one. These instructions assume you will be installing into an existing package. See the Delphi help for information on how to create a new package. If your component came with its own package, use that.
-
Open the required package. Select File | Open
menu and choose a suitable package source file (
.dpkextension. You may decide to install into the "user" package that is often supplied with Delphi. -
The selected package (with
.bplextension) will now be displayed in the Project Manager. If the package has not been installed yet right click the.bplentry in the Project Manager and select Install. Dismiss any resulting message dialog. -
Now right click the
.bplentry again and select Add. The "Add" dialog box will be displayed. Click the dialog's Browse button then select the.pasfile(s) to be installed from the resulting file open dialog. The full path to the file(s) should now be displayed in the "Add" dialog's Unit file name edit box. Click OK to add the file to the package. -
Back in the Project Manager, check that the
.pasfile(s) you added appear under the package's "Contains" node. Also check that any associated.dcrfiles also appear.
If any.dcrfile does not appear you need to display the package's source file and add the line {$R FileName.dcr} to the code between the package name and the requires section. To display the source right click the package name in the project manager and select View Source. -
If you are installing an IDE enhancement, like a property editor, make
sure the
designidepackage is included in the package's requires section. -
Now right click the
.bplentry again and select Compile. If no errors are displayed the package has been recompiled correctly. When adding components a message should be displayed indicating that the component has been registered and it will appear in the appropriate tab of the Tool Palette. - Close the package project using the File | Close menu item. Accept any prompts to save the package project.
-
If you wish you can now delete the
.pasfile. Other files must be left in place.
Installation with Delphi 3 to 7
To add a component or IDE extenstion to the IDE it must be included in a design package. You can either create a new design package or add the component to an existing one. These instructions assume you will be installing into an existing package. See the Delphi help for information on how to create a new package. If your component came with its own package, use that.
-
Open the required package. Select File | Open menu, make sure
that files with the
*.dpkextenstion are being displayed, and choose a suitable package source file. You may decide to install into the "user" package. This is found in theLibsub-directory of your Delphi installation and is nameddclusr.dpkordclusrXX.dpkwhereXXis a version number. - The package editor will now be displayed. If its Install button is not disabled then click it to ensure the package is installed into Delphi. Dismiss any resulting message dialog.
-
Now click the package editor's Add button. The "Add"
dialog box will be displayed. Click the dialog's Browse button
then select the required
.pasfile(s) from the resulting file open dialog. The full path to the file should now be displayed in the "Add" dialog's Unit file name edit box. Click OK to add the file(s) to the package. - Click the package editor's Compile button. The package will now be recompiled and, If no errors are displayed the package has been recompiled correctly. When adding components a message will be displayed indicating that the component has been registered and it will appear in the appropriate tab of the Tool Palette.
- Now close the package editor window. You will probably be prompted to save the package. Agree to this and the package source file will be updated with information about the new component.
-
If you wish you can now delete the
.pasfile. Other files must be left in place.
Installation with Delphi 2
- Select the Component | Install menu option to display the "Install Components" dialog box.
- Click the Add button to display the "Add Module" dialog box.
-
Click the Browse button and choose the required
.pasfile from the resulting standard file open dialog box and click Open. - This returns you to the "Install Components" dialog box. Click OK here to rebuild the component library. If you were installing component it should now appear on the component palette.
-
If you wish you can now delete the
.pasfile. Other files must be left in place.
| Author: | Peter Johnson |
|---|---|
| Added: | 2009-10-06 |
| Last updated: | 2010-02-22 |
