質問

nsDialogs を使用して作成したインストーラーにカスタム ページを追加しましたが、このページは InstType オプションの 1 つに表示するだけで済みます。

InstType "Default" # 1
InstType "Developer" # 2

上の例では、追加ページを開発者のみに表示したいと考えています。ベストプラクティスは何ですか?

  1. いくつかの属性を検査してインストール タイプを判断し、への呼び出しを抑制します。 nsDialogs::Show? どの属性を調べればよいかわからない
  2. ページのヒットを回避するページ ルーティングのロジックはありますか? やり方が分からない
  3. 他に何か?
役に立ちましたか?

解決

で中止、ページをスキップコールに

は、そのページの関数コールバックを作成します。

!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帰属
所属していません StackOverflow
scroll top