NSIS中页面的自定义函数消失



我有以下脚本:

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_COMPONENTS
!define MUI_PAGE_CUSTOMFUNCTION_PRE ComponentPost
!insertmacro MUI_PAGE_DIRECTORY
!define MUI_PAGE_CUSTOMFUNCTION_SHOW  DirectoryShow
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeave
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

不幸的是,在第一个目录选择对话框之后,目录页面返回默认值,我做错了什么?

当使用多个目录页时,您通常还希望将所选路径存储在不同的变量中:

Var SomeOtherFolder
!define MUI_DIRECTORYPAGE_VARIABLE $SomeOtherFolder
!insertmacro MUI_PAGE_DIRECTORY
...
Section
SetOutPath $SomeOtherFolder
File /r "c:otherfiles"
Section

所有这些信息都可以在Modern UI自述文件中找到…

最新更新