InnoSetup Component Installer

   Over the years numerous users of VSTools have complained about the difficulty installing the packages into their favorite IDE, especially C++Builder. The prospects of creating an installer that works on all versions of Delphi and C++Builder seemed daunting but earlier this year I found a simple installer program that was menu driven, QSetup. For single developers they offered a free licence. Armed with this installer program myself and a few other brave BCB developers created installers for ThemeManager, VirtualTreeview and VSTools. They worked very well with only a few issues popping up. I don't recall the last time an issue with installation was reported.

  Well all good things must come to an end and QSetup dropped their free licensing offer. At the time Jordan Russell's InnoSetup did not have the necessary hooks to accomplish what I needed, mainly in the uninstall area. With the latest beta release of InnoSetup 5.04 that has changed that. I have now created a script and a DLL that will allow a generic way of creating an setup for any component set.

  In order to use the script it is worth downloading ISTool to add a graphical front end to the InnoSetup script. The instructions presented here will be shown using this tool.

  The first thing in using the component setup script is the directory structure. There was a lot of discussion about the best directory structure for a component and the following was adopted, and must be adherend to to use this installer script and DLL.

Basic folder structure for Component installation.

  The structure is as follows:

  • CBuilder: Contains the *.bpk package files and *.cpp files for the BCB compile

  • Delphi: Contains the *.dpk package files for the Delphi compile.
  • Demos: Contains sub-folders that contains the Demos for the package, its structure is up to you
  • Design: Contains the Designtime *.pas file(s). These files usually contain the unit that actually registers the components with the IDE and any designtime editors created to use with the component in the IDE. This forces the component to split its runtime and design time code per the Borland licence agreement.
  • Docs: Contains any documentation for the component. The component licence file is usually located here that is shown during the setup.
  • Include: Contains any necessary Include files for the compile
  • Resources: Contains assorted resources distributed with the component set, (e.i. images)
  • Source: Contains the runtime *.pas files

  Of the above structure the only ones that must exist and contain the described files are:

  • CBuilder

  • Delphi
  • Design
  • Source

  The others are recommended.

We can now start to create our installation executable

  Script Source and DLL Source


mustangpeak.net

  Last Modified on: