Archive: Three problems with INSTFILES page


Three problems with INSTFILES page
I have two problems with the instfiles page:

1) When I do CopyFiles /SILENT [...] I can't press "Cancel", which annoys me since the installation process is VERY long, and if I mistakenly press Install, I have to kill the installation process with CTRL+ALT+DELETE. This is not great. Is there any way of solving this without removing the /SILENT parameter?

2) When I do the CopyFiles described above, I can't seem to DetailPrint anything to the installation log window. This is what my code looks like:


Section "nQuake" NQUAKE

# Copy everything in the data folder to the destination folder
${Locate} "$EXEDIR\data" "/L=D /M=* /G=1" ".createDirs"
${Locate} "$EXEDIR\data" "/L=F /M=*.* /G=1" ".copyFiles"

SectionEnd

Function .createDirs
StrLen $R0 $EXEDIR
IntOp $R0 $R0 + 6
StrCpy $R3 $R9 "" $R0 # subfolder
CreateDirectory "$INSTDIR\$R3"
DetailPrint "Creating directory: $R3"
Push $0
FunctionEnd

Function .copyFiles
StrLen $R0 $EXEDIR
IntOp $R0 $R0 + 1
IntOp $R1 $R0 + 5
StrCpy $R2 $R8 "" $R0 # subfolder (data folder)
StrCpy $R3 $R8 "" $R1 # subfolder (installation)
DetailPrint "Installing file: $R3\$R7"
FileWrite $INSTLOG "$R3\$R7$\r$\n"
CopyFiles /SILENT "$R9" "$INSTDIR\$R3\$R7"
Push $0
FunctionEnd


Why do my DetailPrints not work?

3) After the installation process is done, my installer jumps straight to the Finish page. I want the user to manually press Next to be taken there. How do I do this?

1) Write your own copy files script.
2) Try using SetDetailsPrint both before the DetailPrint and SetDetailsPrint none afterwards. ${Locate} may use SetDetailsPrint internally to hide any of its output.
3) !define MUI_FINISHPAGE_NOAUTOCLOSE

Stu