Question

Is there any way to modify the required disk space option in install4j?

In my particular use case I have some optional/downloadable components which are actually archives and get extracted in the installation location if selected. Unfortunately I can't just set the contents of the archives themselves as optional components instead of the archives.

The installer shows the disk space required for the base install and the selected components, but I need to update that so the optional components get added twice (once for the zip which gets downloaded and a second time for the actual space used when extracted).

Was it helpful?

Solution

The "Install files" action has an "Installation size calculator" property where you can modify the default size.

OTHER TIPS

For the disk space check, add a "Run script" action to the "Startup" node of your installer and set its script to

if (SystemInfo.getFreeDiskSpace(context.getInstallationDirectory()) < 2000000000) {
    Util.showErrorMessage("You need at least 2 GB of free memory");
    return false;
}
return true;

Then, set the "Failure strategy" property of the action to "Quit on failure":

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top