【问题标题】:NSIS Multiple components optionNSIS 多组件选项
【发布时间】:2012-01-11 09:38:38
【问题描述】:

我是 NSIS 的新手。我需要一些有关 MUI 组件页面的帮助。我在部分组内添加 3 个部分组和不同部分。我需要根据用户选择执行不同的操作。用户可以选择多个选项。 因此,任何人都可以帮助我提供一个包含 3 个以上部分的示例代码,并根据显示不同的消息框验证用户对这些选项的选择

【问题讨论】:

  • 您只需在部分中执行常规操作,如果它们被选中,它们就会运行...如果这不是您要问的全部,请澄清您的问题。

标签: nsis nsis-mui


【解决方案1】:

我不清楚你的真正目标是什么,但检查部分状态可以这样完成:

!include LogicLib.nsh

page components
page instfiles

SectionGroup /e "Group 1"
Section "G1S1" SEC_G1S1
SectionEnd
Section /o "G1S2" SEC_G1S2
SectionEnd
SectionGroupEnd

SectionGroup /e "Group 2"
Section /o "G2S1" SEC_G2S1
SectionEnd
Section "G2S2" SEC_G2S2
SectionEnd
SectionGroupEnd

Section -Hidden
${If} ${SectionIsSelected} ${SEC_G1S1}
    MessageBox mb_ok "G1S1 is selected"
${EndIf}
${If} ${SectionIsSelected} ${SEC_G1S2}
    MessageBox mb_ok "G1S2 is selected"
${EndIf}
# Check the other sections here ...
SectionEnd

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-08-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多