gugaliashashank
4th September 2008 11:21 UTC
Addsize command
Is it possible to assign the value to addsize command at run time, or through a variable. I tried this
push 256000
pop $R0
addsize $R0
but this does not work. Only thing which works is giving a constant value with addsize
addsize 256000
{_trueparuex^}
4th September 2008 12:43 UTC
Use SectionGetSize and SectionSetSize commands instead of AddSize. :up:
PaR
gugaliashashank
5th September 2008 06:02 UTC
SectionSetSize is also not working for me see the code below which i am using
Function .onInit
push 256000
pop $R0
sectionsetsize sec01 $R0
I am not directly giving 256000 because i want to use a variable instead of constant value. The above code is not working for me, It is not giveing any error during compliation but its not giving me the correct result
gugaliashashank
5th September 2008 06:10 UTC
infact giving constant value is not working
Section "SCLinks" SEC01
SetOutPath "$INSTDIR"
CreateShortCut "$SMPROGRAMS\Application\ Media.lnk" "$INSTDIR\Media\Media.exe"
SectionEnd
Function .onInit
sectionsetsize sec01 $R0
FunctionEnd
Comperio
5th September 2008 07:09 UTC
You need to use the proper syntax when referring to sections.
From the previous example, it should be this:
Section "SCLinks" SEC01
SetOutPath "$INSTDIR"
CreateShortCut "$SMPROGRAMS\Application\ Media.lnk" "$INSTDIR\Media\Media.exe"
SectionEnd
...
Function .onInit
StrCpy $R0 256000
SectionSetSize ${SEC01} $R0
FunctionEnd