[英]Conditional Display of pages in NSIS using nsDialog
我已經使用nsDialogs為我的安裝程序添加了一個自定義頁面,但是,該頁面只需要顯示給我的一個InstType選項。
InstType "Default" # 1
InstType "Developer" # 2
在上面的示例中,我希望僅向開發人員顯示額外頁面。 什么是最佳做法?
nsDialogs::Show
? 不知道要尋找什么屬性 要跳過頁面 ,請在該頁面的create function callback中調用abort。
!include LogicLib.nsh
InstType "Normal"
InstType "Developer"
Page Components
Page Custom myDevPage
;Page start menu etc...
Page InstFiles
Section /o "" ${SEC_Dev}
;This (hidden) section is used just to check the insttype state, but you could also use it to install dev specific files etc
SectionIn 2
Sectionend
Function myDevPage
${IfNot} ${SectionIsSelected} ${SEC_Dev}
Abort
${EndIf}
;nsDialog code goes here
FunctionEnd
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.