Archive: AddSize can't take a variable? e.g. $1


AddSize can't take a variable? e.g. $1
Why can't AddSize take a variable? Is it really designed to only take hard coded numbers?

Am I just an idiot?

Push 1000
Pop $1
AddSize $1

Results in NSIS compiler telling me the usage of AddSize is: AddSize size_in_kb!


Found the solution....
AddSize is a copmile time command, so it can't use variables which only have values on runtime. To change the size of a section on runtime grab the latest CVS version and use SectionSetSize and SectionGetSize.


Indeed. But you no longer need to use the latest CVS version for that. SectionSetSize is available since version 2.0.