We have an installer with multiple components that each has their own section. I'm trying to find out how our existing code actually sets the size of each section. We have 3 components that if checked/unchecked will update the "Space required" value on the components page.
The new section that I added currently does not update this value. What I can't seem to find in our existing code is where this actually gets set.
I did some research and found this post below where a user said "the size gets set automatically". But how? https://nsis-dev.github.io/NSIS-Forums/html/t-291064.html
I looked up the NSIS docs and saw some ways to set this including:
AddSize
SectionSetSize
You can even use CopyFiles
to set an estimated size of the files which then can be used by the installer.
I searched our NSIS directory for all of the methods above and could not get any results for AddSize
or SectionSetSize
. I also didn't see any instances of CopyFiles
where the developer added the estimated space in kilobytes. Is there some NSIS magic that sets this size automatically that I'm not aware of?
NSIS automatically sets the size of a section based on the File
instructions in that section.
AddSize
can be used if you know you are doing some external operation that also uses disk space. You can use SectionSetSize
at run-time if you only know the size when you are running on the end-users system after doing some type of calculation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With