2017-12-02 20 views
0

이 것이 나를 미치게합니다.Windows Installer Toolkit (WIX) 대화 상자 조건이 작동하지 않습니다.

내가 가지고있는 것은 그것에 대한 컨트롤이있는 사용자 지정 Exit 대화 상자입니다.

<?xml version="1.0" encoding="utf-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> 
    <Fragment> 
     <UI> 
      <Dialog Id="MyExitDialog" Width="370" Height="220" Title="!(loc.ExitDialog_Title)"> 
       <Control Id="Finish" Type="PushButton" X="236" Y="200" Width="56" Height="17" Default="yes" Cancel="yes" Text="!(loc.WixUIFinish)" /> 
       <Control Id="Cancel" Type="PushButton" X="304" Y="200" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUICancel)" /> 
       <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.DiskCostDlgBannerBitmap)" /> 
       <Control Id="InstallText" Type="Text" X="25" Y="53" Width="330" Height="50" Text="Product [ProductName] was successfully installed" > 
        <Condition Action="show">NOT Installed</Condition> 
       </Control> 
       <Control Id="UninstallText" Type="Text" X="25" Y="53" Width="330" Height="50" Text="Product [ProductName] was successfully removed." > 
        <Condition Action="show">Installed</Condition> 
       </Control> 
       <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" /> 
       <Control Id="Back" Type="PushButton" X="180" Y="200" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUIBack)" /> 
       <Control Id="BottomLine" Type="Line" X="0" Y="190" Width="370" Height="0" /> 
       <Control Id="Description" Type="Text" X="25" Y="23" Width="340" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.ExitDialogDescription)" /> 
       <Control Id="Title" Type="Text" X="15" Y="6" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.ExitDialogTitle)" /> 
       <Control Id="LaunchAfterExitCheckBox" Type="CheckBox" X="25" Y="145" Width="330" Height="18" CheckBoxValue="1" Property="LAUNCHAFTEREXIT" Text="Run application after installation" > 
        <Condition Action="show">NOT Installed</Condition>    
       </Control> 
      </Dialog> 
      <InstallUISequence> 
       <Show Dialog="MyExitDialog" OnExit="success" Overridable="yes" /> 
      </InstallUISequence> 
      <AdminUISequence> 
       <Show Dialog="MyExitDialog" OnExit="success" Overridable="yes" /> 
      </AdminUISequence> 
     </UI> 
    </Fragment> 
</Wix> 

윅스 소스에 익숙 beeing는 당신의 사람들을 쉽게 내가 WIX에 포함 된 ExitDialog를 복제 한 것을 인식하고, 정상에 거의 모든 다른 대화 상자 (가로 배너 그것을 동일한 레이아웃을 제공합니다 : 여기에 근원이다)를 사용하여 "편지함"버그 (Windows 배경이 컨트롤을 통해 빛나고 있음)를 해결합니다. 이제 문제는 "응용 프로그램 시작"체크 상자가 설치에 나타나고 제거시 상태가 아무 효과가없는 것처럼 보입니다. 그러나 LAUNCHCONDITION 속성을 설정하여 체크 박스를 성공적으로 체크하고 해제 할 수 있습니다. 따라서이 점에 대해서는 약간의 문제가 있습니다. 10 줄이 더 이상 나는 "InstallText"와 "UninstallText"사이에서 텍스트를 전환하는 똑같은 조건을 사용하기 때문에 전체 문제는 다소 이상합니다.

이것은 ExitDialog에서 원래 코드 :

<Control Id="OptionalCheckBox" Type="CheckBox" X="135" Y="190" Width="220" Height="40" Hidden="yes" Property="WIXUI_EXITDIALOGOPTIONALCHECKBOX" CheckBoxValue="1" Text="[WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT]"> 
    <Condition Action="show">WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT AND NOT Installed</Condition> 
</Control> 

OK, 그들은 내 프로젝트에 존재하지 않는 다른 조건과 에드을 가지고 있지만, 그래서 뭐? 내 조건은 훌륭하게 작동해야하지만 그렇지 않습니다. 저는 몇 시간 동안 그 몇 줄을 꼼짝 않고 바라 보았습니다. 그리고 이것을 시도해 보았습니다. 성공하지 못했습니다.

내가 무엇이 빠졌습니까 ???

Thx, Armin.

+0

오늘 가까이에서 보았습니다. 동작은 다음과 같습니다. 설치 또는 제거를 진행할 때마다 아무 것도 볼 수 없었습니다. 서로가 그려지기 때문에 텍스트를 볼 수 없었습니다. 더 정확한 질문은 조건 노드가 전혀 작동하지 않는 이유입니다. – Nimral

답변

1

귀하의 조건은 "표시"작업입니다. 그러나 모든 컨트롤이 표시되기 시작하므로 실제로 필요한 컨트롤은 컨트롤을 숨기는 작업입니다. 이 경우 보완적인 조건 (즉, 쇼 동작을 유지)을 사용하여 각 컨트롤에 두 가지 작업을 모두 수행하는 것은 나쁜 생각이 아닙니다.

+0

당신은 완벽합니다. WIX 대화 상자를 자세히 살펴보면 기본적으로 속성이 "숨김"인 컨트롤이 초기화된다는 것을 알았습니다. 감사합니다! – Nimral