Hi,
Sally said:
I have written a gui application for windows os using Borland C++ Builder.
Does anybody know how I would go about automating the installation process -
for instance, I would like my executable to start off compressed - I would
then like the installation process to 1. automatically create a new
directory, uncompress the archive into the new directory, 2. automatically
put a shortcut onto the users desktop. I have noticed this seems to be the
norm for installing professional software, and I just wondered how it's
done.
Most people use an install library. Modern windows os'es and usually
development environments also have some install support stuff like .msi and
inf routines. I don't know Borland, doesn't it have any install support
software?
However you can write your own custom program as I did myself. But be
prepared, this is a project on its own. You have to ask the os how much
diskspace there is use the browsefolder component to let the user choose a
directory. Of course the default one should be read from the registry. You
also have to take in account bugs on older os's (on old win95 system's the
diskspace is sometimes erroneously reported as 2Gig). Then you must get the
desktop directory from the registry and use a Com interface to create a link
to your executable.
After that get the directory of the start menu, again use the browsefolder
component to let the user choose a subdir of the startmenu and again create
a link.
Finally you have to unzip the stuff from your executable (which might be
created by add a zlibbed packed file behind your executable). And move
everything to the correct place.
And yes your are not ready yet you should also supply an uninstall program
for the user and add that to the software applet (just an entry in the
registry), so remember everything you did and all things created and ONLY
remove those.
Then test it on every OS you want to install, if you won't do that it
probably won't work.
There are however several programs that will do this for you, a google
search reveals some.
I took the first option for my mastermind game. Once you have written the
stuff it should be of course reusable for any other software you might
create (I actually usually won't write install programs for professional
programs, I usually install them myself and that's it ;-) ).
Regards, Ron AF Greve
http://moonlit.xs4all.nl/mami100.exe