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

有帮助吗?

解决方案

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

其他提示

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top