Thread: NSIS CopyFiles
View Single Post
Old 18th November 2008, 16:16   #13
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Since you mention "Welcome" and "Finish" pages, I have to assume you user MUI or MUI2. So simply put an addtional "custom" page between the MUI_WELCOME_PAGE and MUI_COMPONENTS_PAGE macros, just like:

code:
!insertmacro MUI_PAGE_WELCOME
Page custom MyCustomPageFun
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH



Then let your custom page show the dialog box:

code:
Var varSelectedFolder

Function MyCustomPageFun
!insertmacro MUI_HEADER_TEXT $(PAGE_TITLE) $(PAGE_SUBTITLE)

FolderForceSelection:
nsDialogs::SelectFolderDialog /NOUNLOAD "Select Folder" "$DOCUMENTS"
Pop $varSelectedFolder ;where selected folder string is returned

; Check A Folder Has Been Selected
StrCmp $varSelectedFolder "error" 0 FolderWasSelected
MessageBox MB_OK|MB_ICONWARNING "You must select a folder a folder!"
Goto FolderForceSelection

FolderWasSelected:
FunctionEnd


My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote