2
작동하도록 조건부 구성 요소를 가져 오려고합니다.Wix 구성 요소 조건
그러나 전혀 작동하지 않아서 난처하게됩니다.
나는 다음과 같은 코드 모양이있어 :
이 기능은 다음과 같이 정의된다 : 파일이 결코 그러나
<Feature Id="MainFeature" Level="1" Title="!(loc.FEATURE.MAINFEATURE.TITLE)"
Description="!(loc.FEATURE.MAINFEATURE.DESCRIPTION)" Display="collapse">
<ComponentRef Id="MainExecutable" />
<ComponentRef Id="pmd" />
</Feature>
및 구성 요소가
<Component Id="MainExecutable" Guid="*">
<Condition><![CDATA[(&MainFeature = 3) AND NOT (!MainFeature = 3)]]></Condition>
<File Id="MainExecutableFile" Name="SampleApp.exe"
Source="..\ProductBuild\sampleFile.txt" KeyPath="yes">
<Shortcut Id="MainExecutableStartMenu" Directory="ProgramMenuDir"
Name="!(loc.APPNAME)" WorkingDirectory="INSTALLDIR"
Icon="icon.ico" IconIndex="0" Advertise="yes"/>
<Shortcut Id="MainExecutableDesktop" Directory="DesktopFolder"
Name="!(loc.APPNAME)" WorkingDirectory="INSTALLDIR"
Icon="icon.ico" IconIndex="0" Advertise="yes" />
</File>
</Component>
로 정의된다 설치!
나는 이것을 상세히 설명했다 : http://www.joyofsetup.com/2008/04/09/feature-states-in-component-conditions/ –
Rob-Gah! 예상했던대로 작동하지 않는다고 생각했기 때문에 ... 위 예제는 매우 간단한 사용 사례를 제공하기 위해 고안되었습니다. 구성 요소가 설치되어 있는지 여부에 따라 바로 가기를 설치하고 싶지만 이후에 더 쉽게 사용할 수 있도록 모든 바로 가기를 그룹화하고 싶습니다 .... 신경 쓰지 마세요.
@Bob - 그게 효과가없는 이유를 알아 내려고 할 때 찾지 못한 블로그 일뿐입니다! 그것은 머리에 손톱을 친다. 문서는 기껏해야 오해의 소지가있다! – Dreaddan
그래, 그런 식으로하지 마라. ;) Windows Installer를 사용하여 잘 작동하는 우아한 솔루션을 찾으십시오. –