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

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

Related

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.

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.

How to Install a Delphi 2009 Component Package in Delphi 2010 ( UniSynEdit Package )?

I downloaded the SynEdit Unicode Vervion ( UniSynEdit ) , it contains packages of D5-D2009 , but i want to install it in Delphi 2010 ! , I loaded D2009 Package in D2010 IDE , It compiles successfully but there is no Menu item for Installing Package ! :
How can i install it in Delphi 2010 ? ( Notice that it compiles successfully )
thanks a lot ...
Looks like you've got the runtime package. There should be a separate design-time package, and that's the one you want to install.
Don't do that, especially if you're going to use runtime packages. Make a copy of the packages, rename them properly, and then install them. If you use runtime packages and distribute them, the risk is you may overwrite 2009 packages with 2010 ones on someone's system - and they wouldn't be compatible.

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

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

Installing multiple library versions in Delphi / C++Builder

How I can install multiple versions of a library in Delphi or C++Builder? For example, I might want to be able to develop the next version of our app using the current versions of JCL and JVCL while still being able to compile the release version of our app using whatever version of JCL and JVCL were tested for that release.
Using more than one version of a library is easy with libraries like Boost, since those are just header files and library / DLL files that I can put wherever I want, and so I can simply point my project files at the appropriate library directories. However, since libraries like JCL and JVCL try to install themselves into the IDE, I'm not sure how to configure different projects to use different versions without it turning into an unmanageable hack.
(I'm still not entirely familiar with how Delphi manages components and projects - most of my experience is in C++ - so this may be part of my problem.)
We had the same problem, supporting older versions compiled with different versions of the components. Our solution was/is to use the IDE's " -r " command line option. With this switch it is possible to use different library paths and packages (at the same time). The only problem that we encountered with this approach was that some of us regularly tried to open an older project version in the wrong IDE instance.
[Old version 1.0] bds.exe -rVersion1.0
[trunk version ] bds.exe
How to setup those:
Start your IDE as you are used to it.
Install everything you need for "Version 1.0"
Close the IDE
Install all (old) packages (JCL/JVCL/...)
Start regedit.exe
Export the registry key HKCU\Software\CodeGear\BDS\5.0 to a *.reg file
Start nodepad.exe and do a search&replace in the *.reg file for "CodeGear\BDS\5.0" and replace it with "CodeGear\Version1.0\5.0"
Import the *.reg file (by double clicking it in the Windows Explorer)
Create a copy of your RAD Studio 2007 startmenu link and change the command line to include the "-rVersion1.0" key.
Now you have two IDE configurations that are equal. You can now change the IDE that doesn't use the " -r " command option to your trunk version's packages.
When you install all the packages, you must not use the default BPL and DCP directories unless the different package versions use different file names (like the JCL and JVCL do).
CodeGear\BDS\5.0 = Delphi 2007
CodeGear\BDS\6.0 = Delphi 2009
Borland\BDS\4.0 = Delphi 2006
Borland\Delphi\7.0 = Delphi 7

Resources