Archive: Calculating section size


Calculating section size
hello, I'm making a restore utility for some files that i am going to burn to a DVD, along with an auto-running installer. At the moment, I'm using Addsize in each of the sections to indicate the size of the files being copied.

I need to be able to get the NSIS installer to dynamically find the file sizes for each of my components (one file per component). I've seen people talk about using SectiongetSize, but I havent got a clue how to call this, or even if this is what I need. I will post my script below to show what i am trying to achieve.


SectionSetSize can dynamically set a section size. Something like the following should do:

Section "install this" id
#...
SectionEnd

Function .onInit
IfFileExists $EXEDIR\blah.exe 0 +3
SectionSetSize ${id} 500
Goto +2
SectionSetSize ${id} 2000