2013-01-16 17:27:58 +01:00
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
2013-07-30 21:05:28 +02:00
<?define Version = "@WINDOWS_PRODUCTVERSION@"?>
2013-04-12 14:45:56 +02:00
<?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?>
2015-06-23 13:24:55 +02:00
<?if $(var.HaveSpiceGtk) = "True"?>
<?require spice-gtk3.wxi?>
<?endif?>
<?if $(var.HaveGtkVnc) = "True"?>
<?require gtk-vnc2.wxi?>
2014-12-09 11:19:38 +01:00
<?endif?>
2015-06-23 13:24:55 +02:00
<?require adwaita-icons-needed.wxi?>
2014-12-17 06:16:41 +01:00
<?if $(var.HaveLibvirt) = "True"?>
<?require libvirt.wxi?>
<?endif?>
2014-12-17 06:21:33 +01:00
<?if $(var.HaveOVirt) = "True"?>
<?require libgovirt.wxi?>
<?endif?>
2015-10-06 23:06:20 +02:00
<?require libxml2.wxi?>
2013-01-16 17:27:58 +01:00
<?define UpgradeCode = "5B027138-1A63-49E6-877E-055E5EEC1903"?>
2013-04-12 14:45:56 +02:00
<Product Id="*"
2013-07-30 21:05:28 +02:00
Name="VirtViewer @VERSION@@BUILDID@ ($(var.ArchString))"
2013-04-12 14:45:56 +02:00
Manufacturer="$(env.MANUFACTURER)"
Version="$(var.Version)"
UpgradeCode="$(var.UpgradeCode)"
2013-01-16 17:27:58 +01:00
Language="1033">
2015-06-08 15:21:02 -04:00
<Package InstallerVersion="200" Compressed="yes" Comments="comments" InstallScope="perMachine"/>
2013-01-16 17:27:58 +01:00
<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'>
2015-10-08 14:53:16 +02:00
<Verb Id='open' Command='Open' TargetFile='fil610DF9E49759B1DEC646290195F96F8A' Argument='"%1"' />
2013-01-16 17:27:58 +01:00
<MIME ContentType="application/x-virt-viewer" Default="yes"/>
</Extension>
</ProgId>
</Component>
</DirectoryRef>
<Directory Id="TARGETDIR" Name="SourceDir">
2013-04-12 14:45:56 +02:00
<Directory Id="$(var.ArchProgramFilesFolder)">
wixl: use a versionized installation directory
It turned out that not only the current MSI broke the "component rule",
but also that our files are not versionized correctly. Windows Installer
applies some file versioning rules before replacing a file
http://msdn.microsoft.com/en-us/library/aa368599%28v=vs.85%29.aspx
Since msitools doesn't extract version from files and populate the Version
field of the File table, it "usually" keep the current file installed.
It's practically impossible to rely on version information from
files (from a quick look, only 5% of the files are versionized and even
less correctly, libgcrypt seems to do non-monotonic buildid for example)
So the rule that applies when files are not versionized is to check the
file hash, and the modified date. File hash was added recently in
msitools, but doesn't apply when the installed file itself has a
version.
In order to solve the above problems, it's simpler to just have a
different installation prefix. Windows Installer will see files with
different component guid, and won't be checking any file update rule. I
have verified the upgrade is working, not leaving any file behind and
updating registry correctly with this solution. Until the files are
correctly versionized, it looks like the only sensible thing to
do. Furthermore, this make it simpler to have several versions installed
in parallel later on (when we change productid)
2015-01-12 17:04:40 +00:00
<Directory Id="INSTALLDIR" Name="VirtViewer v@VERSION@@BUILDID@">
2013-01-16 17:27:58 +01:00
<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>
2013-07-30 21:05:14 +02:00
<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"
2014-12-15 18:09:27 +01:00
Source="/usr/share/icons/Adwaita/16x16/apps/preferences-desktop-keyboard-shortcuts.png"/>
2013-07-30 21:05:14 +02:00
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
</DirectoryRef>
2013-01-16 17:27:58 +01:00
<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">
2015-06-23 13:24:55 +02:00
<?if $(var.HaveSpiceGtk) = "True"?>
<ComponentGroupRef Id="CG.spice-gtk3"/>
<?endif?>
<?if $(var.HaveGtkVnc) = "True"?>
<ComponentGroupRef Id="CG.gtk-vnc2"/>
2014-12-09 11:19:38 +01:00
<?endif?>
2015-06-23 13:24:55 +02:00
<ComponentGroupRef Id="CG.adwaita-icons-needed"/>
2014-12-17 06:16:41 +01:00
<?if $(var.HaveLibvirt) = "True"?>
<ComponentGroupRef Id="CG.libvirt"/>
<?endif?>
2014-12-17 06:21:33 +01:00
<?if $(var.HaveOVirt) = "True"?>
<ComponentGroupRef Id="CG.libgovirt"/>
<?endif?>
2015-10-06 23:06:20 +02:00
<ComponentGroupRef Id="CG.libxml2"/>
2013-01-16 17:27:58 +01:00
<ComponentGroupRef Id="CG.virt-viewer"/>
<ComponentRef Id="CDepsFile"/>
<ComponentRef Id="CShortcut"/>
<ComponentRef Id="CRegistryEntries"/>
<ComponentRef Id="CProgIds"/>
2013-07-30 21:05:14 +02:00
<ComponentRef Id="CIconsHi16x16Apps"/>
<ComponentRef Id="CHwdataUSB"/>
2013-01-16 17:27:58 +01:00
</Feature>
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallValidate"/>
</InstallExecuteSequence>
2013-04-11 18:20:30 +02:00
<Icon Id="virt-viewer.ico" SourceFile="../icons/virt-viewer.ico"/>
2013-01-16 17:27:58 +01:00
</Product>
</Wix>