簡體   English   中英

NSIS 多組件選項

[英]NSIS Multiple components option

我是 NSIS 的新手。 我需要一些有關 MUI 組件頁面的幫助。 我正在添加 3 個部分組和部分組內的不同部分。 我需要根據用戶選擇執行不同的操作。 用戶可以選擇多個選項。 那么任何人都可以幫助我提供一個示例代碼,該代碼包含 3 個以上的部分並驗證用戶對這些選項的選擇並基於顯示不同的消息框

我不清楚你的真正目標是什么,但檢查部分狀態可以這樣完成:

!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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM