Archive: Updating Space Reguired label on Uncheckin installation component


Updating Space Reguired label on Uncheckin installation component
Hi,

i am a newbie to NSIS. I have the following problem.
I have an ActiveSetup via http download. On the components page i have 1 section that is selected by default. Now, the Space Required label shows 6 MB in total. This is total number of space required for the normal file and the mp3 file.

If the user unchecks this section, the SpaceRequired label should display 66 KB for the files only with out the mp3 file.

If tried so many stuff from the forums and archivs but i didnt get it to work.

//This is code i currently try to work with
Section "Download " SEC01
Call "myGUIInit"


!ifdef SelectSection SEC01
SectionGetFlags ${SEC01} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
IntCmp $R0 ${SF_SELECTED} show
addsize 600
!endif

show:
SectionGetFlags ${SEC01} $R0
IntOp $R0 $R0 & ${SF_UNSELECTED}
addsize 66

//the download code and other stuff

SectionEnd


AddSize is compile time. Use SectionSetSize and SectionGetSize instead.