Archive: Updating size during installation


Updating size during installation
I am working on building an installable thru NSIS... The application is based on Java technology. The install needs to manage the following steps:

1. Checks if the Java Runtime (JVM) is available or not
2. If not, updates the size of the installer on the fly to update the user about the size required for installation.
3. Goes for downloading of the JVM from a central server, and installs it silently.

I would like to have a way by which I can update the size required in destination drive. I have tried using macro but could not do so...

Can anyone help me on this..

Thanks in advance...


Use AddSize on a hidden section and enable/disable this section according to your check of Java.

Example script attached.


Thanks for your response.

I have tried with the script you have sent, just generated the java.exe using makensis but still could not get it work... (the autosizing)... then I tried with updating value of SECTION_OFF and set to 0x00000000, and it worked...

thanks again, It is really appriciated.
:up:


If you are using NSIS 1.98 SECTION_OFF should be defined as 0x7FFFFFFF.


I have just started using 2.0a7 verison as it also supports multilingual feature, which i needed. Do you still think that it's problematic to use SECTION_OFF defined as 0x00000000?


In 2.0a7 SECTION_OFF should be the same as in 1.98. It is recommended you upgrade to the latest version from CVS, a lot of bugs have been fixed, and a lot of features haev been added.

To get the latest veresion from the CVS have a look at the FAQ.

It's not wise to use 0 as SECTION_OFF because it will override other settings such as the install type in versions before b0 (the CVS version) and some other settings to.