problem that rules them all - progressbar
hi,
i discovered nsis few days ago looking for some tool to make an installer. i like it very much and this forum became sort of gathering of all-knowing problem solvers:D for me.
however, i encountered problem.
i have successfully managed to make no compromises using installoptions-ini-based way of building custom dialogs with all components i needed. everything went fine until i needed to monitor the progress of some work with progressbar. i found installoptionsex library and managed to implement progressbar in verify-callback function of my custom dialog. thanks to timeout attribute in settings section, this functions is repeatedly called so i can change the status of progressbar and then continue (ie end the function) when it reaches 100%.
this is only example, the progressbar updates itself, HOW DO I LINK IT WITH PROGRESS OF SOME REAL WORK? (generating files, copying, etc.) and WHERE (in code) DO I HAVE TO PUT THIS WORK?
my code looks like this:
Page custom SetCustomFunc ValidateCustomFunc ""
...
Function SetCustomFunc
Push $1
InstallOptionsEx::dialog ${page_ini}
Pop $1
Pop $1
FunctionEnd
Function ValidateCustomFunc
Push $2
Push $1
Push $0
ReadINIStr $2 ${page_ini} "Field 2" "State"
FindWindow $1 "#32770" "" $HWNDPARENT
GetDlgItem $0 $1 1201 ;field # + 1200 - 1
IntOp $2 $2 + 5 ;here the progressbar increases
SendMessage $0 ${PBM_SETPOS} $2 ""
IntCmp $2 100 +1 +1 done
Pop $0
Pop $1
Pop $2
Abort
done:
Sleep 500 ;wait for a while so user can see it is done :-)
Pop $0
Pop $1
Pop $2 ;i can continue with another page
FunctionEnd
thanks in advance