2012-01-11 51 views
-1

我是NSIS的新手。我需要一些关于MUI组件页面的帮助。我在Section组中添加了3个组和不同的部分。我需要根据用户选择执行不同的操作。用户可以选择多个选项。 所以,任何人都可以请帮我这有3层以上的部分和检验这些选项的用户选择,并基于该显示不同的消息框示例代码NSIS Multiple components option

谢谢

+2

你只是做在部分正常的东西,如果要选择他们,他们得到运行......如果这不是所有的你问关于,请澄清你的问题。 – 2012-01-11 13:39:35

回答

2

这是非常不清楚我你的真正的目标是,但检查部分状态可以这样进行:

!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