The only way to "pre-compress" some part of your installer is to make a separate install script for just that subcomponent, and include the compiled output of that script in your main script, along with a [Run]
or PrepareToInstall
entry to execute the sub-install silently as part of your main install. (You will most likely want to use the nocompression
flag on this file in your main script, or you will lose most of the speed benefits.)
Note that this will incur some additional overhead as you are essentially storing a duplicate of the installation engine this way, so it is typically only worthwhile for larger subcomponents. You will also have to decide whether uninstall data should be kept separate or together with your main application, and set AppId
s and uninstall data paths accordingly.
In some cases (particularly for runtimes that the user might already have installed from other applications) you might want to consider downloading on demand instead of embedding the subinstall inside, which will reduce the size of your installer (but require an Internet connection at install time). Download functionality is not built in to Inno but there are a few plugins that provide it.