views:

234

answers:

3

My computer crashed recently. We have a Delphi app that takes a lot of work to get running.

One of my co-workers has it all installed still. Is there a way to copy the stuff stored in the palette? And the library paths?

I am using Delphi 5 (I know it is very very very old)

+4  A: 

That information is stored in the Registry. I don't know exactly how Delphi 5 does it, but try looking for a key called HKEY_CURRENT_USER\Software\Borland\Delphi\5 or something like that. You'll find all the registration information under that key, including a list of installed packages. You can export the keys to a registry file, copy it to the new computer and install it.

Standard disclaimer: Mucking around in the registry manually can be risky if you don't know what you're doing. Be very careful, and if this solution causes your computer to crash, your house to burn down, or demons to come flying out your nose, it's not my fault.

Mason Wheeler
+1 for the demons reference :)
Vaccano
My D5 install has stuff under HKLM also. I would suggest exporting and importing Software/Borland from both HKLM and HKCU. Good luck with the demons. Of course this assumes you are going to install everything in the same places that your colleague does.
frogb
Demons aside, I will give this a go.
Vaccano
@frogb: The exported reg files are text files. One can (carefully!) use search and replace inside them to adjust paths etc.
Ulrich Gerhardt
+3  A: 

Try CNWizards which has an export functionality for your IDE settings. You can use the same tool restore them on the new machine. We use it to get the same settings on every development machine. In that way we can ensure that all builds are the same, regardless of who built it.

Brave Cobra
Sounds cool. Will it "install" VCL libraries too, assuming that the binaries are copied over to the same relative location?
Chris Thornton
All you have to do is make sure that your files are at the same location as on the source machine (through copy or installer), then, yes, it will "install" them.
Brave Cobra
A: 

Based on my experience of having done this a few times(!), the most important registry keys are:

HKEY_CURRENT_USER\Software\Borland\Delphi\5.0\Known Packages
HKEY_CURRENT_USER\Software\Borland\Delphi\5.0\Library

and possibly

HKEY_CURRENT_USER\Software\Borland\Delphi\5.0\Known IDE Packages

and maybe

HKEY_CURRENT_USER\Software\Borland\Delphi\5.0\Palette
HKEY_CURRENT_USER\Software\Borland\Delphi\5.0\Palette Defaults

So long as you have done a standard D5 installation first.
It's easier/more reliable to let the IDE fill in the other bits as you start using it and you change options as appropriate. Some component packages, eg madExcept, DevExpress etc are often best re-installed using their own installers anyway.

Unless you're going to have multiple users on the same machine using Delphi then the HKLM stuff isn't really all that important - I don't think.

As a related aside - I have learned that a good way to handle this is to build a FinalBuilder script (or similar) to set up my Delphi environment each time I decide to use a new machine/installation. I copy/download/checkout (which can be done in FB too) all package source then use FB to compile it, copy it, create dirs, and fill in the appropriate registry keys etc. I always get a consistent environment and makes it much easier to rebuild individual components or packages as and when they get upgraded too. The items can also be put into the script in 'dependency order' so that you know to re-compile a dependent package if something else changes. I now have a single FB sciprt that builds D5, D2007, D2009, D2010 environments and packages of all my main components, all depending on which compiler(s) I'm interested in which I indicate by a simple variable. Well worth it.

shunty