Pregunta

I'am using Inno Setup for creating setups of my Java app. The setup consists of the app (JAR file) and the Java Runtime (runtime directory with thousands of files). Compression of the runtime takes a long time (some minutes) but the runtime doesn't changes for any new app version.

Is it possible to compress a directory only ones?

¿Fue útil?

Solución

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 AppIds 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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top