2010-12-21 3 views
3

J'ai essayé d'insérer une boîte de dialogue personnalisée dans la séquence d'interface utilisateur WixUI_InstallDir. J'ai un fichier "principal" nommé Product.wxs et le dialogue personnalisé dans un autre fichier nommé InstallTypeDlg.wxs - les deux sont présents dans Installer.wixproj.Erreur de compilation WiX Création d'une boîte de dialogue personnalisée

Dans InstallTypeDlg.wxs, je donne les résultats suivants:

<?xml version="1.0" encoding="UTF-8"?> 
    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> 
    <Fragment> 
     <UI> 
     <Dialog Id="InstallTypeDlg" Width="370" Height="270" Title="Select Install Type"> 

      <Control Id="InstallTypeSelection" Type="RadioButtonGroup" X="20" Y="55" Width="330" Height="120" Property="InstallType"> 
      <RadioButtonGroup Property="InstallType"> 
       <RadioButton Text="Type 01" Value="1" X="5" Y="0" Width="250" Height="15" /> 
       <RadioButton Text="Type 02" Value="2" X="5" Y="20" Width="250" Height="15" /> 
      </RadioButtonGroup> 
      </Control> 

      <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" /> 
      <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" /> 
      <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)"> 
      <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish> 
      </Control> 

      <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.SetupTypeDlgBannerBitmap)" /> 
      <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" /> 
      <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" /> 
      <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.SetupTypeDlgTitle)" /> 
      <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.SetupTypeDlgDescription)" /> 
      <Control Id="TypicalText" Type="Text" X="60" Y="85" Width="280" Height="20" Text="!(loc.SetupTypeDlgTypicalText)" /> 
     </Dialog> 
     </UI> 
    </Fragment> 
    </Wix> 

Je référence à ce dialogue personnalisé dans Product.wxs ainsi:

<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" /> 

<UI Id="MyWixUI_InstallDir"> 
    <UIRef Id="WixUI_InstallDir" /> 

    <DialogRef Id="InstallTypeDlg" /> 

    <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="InstallTypeDlg" Order="4">1</Publish> 
    <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallTypeDlg">1</Publish> 
</UI> 

Maintenant, quand je compile ce projet, je reçois l'erreur suivante:

InstallTypeDlg.wxs(8,0): error LGHT0094: Unresolved reference to symbol 'Property:InstallType' in section 'Fragment:'.

Je ne sais pas pourquoi. Ai-je oublié quelque chose? : -/

Je suis assez nouveau sur WiX, je l'ai seulement récupéré hier. Toute aide serait très appréciée. J'ai utilisé Wix 3.5.2415.0.

Répondre

5

Probablement, il vous suffit de définir cette propriété avant de l'utiliser, i.e. .:

<Property Id="InstallType" Value="some default value" /> 
+0

Works, merci! Les tutoriels que j'ai lus ne mentionnent pas cela, et j'ai supposé que la propriété a été créée automatiquement à partir de la balise

+0

Great it works. Habituellement, si vous obtenez l'erreur comme ceci, cela signifie que vous devez définir l'entité référencée. –

+0

Merci. J'avais déjà défini la propriété, mais je ne lui ai pas assigné de valeur par défaut. Cela a fait toute la différence. – bigfoot

Questions connexes