0

I have created Exe file for my app using NSIS script.In my script i have checked free space for selected directory.

1.If selected directory dont have required space then user wants to change the directory.

2.After changing directory in directory page again wants to check free space.so when the required space is available for the selected directory then only proceed to next page. So it will come under looping statement.I have tried following script

page custom checking
Function checking
Push "\"
push $InstallDir
Call SplitFirstStrPart
pop $R0
${DriveSpace} $R0 "/D=F /S=G" $R0
${While} $R0 <= 2
    MessageBox MB_OK "Expected free space is not availble"
    call directory
${EndWhile}
Function directory

--Here i want to define directory page--
[page directory] we cant use this here
call checking
FunctionEnd

1.How to create user defined directory page?

2.是否可以多次调用页面目录或MUI_PAGE_DIRECTORY?

谢谢

4

1 回答 1

0

您不能从函数中调用页面,但可以通过调用Abort页面 PRE 回调来跳过页面,也可以跳转到任何页面

您可以拥有所有页面类型的多个页面:

!include MUI.nsh
Var dir1
Var dir2
Function .onInit
StrCpy $dir1 c:\default1
StrCpy $dir2 c:\default2
FunctionEnd
!define MUI_DIRECTORYPAGE_VARIABLE $dir1
!insertmacro MUI_PAGE_DIRECTORY
!define MUI_DIRECTORYPAGE_VARIABLE $dir2
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE English
Section
DetailPrint $dir1
DetailPrint $dir2
SectionEnd
于 2013-08-29T16:17:26.347 回答