As a Delphi developer, you’ve probably used Delphi packages before. Maybe you have also written your own packages. To simplify installation, we use our own Inno Setup script at GDK Software for the installation of these packages. This allows us to build and install Delphi packages via a setup tool, instead of building the packages ourselves. The biggest benefit is the ease of installation; you don’t have to specify the search paths and compile and install the packages yourself.
Below is a short explanation of the script. If you want to get started you can head directly to the Git repository and download the script.
To use the script you first need to clone the Git repository or download the two required files (CompileSource.bat and Setup script.iss).
The next step is to configure the Inno Setup script so that the necessary Delphi files are added to the installer. To do that, add all the Delphi files (including the .dpk and.dproj) to the [Files] section of the script. The destination directory of all the source files must be in a subfolder of \Sourcecode\Package\.
Make sure you also change the defines:
After you have changed these lines, it is possible to compile and test the script. The Inno Setup script uses the CompileSource.bat batch file to actually compile the specified package using MSBuild.exe. To debug or test the installation, change the last line of batch file from “rem pause” to “pause”.
Thanks to John Kouraklis for the first version of the script. You can find the original post and version here.