2010-08-05 3 views
1

nsDialogs를 사용하여 만든 설치 프로그램에 사용자 정의 페이지를 추가했으나 페이지가 내 InstType 옵션 중 하나에 표시되기 만하면됩니다.nsDialog를 사용하여 NSIS의 조건부 디스플레이

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

위 예제에서 개발자에게만 추가 페이지를 표시하고 싶습니다. 가장 좋은 방법은 무엇입니까?

  1. 일부 속성을 검사하여 설치 유형을 확인하고 nsDialogs::Show에 대한 호출을 억제 하시겠습니까? 어떤 속성을 찾을 지 모르겠다
  2. 페이지가 히트되는 것을 피하는 페이지 라우팅의 일부 논리는 무엇입니까? 이 작업을 수행하는 방법을 모른다.
  3. 다른 것?

답변

4

까지 skip a page의 경우 해당 페이지에 대한 create function 콜백에서 중단을 호출하십시오.

!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 
관련 문제