shiva21
15th March 2011 10:07 UTC
Modify the Space Required
I need to change the Space Required option, which we get while installation to a space which I determine from a INI file.
I tried AddSize, but issue with AddSize is that it doesn't take a variable as input.
How can I resolve it?
-Shiva S
Afrow UK
15th March 2011 11:30 UTC
SectionSetSize
Stu
shiva21
15th March 2011 12:52 UTC
I have added following code.
SectionGetSize $R1 $5
IntOp $5 $5 + $4
SectionSetSize $R1 $5
$R1 is the sectionId, $4 is the size need to be set.
Even after doing the same I see Space Required: as 0.0KB
-Shiva S
MSG
15th March 2011 17:13 UTC
Why is your sectionID in a variable? Are you enumerating all sections, or something like that?
As for the space being zero, at which time are you setting the section size? In .onInit?
shiva21
15th March 2011 17:27 UTC
I create section dynamically, (i.e.) while executing only I determine the sections, thats why the sectionId is in variable.
I set the size for each section during .onInit
-Shiva S
MSG
15th March 2011 19:19 UTC
- Are you sure your dynamic sections are enabled AND selected properly?
- Use MessageBox to verify the value you're setting the size to
- Use sectiongetflags or something similar to verify the section ID's you're using.
- I don't know if NSIS automatically uses incrementing numbers from zero for section IDs. Better to set them to 0, 1, 2... manually when you define them.