2012-01-11 49 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