Installation 如果不满足条件,则停止前进到下一页

Installation 如果不满足条件,则停止前进到下一页,installation,nsis,Installation,Nsis,如何阻止NSIS自定义页前进到下一页? Page Custom CustomPageInitialise CustomPageFinalise Function CustomPageFinalise Var /GLOBAL versToInstall ${NSD_GetState} $hasVersion8ChkBx $0 ${NSD_GetState} $hasVersion9ChkBx $1 ${NSD_GetState} $hasVersion10Chk

如何阻止NSIS自定义页前进到下一页?

Page Custom CustomPageInitialise CustomPageFinalise
Function CustomPageFinalise
    Var /GLOBAL versToInstall
    ${NSD_GetState} $hasVersion8ChkBx  $0
    ${NSD_GetState} $hasVersion9ChkBx  $1
    ${NSD_GetState} $hasVersion10ChkBx $2
    IntOp $versToInstall $0 + $1
    IntOp $versToInstall $versToInstall + $2

    # TODO: stop advance to NEXT page if no versions selected to install
    # If no versions selected to install
    ${If} $versToInstall <= 0
        MessageBox MB_ICONEXCLAMATION|MB_OK "You must select at least one version of the Application to install our plugins to."
        # how do I stop the advance to the next page?
    ${EndIf}
FunctionEnd
我有一个自定义页面,用户可以在其中决定他们可以为哪个版本的应用程序安装我们的插件-因此有3个复选框可供选择

用户必须选择至少1个版本将我们的插件安装到/for,否则安装程序将无法安装任何东西

因此,当用户单击“下一步”时,我需要检查是否选中了1个或多个复选框,如果未选中,则禁用“下一步”并显示消息框

如果我无法停止前进到下一页,我可以禁用“下一步”按钮吗?

Page Custom CustomPageInitialise CustomPageFinalise
Function CustomPageFinalise
    Var /GLOBAL versToInstall
    ${NSD_GetState} $hasVersion8ChkBx  $0
    ${NSD_GetState} $hasVersion9ChkBx  $1
    ${NSD_GetState} $hasVersion10ChkBx $2
    IntOp $versToInstall $0 + $1
    IntOp $versToInstall $versToInstall + $2

    # TODO: stop advance to NEXT page if no versions selected to install
    # If no versions selected to install
    ${If} $versToInstall <= 0
        MessageBox MB_ICONEXCLAMATION|MB_OK "You must select at least one version of the Application to install our plugins to."
        # how do I stop the advance to the next page?
    ${EndIf}
FunctionEnd
页面自定义页面初始化自定义页面最终确定
函数custompagefinalize
Var/全局VSTOINSTALL
${NSD_GetState}$hasVersion8ChkBx$0
${NSD_GetState}$hasVersion9ChkBx$1
${NSD_GetState}$hasVersion10ChkBx$2
输入$versToInstall$0+1
IntOp$versToInstall$versToInstall+2美元
#TODO:如果未选择要安装的版本,则停止前进到下一页
#如果未选择要安装的版本

${If}$versToInstall使用
Abort
命令

:

“离开”功能允许您使用强制用户停留在当前页面上