Hi!
I've made an online installer using NSIS. I calculate what should be installed during the installation. However, when I select destination folder, the installation size is all wrong. I have the correct size in a variable - how do I change the installer size in the destination folder window?
Can I create a custom destination folder window?
Change the installer size
3 posts
I use code similar to this, which you might have to tweak in some places to make it work for you.
Var SRCDIR
Var SIZE
Section "InstallFiles" id1
SetOutPath "-"
File "${SRCDIR}\*.*"
SectionEnd
; False section
Section "New_Size" id2
SectionEnd
!define SetSize "Call SetSize"
Function SetSize
StrCpy $SIZE "6474381" # ; size in bytes
; bytes to kilobytes
IntOp $0 $SIZE % 1024
IntOp $SIZE $SIZE / 1024 ; rounded down
IntCmp $0 512 0 +2 0
IntOp $SIZE $SIZE + 1 ; rounded up
SectionSetSize ${id1} 0 ; clear size estimate
SectionSetSize ${id2} $SIZE ; reset the size
FunctionEnd
; Directory Page
Function DirectoryPageShow
SectionGetSize ${id2} $2
; Required space (reset)
${if} $2 == 0
${SetSize}
${EndIf}
SectionSetSize ${id2} $SIZE
FunctionEnd Why not? The NSIS directory page is pretty good though.Originally Posted by empezar View PostCan I create a custom destination folder window?
Thank you! It worked fine.