views:

480

answers:

3

I was doing some customization to my forms, since I want them with some published properties appear on Object Inspector. I've done the simple way: create the form, put it on object repository, created a package to register it with RegisterCustomModule.

I would like to know if anyone have a way to put it on Object Repository in a automated way (I want to simplify the installation of this on other machines).

I googled, but either nobody wrote something about it or I didn't find the correct keywords...

+1  A: 

Since nobody else is giving answers, let me tell you would I would try.

I would go to the registry and export a copy of the Delphi branch before registering the form in the repository, then register and save another copy, and compare them in a difference viewer. If you're lucky, the information is stored there and you can deduce what registry entries you need to add to register... you may be able to just ship a .reg file.

BTW, that is how we configure our Delphi installations at the company I work at. Keeps everything the same...

If it doesn't work, the config is probably stored somewhere in the file system. You could employ similar forensic methods to attempt to reverse engineer how the registration is encoded there...

Jozz
Seems I'll have to do this...... Hmmm...
Fabricio Araujo
+1  A: 

If it's on a local network you could have each developer use the same Shared Repository (Environment Options) and install the design package in their IDE.

TOndrej
Actually I'm talking about machines that's not always connected. Actually a notebook and / or office machines. So maintain a Shared Repository is not an option this time.
Fabricio Araujo
+2  A: 

You have to do two things first:

  1. Add the file you want in the repository folder (for Delphi 2007, it's $PROGRAMFILES$\CodeGear\RAD Studio\BDS\5.0\ObjRepos).
  2. Update the BorlandStudioRepository.xml file in the same folder. You can look at it's current contents to see what needs to be added.

Then create the registry entry under HKCU\Software\CodeGear\BDE\5.0\Known IDE Packages\Delphi to register your .BPL with the IDE.

Ken White
The missing pass, seems, it's finding in what folder the repository is. But I can devise it. Thanks.
Fabricio Araujo
I showed you where it is; it's the same for earlier Delphi versions, except you have to replace the obvious. You can get it from the Windows registry too using TRegistry. Enumerate the keys under HKCU\Software\Borland to look for earlier versions, HKCU\Software\CodeGear\BDS for later ones.
Ken White
It's what I tried to say in my prior comment, sorry for not being clear.
Fabricio Araujo