summaryrefslogtreecommitdiffstats
path: root/data/virt-viewer.wxs.in
blob: 03f7548b3b668d126b2a80feaef5ecd907ff1342 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?xml version="1.0" encoding="utf-8"?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

  <?define Version = "@WINDOWS_PRODUCTVERSION@"?>
  <?define Arch = "@WIXL_ARCH@"?>
  <?if $(var.Arch) = "x64"?>
      <?define GLIB_ARCH = "win64"?>
      <?define ArchString = "64-bit"?>
      <?define ArchProgramFilesFolder = "ProgramFiles64Folder"?>
      <?define Win64 = "yes"?>
  <?else?>
      <?define GLIB_ARCH = "win32"?>
      <?define ArchString = "32-bit"?>
      <?define ArchProgramFilesFolder = "ProgramFilesFolder"?>
      <?define Win64 = "no"?>
  <?endif?>

  <?if $(var.HaveSpiceGtk) = "True"?>
    <?require spice-gtk3.wxi?>
  <?endif?>
  <?if $(var.HaveGtkVnc) = "True"?>
    <?require gtk-vnc2.wxi?>
  <?endif?>
  <?require adwaita-icons-needed.wxi?>
  <?if $(var.HaveLibvirt) = "True"?>
    <?require libvirt.wxi?>
    <?require libvirt-glib.wxi?>
  <?endif?>
  <?if $(var.HaveOVirt) = "True"?>
    <?require libgovirt.wxi?>
  <?endif?>
  <?require libxml2.wxi?>

  <?define UpgradeCode = "5B027138-1A63-49E6-877E-055E5EEC1903"?>
  <Product Id="*"
           Name="VirtViewer @VERSION@@BUILDID@ ($(var.ArchString))"
           Manufacturer="$(env.MANUFACTURER)"
           Version="$(var.Version)"
           UpgradeCode="$(var.UpgradeCode)"
           Language="1033">

    <Package InstallerVersion="200" Compressed="yes" Comments="comments" InstallScope="perMachine"/>
    <Media Id="1" Cabinet="cabinet.cab" EmbedCab="yes"/>

    <Property Id="ARPHELPLINK" Value="http://www.virt-tools.org"/>
    <Property Id="ARPNOMODIFY" Value="1"/>
    <Property Id="ARPNOREPAIR" Value="1"/>
    <Property Id="ARPPRODUCTICON" Value="virt-viewer.ico"/>
    <Property Id="ARPURLINFOABOUT" Value="http://www.virt-tools.org/about"/>
    <Upgrade Id="$(var.UpgradeCode)">
      <UpgradeVersion Minimum="$(var.Version)" OnlyDetect="yes" Property="NEWERVERSIONDETECTED"/>
      <UpgradeVersion Minimum="0.0.0" Maximum="$(var.Version)" IncludeMinimum="yes" IncludeMaximum="no" Property="OLDERVERSIONBEINGUPGRADED"/>
    </Upgrade>
    <Condition Message="VirtViewer is already installed.">NOT NEWERVERSIONDETECTED</Condition>

    <DirectoryRef Id="TARGETDIR">
      <Component Id="CRegistryEntries" Guid="*">
        <RegistryKey Root='HKLM' Key='Software\Microsoft\Internet Explorer\Low Rights\ElevationPolicy\{96190E9D-6FBB-64DB-9095-29F6FDE0B897}'>
          <RegistryValue Type='string' Name='AppPath' Value='[INSTALLDIR]\bin'/>
          <RegistryValue Type='string' Name='AppName' Value='remote-viewer.exe'/>
          <RegistryValue Type='integer' Name='Policy' Value='3'/>
        </RegistryKey>
        <RegistryKey Root='HKLM' Key='Software\spice-space.org\spicex'>
          <RegistryValue Type='string' Name='client' Value='[INSTALLDIR]\bin\remote-viewer.exe --spice-controller'/>
        </RegistryKey>
      </Component>
      <Component Id="CProgIds" Guid="89D6F46D-9C5E-4D65-8456-58FC361E553E">
        <ProgId Id='VirtViewer.vvfile' Description='VirtViewer connection file'>
          <Extension Id='vv' ContentType='application/x-virt-viewer'>
            <Verb Id='open' Command='Open' TargetFile='fil610DF9E49759B1DEC646290195F96F8A' Argument='"%1"' />
            <MIME ContentType="application/x-virt-viewer" Default="yes"/>
          </Extension>
        </ProgId>
      </Component>
    </DirectoryRef>

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="$(var.ArchProgramFilesFolder)">
        <Directory Id="INSTALLDIR" Name="VirtViewer v@VERSION@@BUILDID@">
          <Component Id="CDepsFile" Guid="*">
            <File Id="filA1E799D196006E6DF67DACE15B8C6193" KeyPath="yes" Source="deps.txt"/>
          </Component>
        </Directory>
      </Directory>
      <Directory Id="ProgramMenuFolder">
        <Directory Id="MENUDIR" Name="VirtViewer"/>
      </Directory>
    </Directory>

    <DirectoryRef Id="INSTALLDIR">
      <Directory Id="DirShare" Name="share">
        <Directory Id="DirHwdata" Name="hwdata">
          <Component Id="CHwdataUSB" Guid="*">
            <File Id="FHwdataUSB" KeyPath="yes" Source="/usr/share/hwdata/usb.ids"/>
          </Component>
        </Directory>

        <Directory Id="DirIcons" Name="icons">
          <Directory Id="DirIconsHi" Name="hicolor">
            <Directory Id="DirIconsHi16x16" Name="16x16">
              <Directory Id="DirIconsHi16x16Apps" Name="apps">
                <Component Id="CIconsHi16x16Apps" Guid="*">
                  <File Id="FIconskeyboardshortcuts" KeyPath="yes"
                        Source="/usr/share/icons/Adwaita/16x16/apps/preferences-desktop-keyboard-shortcuts.png"/>
                </Component>
              </Directory>
            </Directory>
          </Directory>
        </Directory>
      </Directory>
    </DirectoryRef>

    <DirectoryRef Id="MENUDIR">
      <Component Id="CShortcut" Guid="*">
        <Shortcut Id="ApplicationStartMenuShortcut"
                  Name="Remote viewer"
                  Description="A SPICE/VNC client"
                  Target="[INSTALLDIR]\bin\remote-viewer.exe"
                  Icon="virt-viewer.ico"/>
        <RemoveFolder Id="MENUDIR" On="uninstall"/>
        <RegistryValue Root="HKCU" Key="Software\VirtViewer\remote-viewer-shortcut" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
      </Component>
    </DirectoryRef>

    <Feature Id="Complete"  Level="1">
      <?if $(var.HaveSpiceGtk) = "True"?>
        <ComponentGroupRef Id="CG.spice-gtk3"/>
      <?endif?>
      <?if $(var.HaveGtkVnc) = "True"?>
        <ComponentGroupRef Id="CG.gtk-vnc2"/>
      <?endif?>
      <ComponentGroupRef Id="CG.adwaita-icons-needed"/>
      <?if $(var.HaveLibvirt) = "True"?>
        <ComponentGroupRef Id="CG.libvirt"/>
        <ComponentGroupRef Id="CG.libvirt-glib"/>
      <?endif?>
      <?if $(var.HaveOVirt) = "True"?>
        <ComponentGroupRef Id="CG.libgovirt"/>
      <?endif?>
      <ComponentGroupRef Id="CG.libxml2"/>
      <ComponentGroupRef Id="CG.virt-viewer"/>
      <ComponentRef Id="CDepsFile"/>
      <ComponentRef Id="CShortcut"/>
      <ComponentRef Id="CRegistryEntries"/>
      <ComponentRef Id="CProgIds"/>
      <ComponentRef Id="CIconsHi16x16Apps"/>
      <ComponentRef Id="CHwdataUSB"/>
    </Feature>

    <InstallExecuteSequence>
      <RemoveExistingProducts After="InstallValidate"/>
    </InstallExecuteSequence>

    <Icon Id="virt-viewer.ico" SourceFile="../icons/virt-viewer.ico"/>
  </Product>
</Wix>