Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatic building and installing Delphi components

So, my Delphi component is functional and working, aside few details yet to cover. What I would like is to create a setup (Inno setup) that would automatically install my component into user's Delphi/C++ Builder IDE. I presume I must use delphi command line compiler, but how?

Thank you.

like image 435
Tracer Avatar asked Feb 19 '23 00:02

Tracer


2 Answers

Unfortunately Delphi IDE does not support automated component installation at all. IMO, that is very big problem since component architecture is so important in Delphi.

You can build your package from command line (using MSBuild or DCC) but you cannot install it to IDE. To install your package you should write your own installer that builds you package, copies compiled files and updates Windows registry. Note there is no official documentation how to write such an installer, but you can take Jedi (JVCL) installer code as an example.

There are also 3rd party tools that automate component installation, for example 'lazy builder', that may be interesting to you.

like image 159
kludg Avatar answered Feb 28 '23 13:02

kludg


It's not too hard, just messy. You need to compile a BPL for each Delphi version that you want to target and then your installer puts this BPL into a folder of your choosing (often users,public etc). This folder location is then written as a registry key under the relevant Delphi Installed Packages node. Lo when you run Delphi your components appear as if you had used the manual install packages option.

like image 33
Brian Frost Avatar answered Feb 28 '23 12:02

Brian Frost