Automatically build and install Delphi components

So my Delphi component is functional and works, except for a few details that have yet to be covered. I would like to create a setup (Inno setup) that will automatically install my component in the Delphi / C ++ Builder user environment. I assume I should use the delphi command line compiler, but how?

Thanks.

+4
source share
2 answers

Unfortunately, the Delphi IDE does not support the automatic installation of components at all. IMO, this is a very big problem, since component architecture is so important in Delphi.

You can create your package from the command line (using MSBuild or DCC), but you cannot install it in the IDE. To install a package, you must write your own installer that will create your package, copy the compiled files and update the Windows registry. Please note that there is no official documentation on how to write such an installer, but you can take the Jedi Installer Code (JVCL) as an example.

There are also third-party tools that automate the installation of components, such as the ' lazy constructor ', which may be of interest to you.

+7
source

It's not too complicated, just dirty. You need to compile a BPL for each version of Delphi that you want to target, and then your installer places this BPL in the folder of your choice (often users, public, etc.). This folder location is then written as a registry key to the corresponding Delphi Installed Packages node packages. Lo when you start Delphi, your components look as if you used the option to manually install packages.

+1
source

Source: https://habr.com/ru/post/1437069/


All Articles