2014-12-17 1 views
0

기본값이 'none'인 SELECTEDFEATURESET이라는 속성이 있습니다. 사용자 정의 대화 상자에서 사용자가 누른 버튼에 따라이 속성을 설정하려고합니다. 마지막으로이 속성을 사용하여 특정 구성 요소를 설치할지 여부를 결정합니다. 주요 설치 파일에 정의조건부 기능에 대한 사용자 지정 대화 상자의 속성 설정

때에 프로퍼티 (Product.wxs) :

<Property Id='SELECTEDFEATURESET' Value='none' /> 

설정 대화 상자에서 속성 :

<Control Id="InternalFeatureButton" Type="PushButton" Text="FeatureSetA"> 
    <Publish Event="NewDialog" Value="InstallDirDlg">1</Publish> 
    <Publish Property="SELECTEDFEATURESET" Value="FeatureSetA">1</Publish> 
</Control> 
<Control Id="ProductionFeatureButton" Type="PushButton" Text="FeatureSetB"> 
    <Publish Event="NewDialog" Value="InstallDirDlg">1</Publish> 
    <Publish Property="SELECTEDFEATURESET" Value="FeatureSetB">1</Publish> 
</Control> 
<Control Id="DemoFeatureButton" Type="PushButton" Text="FeatureSetC"> 
    <Publish Event="NewDialog" Value="InstallDirDlg">1</Publish> 
    <Publish Property="SELECTEDFEATURESET" Value="FeatureSetC">1</Publish> 
</Control> 

이 기능이 설치 여부를해야한다 여부를 결정 :

<Feature Id='ParentFeature' Level='0'> 
    <ComponentRef Id='ComponentA' /> 
    <Condition Level='1'><![CDATA[SELECTEDFEATURESET="FeatureSetA"]]></Condition> 
</Feature> 
<Feature Id='ParentFeature' Level='0'> 
    <ComponentRef Id='ComponentB' /> 
    <Condition Level='1'><![CDATA[SELECTEDFEATURESET="FeatureSetB"]]></Condition> 
</Feature> 
<Feature Id='ParentFeature' Level='0'> 
    <ComponentRef Id='ComponentC' /> 
    <Condition Level='1'><![CDATA[SELECTEDFEATURESET="FeatureSetC"]]></Condition> 
</Feature> 

설치 관리자를 실행하고 FeatureSetA 단추를 누르면 선택적 구성 요소가 inst가 아닙니다. alled. 'FeatureSetA'로 SELECTEDFEATURESET 속성을 초기화하면 ComponentA가 설치됩니다 (A, B 및 C와 동일).

왜 기능 조건 평가시 'FeatureSetA'/ 'FeatureSetB'/ 'FeatureSetC'대신 'SELECTEDFEATURESET'값이 'none'입니까?
어떻게 수정합니까?

답변

0

필자는이 기능을 구성 요소에서 구성 요소로 옮겼습니다.

관련 문제