2010-05-21 9 views
13

Können Sie mir sagen, was ist falsch mit meinem Code bitte?Symbol für Abkürzung

<?xml version="1.0" encoding="utf-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension" xmlns:html="http://www.w3.org/1999/xhtml"> 
    <Product Id="c1ee1e1f-4e2a-41c6-a716-eb6f79477012" Name="AdministKOB" Language="1033" Version="1.0.0.0" Manufacturer="Project UP" UpgradeCode="909b9926-711d-4a97-887b-df0bafc6ea66"> 
     <Package InstallerVersion="200" Compressed="yes" /> 
     <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" /> 

     <Icon Id="ikonka" SourceFile="Files\AdministKOB.exe"/> 

     <Directory Id="TARGETDIR" Name="SourceDir"> 
      <Directory Id="DesktopFolder"/> 
      <Directory Id="ProgramMenuFolder"> 
      </Directory> 

      <Directory Id="ProgramFilesFolder"> 
       <Directory Id="INSTALLLOCATION" Name="Administ_KOB"> 
        <Component Id="ProductComponent" Guid="6bd37582-5219-4ae4-a56e-cd1ecd375efa"> 
         <File Id="AdministKOB" Name="AdministKOB.exe" Source="Files\AdministKOB.exe" KeyPath="yes"> 
         <Shortcut Advertise="yes" 
             Id="DesktopShortcut" 
             Directory="DesktopFolder" 
             Name="AdministKOB" 
             WorkingDirectory="INSTALLDIR" 
             Description="Elektroniczna ksiazka budynku" 
             Icon ="ikonka"> 
         </Shortcut> 
         </File> 
         <!--<File Id="ikonka" Name="C.ico" DiskId="1" Source="City.ico" Vital="yes" />--> 
        </Component> 
       </Directory> 
      </Directory> 
     </Directory> 

     <Feature Id="ProductFeature" Title="AdministKOB" Level="1"> 
      <ComponentRef Id="ProductComponent" /> 
     </Feature> 
     <Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" /> 
    </Product> 
</Wix> 

ich diesen Fehler und Warnungen:

The extension of Icon 'ikonka' for Shortcut 'DesktopShortcut' is not "exe" or "ico". The Icon will not be displayed correctly.*

Warum? Ich gebe ICO-Datei.

The extension of Icon 'ikonka' for Shortcut 'DesktopShortcut' does not match the extension of the Key File for component 'ProductComponent'.

Haben Sie eine Idee?

Antwort

15

Sie scheinen ein Icon Element zu fehlen .. z.

<Icon Id="City.ico" SourceFile="City.ico" /> 
    <Component ...> 
     <File ...> 
      <Shortcut Advertise="yes" 
       Id="DesktopShortcut" 
       Directory="DesktopFolder" 
       Name="AdministKOB" 
       WorkingDirectory="INSTALLDIR" 
       Description="Elektroniczna książka budynku" 
       Icon ="City.ico" /> 
     </File> 
    </Component> 
+2

Wenn i-Symbol Element oben hinzufügen i Fehler folgende erhalten. "Das ComponentGroup-Element enthält ein unerwartetes Kindelement" Icon "." –

+0

@MARKANDBhatt Es geht unter dem Produktelement. – JWiley

-1

Ich habe Tag auf der Spitze meiner Liste :) ich Symbol von exe-Datei verwenden. Wix erfordert die gleiche Erweiterung für Dateisymbol Datei und meine Datei (Verknüpfung auf dem Desktop)

Dank für Sie :)

11

attension Sie müssen eine Erweiterung auf Icon-ID von „.exe“ oder „ICO“ .

Icon Id = "ikonka * ICO *" Sourcefile = "Files \ AdministKOB.exe"/

+3

Das ist eine sehr dumme Anforderung von WiX. Dies ist mein 2. Tag, indem ich versuche, das gleiche Problem zu lösen. Danke für die Lösung. –

0

Darüber hinaus das Symbol Eigenschaft der Verknüpfung einen direkten Weg zu einer exe oder ICO-Datei nehmen, aber , es kann keine Leerzeichen im Dateinamen geben oder es wird ein Fehler auftreten:

The Shortcut/@Icon attribute's value, '"C:\Users\yadayadayada\Data Migration.exe', is not a 
legal identifier. Identifiers may contain ASCII characters A-Z, a-z, digits, underscores 
(_), or periods (.). Every identifier must begin with either a letter or an underscore.  
SetupProject C:\Users\yadayadayada\SetupProject\Product.wxs 53 
0

Folgendes funktioniert für mich. Milage kann variieren.

<?xml version="1.0" encoding="UTF-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> 
<Fragment> 
<Icon Id="dbwizard.ico" SourceFile="dbwizard.ico" /> 
<ComponentGroup Id="DBWizardComponentGroup" Directory="INSTALLFOLDER"> 
    <Component Id="FakeDBWizard_exe" Guid="{2008318F-8628-411E-B1B9-BC92989BCD19}"> 
    <File Id="FakeDBWizard_exe" 
      Name="FakeDBWizard_exe" 
      Source="database\FakeDBWizard.exe" 
      KeyPath="yes"> 
     <Shortcut Id="DBWizardShortcut" 
       Directory="Otter32ShortcutDir" 
       Name="Otter Database Wizards" 
       Description="Database Wizards for ABCSystem32" 
       WorkingDirectory="INSTALLFOLDER" 
       Advertise="yes" 
       Icon="dbwizard.ico" /> 
1

Es ist einfach:

<Shortcut Directory="DesktopFolder" Id="DesktopShortcut" Name="YourApp" Description="DescriptionOfYourApp" Target="http://localhost/" Icon="YourAppIcon"> 
     <Icon Id="YourAppIcon" SourceFile="$(var.BinDir)\favicon.ico" /> 
</Shortcut>