adding design packages (bpls) in delphi IDE (automatically) - delphi

I am trying to automate Delphi Environment regeneration we have bunch of bpl-s that has to be installed in a fresh delphi.
I need to automate this somehow from Delphi 5 it would be : Components->Install Packages->Add...
Any ideas?
Thanks.

The list of installed IDE packages is stored in registry, so you could update it there.
The actual location depends on Delphi version, on my machine for D7 it's:
HKEY_CURRENT_USER\Software\Borland\Delphi\7.0\Known Packages
and for D2007 it's
HKEY_CURRENT_USER\Software\Borland\BDS\4.0\Known Packages

Related

jedi code library installer cannot find Delphi XE2

I migrated all my components from one pc to another. On the old pc the Jedi JCL installer will correctly detect a Delphi XE2 installation and will show its tab, but on the new pc it does not (it only recognizes a Delphi 7 installation). Notice that on the new pc when I run the jcl install.bat it will use the Delphi XE2 compiler to create the installer exe.
What step can I do to have this sorted out?
The version of Jedi is the latest one at the moment that is 3.47
Problem solved by reinstalling Delphi XE2 (Full installation with registry). The problem was that I had copied the registry keys from my other pc into the new pc. The problematic key was the library key. For some reason the JCL installer did not like the paths in the library, most probably could not find the paths it expected.

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.
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.
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.

Delphi JEDI installer build 4197 does not recognize Delphi 2007

After having installed XE2 I felt it would be a good idea to update Jedi JCL/JVCL
However, the installer does not recognize/show Delphi 2007 as an option any longer, only Delphi 2010 and XE2
Any way to fix that? I am guess it uses registry somehow?
I can reproduce the problem with the file you linked. JCL installer 2.31 is not detecting my Delphi 2007 IDE. I have XE, XE2, 7, and 2007 and it will not recognize 2007 when I unzip and run the installer.
The Solution on my system was simple: Run clean.bat, and try the JCL install again.
Your suggestion of wiping the folder out and replacing it with a clean fresh copy, combined with running clean, and with deleting all existing JCL/JVCL bpls from your BPL folders, might be required too.

What windows registry key I must use to install a delphi expert?

I need to create a installer for a Delphi IDE expert, So I found these two registry keys
HKEY_CURRENT_USER\Software\Embarcadero\BDS\x.0\Known IDE Packages
HKEY_CURRENT_USER\Software\Embarcadero\BDS\x.0\Known Packages
Which is the recomended key to install/Uninstall a Delphi IDE Expert?
Known IDE Packages is for packages that are used by the IDE itself (such as experts).
Known Packages is for packages that are used by projects (such as components and their design-time editors).

How to install a Delphi component package from the command line?

I am preparing an installer (Inno Setup) to install my component package into Delphi XE without having to manually fiddle in the IDE.
How do I install a Delphi component package (for example, MyComponent.bpl) into Delphi without having to manually do it via the 'Install Packages' menu item? Is it a registry key?
Yep, registry is your friend.
Packages:
HKEY_CURRENT_USER\Software\<Borcadero>\BDS\<version>\Known IDE Packages
HKEY_CURRENT_USER\Software\<Borcadero>\BDS\<version>\Known Packages
IIRC Known IDE Packages is for IDE extensions, and Known Packages for components (on the Tool Palette)
Library paths are in:
HKEY_CURRENT_USER\Software\<Borcadero>\BDS\<version>\Library
Note:
<Borcadero> stands for Borland, CodeGear or Embarcadero, depending on your Delphi version.
<version> is the IDE version, ie 7.0 for Delphi 2010.

Resources