-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-to-ide.html
171 lines (159 loc) · 11.4 KB
/
install-to-ide.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
---
title: How To Install Components Into Delphi IDE
meta-desc: "Detailed information about how to install components, classes and IDE extensions into different versions of the Delphi IDE."
---
<h1 roll="heading">Install components, classes and IDE extensions in Delphi</h1>
<p>
This page presents 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.
</p>
<p class="alert alert-info glyph">
It is assumed you are installing source code, not pre-compiled units or packages.
</p>
<p>
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
include <code>.pas</code> files and any associated <code>.dfm</code> and
<code>.res</code> files and, for components, <code>.dcr</code>
files.
</p>
<p>
You proceed differently depending on the version of Delphi you are using. Click on the appropriate section below to display the relevant instructions.
</p>
<div class="accordion">
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="d2005-heading">
<h3 class="panel-title">
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#d2005" aria-expanded="false" aria-controls="d2005">Installation with Delphi 2005 and later</a>
</h3>
</div>
<div id="d2005" class="panel-collapse collapse" role="tabpanel" aria-labelledby="d2005-heading">
<div class="panel-body">
<p>
To add a component or IDE extension 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.
</p>
<ol class="wide">
<li>
Open the required package. Select <em>File | Open</em> menu and choose a suitable package source file (<code>.dpk</code> extension). You may decide to install into the "user" package that is often supplied with Delphi.
</li>
<li>
The selected package (with <code>.bpl</code> extension) will now be displayed in the Project Manager. If the package has not been installed yet right click the <code>.bpl</code> entry in the Project Manager and select <em>Install</em>. Dismiss any resulting message dialogue.
</li>
<li>
<p>
Now right click the <code>.bpl</code> entry again and select <em>Add</em>. What happens next depends on the version of Delphi.
</p>
<ul>
<li>
For Delphi 2009 and earlier the "Add" dialogue box will be displayed. Click the dialogue's <em>Browse</em> button then select the <code>.pas</code> file(s) to be installed from the resulting file open dialogue. The full path to the file(s) should now be displayed in the "Add" dialogue's <em>Unit file name</em> edit box. Click <em>OK</em> to add the file(s) to the package.
</li>
<li>
For Delphi 2010 and later a simple file dialogue box will open from where you can choose the required <code>.pas</code> file(s). Just press <em>OK</em> to add the file(s) to the package.
</li>
</ul>
</li>
<li>
Back in the Project Manager, check that the <code>.pas</code> file(s) you added appear under the package's "Contains" node. Also check that any associated <code>.dcr</code> files also appear. If any <code>.dcr</code> file does not appear you need to display the package's source file and add the line <kbd>{$R <em>FileName</em>.dcr}</kbd> to the code between the package name and the <var>requires</var> section. To display the source right click the package name in the project manager and select <em>View Source</em>.
</li>
<li>
If you are installing an IDE enhancement, like a property editor, make sure the <code>designide</code> package is included in the package's <var>requires</var> section.
</li>
<li>
Now right click the <code>.bpl</code> entry again and select <em>Compile</em>. If no errors are displayed the package has been recompiled correctly.
</li>
<li>
<p>
When adding components the package may need to be (re)installed. Right click the <code>.bpl</code> entry again and select <em>Install</em>. If all goes well a message should be displayed indicating that the component has been registered and it will appear in the appropriate tab of the Tool Palette (which will be named "DelphiDabbler" when installing one of the components from the <a href="{{ site.data.core.lib-link }}">DelphiDabbler Code Library</a>).
</p>
<p>
Should a message appear saying that the installation has failed you will need to un-install the package and try again. How this is done depends on the version of Delphi.
</p>
<ul>
<li>
In Delphi 2009 and earlier select the <em>Components | Install Packages</em> menu option then select the required package in the resulting dialogue box. Press the <em>Remove</em> button followed by <em>OK</em>. The package will now be uninstalled.
</li>
<li>
In Delphi 2010 and later the <code>.bpl</code> entry's context menu has an <em>Uninstall</em> option. Simply click that option to uninstall the package.
</li>
</ul>
</li>
<li>
Close the package project using the <em>File | Close</em> menu item. Accept any prompts to save the package project.
</li>
<li>
If you wish you can now delete the <code>.pas</code> file. Other files must be left in place.
</li>
</ol>
<h3>
Building for 64 bit Windows (Delphi XE2 and later)
</h3>
<p>
If the components etc. are compatible with 64 bit Windows add to a package as described above. Now add a Windows 64 bit target to the package project and rebuild.
</p>
</div>
</div>
</div> <!-- /.panel -->
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="d3-heading">
<h3 class="panel-title">
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#d3" aria-expanded="false" aria-controls="d3">Installation with Delphi 3 to 7</a>
</h3>
</div>
<div id="d3" class="panel-collapse collapse" role="tabpanel" aria-labelledby="d3-heading">
<div class="panel-body">
<p>
To add a component or IDE extension to the IDE it must be included in a design package. You can either create a new design package or add the component or extension 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.
</p>
<ol class="wide">
<li>
Open the required package. Select the <em>File | Open</em> menu option, make sure that files with the <code>*.dpk</code> extenstion are being displayed, then choose a suitable package source file. You may decide to install into the "user" package. This is found in the <code>Lib</code> sub-directory of your Delphi installation and is named <code>dclusr.dpk</code> or <code>dclusrXX.dpk</code> where <code>XX</code> is a version number.
</li>
<li>
The package editor will now be displayed. If its <em>Install</em> button is not disabled then click it to ensure the package is installed into Delphi. Dismiss any resulting message dialogue.
</li>
<li>
Now click the package editor's <em>Add</em> button. The "Add" dialogue box will be displayed. Click the dialogue's <em>Browse</em> button then select the required <code>.pas</code> file(s) from the resulting file open dialogue. The full path to the file should now be displayed in the "Add" dialogue's <em>Unit file name</em> edit box. Click <em>OK</em> to add the file(s) to the package.
</li>
<li>
Click the package editor's <em>Compile</em> button. The package will now be recompiled and, if no errors are displayed, the package has been recompiled correctly. When adding components a message may be displayed at this stage indicating that the component has been registered. In some cases it is necessary to click the <em>Install</em> button after compiling before the component will be registered and the message displayed. Any components will now appear appropriate tab of the Tool Palette (which will be named "DelphiDabbler" when installing one of the components from the <a href="{{ site.data.core.lib-link }}">DelphiDabbler Code Library</a>).
</li>
<li>
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.
</li>
<li>
If you wish you can now delete the <code>.pas</code> file. Other files must be left in place.
</li>
</ol>
</div>
</div>
</div> <!-- /.panel -->
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="d2-heading">
<h3 class="panel-title">
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#d2" aria-expanded="false" aria-controls="d2">Installation with Delphi 2</a>
</h3>
</div>
<div id="d2" class="panel-collapse collapse" role="tabpanel" aria-labelledby="d2-heading">
<div class="panel-body">
<ol class="wide">
<li>
Select the <em>Component | Install</em> menu option to display the "Install Components" dialogue box.
</li>
<li>
Click the <em>Add</em> button to display the "Add Module" dialogue box.
</li>
<li>
Click the <em>Browse</em> button and choose the required <code>.pas</code> file from the resulting standard file open dialogue box, then click <em>Open</em>.
</li>
<li>
This returns you to the "Install Components" dialogue box. Click <em>OK</em> here to rebuild the component library. If you were installing component it should now appear on the component palette (which will be named "DelphiDabbler" when installing one of the components from the <a href="{{ site.data.core.lib-link }}">DelphiDabbler Code Library</a>).
</li>
<li>
If you wish you can now delete the <code>.pas</code> file. Other files must be left in place.
</li>
</ol>
</div>
</div>
</div> <!-- /.panel -->
</div> <!-- /.panel-group -->
</div> <!-- /.accordion -->