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
Modify the Space Required
6 posts
SectionSetSize
Stu
Stu
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
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
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?
As for the space being zero, at which time are you setting the section size? In .onInit?
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
I set the size for each section during .onInit
-Shiva S
- 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.
- 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.