blob: df572adb4ad53883c4b889cae46bdee1c2d5a9db [file] [log] [blame]
Yossi Hindin66ae13b2015-05-06 14:57:39 +03001<?xml version="1.0" encoding="UTF-8"?>
2<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
Yossi Hindin66ae13b2015-05-06 14:57:39 +03003 <?if $(var.Arch) = "64"?>
4 <?define ArchLib=libgcc_s_seh-1.dll?>
5 <?define GaProgramFilesFolder="ProgramFiles64Folder" ?>
Marc-André Lureau0480a1b2022-05-25 16:41:38 +02006 <?else?>
7 <?if $(var.Arch) = "32"?>
8 <?define ArchLib=libgcc_s_dw2-1.dll?>
9 <?define GaProgramFilesFolder="ProgramFilesFolder" ?>
10 <?else?>
11 <?error Unexpected Arch value $(var.Arch)?>
12 <?endif?>
Yossi Hindin66ae13b2015-05-06 14:57:39 +030013 <?endif?>
14
15 <Product
16 Name="QEMU guest agent"
Bishara AbuHattouma9723042018-06-28 17:58:16 +030017 Id="*"
Leonid Bloch1d394fb2015-08-03 20:54:21 +030018 UpgradeCode="{EB6B8302-C06E-4BEC-ADAC-932C68A3A98D}"
Marc-André Lureau4f3c5772022-05-25 16:41:36 +020019 Manufacturer="$(var.QEMU_GA_MANUFACTURER)"
20 Version="$(var.QEMU_GA_VERSION)"
Yossi Hindin66ae13b2015-05-06 14:57:39 +030021 Language="1033">
22 <?if $(var.Arch) = 32 ?>
23 <Condition Message="Error: 32-bit version of Qemu GA can not be installed on 64-bit Windows.">NOT VersionNT64</Condition>
24 <?endif?>
25 <Package
Marc-André Lureau4f3c5772022-05-25 16:41:36 +020026 Manufacturer="$(var.QEMU_GA_MANUFACTURER)"
Yossi Hindin66ae13b2015-05-06 14:57:39 +030027 InstallerVersion="200"
28 Languages="1033"
29 Compressed="yes"
30 InstallScope="perMachine"
31 />
Marc-André Lureau4f3c5772022-05-25 16:41:36 +020032 <Media Id="1" Cabinet="qemu_ga.$(var.QEMU_GA_VERSION).cab" EmbedCab="yes" />
Yossi Hindin66ae13b2015-05-06 14:57:39 +030033 <Property Id="WHSLogo">1</Property>
Konstantin Kostiuk88288c22023-03-03 21:20:07 +020034 <Property Id="ARPNOMODIFY" Value="yes" Secure="yes" />
Leonid Bloch848849d2015-08-03 20:54:24 +030035 <MajorUpgrade
36 DowngradeErrorMessage="Error: A newer version of QEMU guest agent is already installed."
37 />
Yossi Hindin66ae13b2015-05-06 14:57:39 +030038
39 <Directory Id="TARGETDIR" Name="SourceDir">
40 <Directory Id="$(var.GaProgramFilesFolder)" Name="QEMU Guest Agent">
41 <Directory Id="qemu_ga_directory" Name="Qemu-ga">
Leonid Bloch1d394fb2015-08-03 20:54:21 +030042 <Component Id="qemu_ga" Guid="{908B7199-DE2A-4DC6-A8D0-27A5AE444FEA}">
Marc-André Lureau4f3c5772022-05-25 16:41:36 +020043 <File Id="qemu_ga.exe" Name="qemu-ga.exe" Source="$(var.BUILD_DIR)/qga/qemu-ga.exe" KeyPath="yes" DiskId="1"/>
Yossi Hindin66ae13b2015-05-06 14:57:39 +030044 <ServiceInstall
45 Id="ServiceInstaller"
46 Type="ownProcess"
47 Vital="yes"
48 Name="QEMU-GA"
49 DisplayName="QEMU Guest Agent"
50 Description="QEMU Guest Agent"
51 Start="auto"
52 Account="LocalSystem"
53 ErrorControl="ignore"
54 Interactive="no"
Michael Rothebc88c02018-10-07 14:02:21 +030055 Arguments="-d --retry-path"
Yossi Hindin66ae13b2015-05-06 14:57:39 +030056 >
57 </ServiceInstall>
Basil Salmanbb1ce442020-03-11 19:04:15 +020058 <ServiceControl Id="StartService" Start="install" Stop="both" Remove="uninstall" Name="QEMU-GA" Wait="yes" />
Yossi Hindin66ae13b2015-05-06 14:57:39 +030059 </Component>
Leonid Bloch5e994f92015-08-03 20:54:23 +030060 <?ifdef var.InstallVss?>
Michael Rothe3008582021-08-02 22:28:58 -050061 <Component Id="libstdc++_6_lib" Guid="{55E737B5-9127-4A11-9FC3-A29367714574}">
Marc-André Lureau5b9e7d02022-05-25 16:41:39 +020062 <File Id="libstdc++-6.lib" Name="libstdc++-6.dll" Source="$(var.BIN_DIR)/libstdc++-6.dll" KeyPath="yes" DiskId="1"/>
Michael Rothe3008582021-08-02 22:28:58 -050063 </Component>
Leonid Bloch5e994f92015-08-03 20:54:23 +030064 <Component Id="qga_vss_dll" Guid="{CB19C453-FABB-4BB1-ABAB-6B74F687BFBB}">
Marc-André Lureau4f3c5772022-05-25 16:41:36 +020065 <File Id="qga_vss.dll" Name="qga-vss.dll" Source="$(var.BUILD_DIR)/qga/vss-win32/qga-vss.dll" KeyPath="yes" DiskId="1"/>
Leonid Bloch5e994f92015-08-03 20:54:23 +030066 </Component>
67 <Component Id="qga_vss_tlb" Guid="{D8D584B1-59C2-4FB7-A91F-636FF7BFA66E}">
Marc-André Lureau4f3c5772022-05-25 16:41:36 +020068 <File Id="qga_vss.tlb" Name="qga-vss.tlb" Source="$(var.BUILD_DIR)/qga/vss-win32/qga-vss.tlb" KeyPath="yes" DiskId="1"/>
Leonid Bloch5e994f92015-08-03 20:54:23 +030069 </Component>
70 <?endif?>
Yuri Pudgorodskiyf2b608a2015-11-19 15:20:37 +030071 <?if $(var.Arch) = "32"?>
72 <Component Id="gspawn-helper-console" Guid="{446185B3-87BE-43D2-96B8-0FEFD9E8696D}">
Marc-André Lureau5b9e7d02022-05-25 16:41:39 +020073 <File Id="gspawn-win32-helper-console.exe" Name="gspawn-win32-helper-console.exe" Source="$(var.BIN_DIR)/gspawn-win32-helper-console.exe" KeyPath="yes" DiskId="1"/>
Yuri Pudgorodskiyf2b608a2015-11-19 15:20:37 +030074 </Component>
Yuri Pudgorodskiy44c6e002015-11-25 22:02:26 +030075 <Component Id="gspawn-helper" Guid="{CD67A5A3-2DB1-4DA1-A67A-8D71E797B466}">
Marc-André Lureau5b9e7d02022-05-25 16:41:39 +020076 <File Id="gspawn-win32-helper.exe" Name="gspawn-win32-helper.exe" Source="$(var.BIN_DIR)/gspawn-win32-helper-console.exe" KeyPath="yes" DiskId="1"/>
Yuri Pudgorodskiy44c6e002015-11-25 22:02:26 +030077 </Component>
Yuri Pudgorodskiyf2b608a2015-11-19 15:20:37 +030078 <?endif?>
79 <?if $(var.Arch) = "64"?>
80 <Component Id="gspawn-helper-console" Guid="{9E615A9F-349A-4992-A5C2-C10BAD173660}">
Marc-André Lureau5b9e7d02022-05-25 16:41:39 +020081 <File Id="gspawn-win64-helper-console.exe" Name="gspawn-win64-helper-console.exe" Source="$(var.BIN_DIR)/gspawn-win64-helper-console.exe" KeyPath="yes" DiskId="1"/>
Yuri Pudgorodskiyf2b608a2015-11-19 15:20:37 +030082 </Component>
Yuri Pudgorodskiy44c6e002015-11-25 22:02:26 +030083 <Component Id="gspawn-helper" Guid="{D201AD22-1846-4E4F-B6E1-C7A908ED2457}">
Marc-André Lureau5b9e7d02022-05-25 16:41:39 +020084 <File Id="gspawn-win64-helper.exe" Name="gspawn-win64-helper.exe" Source="$(var.BIN_DIR)/gspawn-win64-helper-console.exe" KeyPath="yes" DiskId="1"/>
Yuri Pudgorodskiy44c6e002015-11-25 22:02:26 +030085 </Component>
Yuri Pudgorodskiyf2b608a2015-11-19 15:20:37 +030086 <?endif?>
Leonid Bloch5e994f92015-08-03 20:54:23 +030087 <Component Id="iconv" Guid="{35EE3558-D34B-4F0A-B8BD-430FF0775246}">
Marc-André Lureau5b9e7d02022-05-25 16:41:39 +020088 <File Id="iconv.dll" Name="iconv.dll" Source="$(var.BIN_DIR)/iconv.dll" KeyPath="yes" DiskId="1"/>
Leonid Bloch5e994f92015-08-03 20:54:23 +030089 </Component>
90 <Component Id="libgcc_arch_lib" Guid="{ADD4D07D-4515-4AB6-AF3E-C904961B4BB0}">
Marc-André Lureau5b9e7d02022-05-25 16:41:39 +020091 <File Id="libgcc_arch_lib" Name="$(var.ArchLib)" Source="$(var.BIN_DIR)/$(var.ArchLib)" KeyPath="yes" DiskId="1"/>
Leonid Bloch5e994f92015-08-03 20:54:23 +030092 </Component>
93 <Component Id="libglib" Guid="{D31BFD83-2773-4B65-B45A-E0D2ADA58679}">
Marc-André Lureau5b9e7d02022-05-25 16:41:39 +020094 <File Id="libglib_2.0_0.dll" Name="libglib-2.0-0.dll" Source="$(var.BIN_DIR)/libglib-2.0-0.dll" KeyPath="yes" DiskId="1"/>
Leonid Bloch5e994f92015-08-03 20:54:23 +030095 </Component>
96 <Component Id="libintl" Guid="{A641BC2D-A907-4A94-9149-F30ED430878F}">
Marc-André Lureau5b9e7d02022-05-25 16:41:39 +020097 <File Id="libintl_8.dll" Name="libintl-8.dll" Source="$(var.BIN_DIR)/libintl-8.dll" KeyPath="yes" DiskId="1"/>
Leonid Bloch5e994f92015-08-03 20:54:23 +030098 </Component>
99 <Component Id="libssp" Guid="{7880087B-02B4-4EF6-A5D3-D18F8E3D90E1}">
Marc-André Lureau5b9e7d02022-05-25 16:41:39 +0200100 <File Id="libssp_0.dll" Name="libssp-0.dll" Source="$(var.BIN_DIR)/libssp-0.dll" KeyPath="yes" DiskId="1"/>
Leonid Bloch5e994f92015-08-03 20:54:23 +0300101 </Component>
102 <Component Id="libwinpthread" Guid="{6C117C78-0F47-4B07-8F34-6BEE11643829}">
Marc-André Lureau5b9e7d02022-05-25 16:41:39 +0200103 <File Id="libwinpthread_1.dll" Name="libwinpthread-1.dll" Source="$(var.BIN_DIR)/libwinpthread-1.dll" KeyPath="yes" DiskId="1"/>
Leonid Bloch5e994f92015-08-03 20:54:23 +0300104 </Component>
Andrey Drobyshev9ca180b2022-12-13 17:13:43 +0200105 <?if $(var.LIBPCRE) = "libpcre1"?>
106 <Component Id="libpcre" Guid="{7A86B45E-A009-489A-A849-CE3BACF03CD0}">
107 <File Id="libpcre_1.dll" Name="libpcre-1.dll" Source="$(var.BIN_DIR)/libpcre-1.dll" KeyPath="yes" DiskId="1"/>
108 </Component>
109 <?else?>
110 <Component Id="libpcre" Guid="{F92A3804-B59C-419D-8F29-99A30352C156}">
111 <File Id="libpcre2_8_0.dll" Name="libpcre2-8-0.dll" Source="$(var.BIN_DIR)/libpcre2-8-0.dll" KeyPath="yes" DiskId="1"/>
112 </Component>
113 <?endif?>
Leonid Bloch1d394fb2015-08-03 20:54:21 +0300114 <Component Id="registry_entries" Guid="{D075D109-51CA-11E3-9F8B-000C29858960}">
Yossi Hindin66ae13b2015-05-06 14:57:39 +0300115 <RegistryKey Root="HKLM"
Marc-André Lureau4f3c5772022-05-25 16:41:36 +0200116 Key="Software\$(var.QEMU_GA_MANUFACTURER)\$(var.QEMU_GA_DISTRO)\Tools\QemuGA">
Yossi Hindin66ae13b2015-05-06 14:57:39 +0300117 <RegistryValue Type="string" Name="ProductID" Value="fb0a0d66-c7fb-4e2e-a16b-c4a3bfe8d13b" />
Marc-André Lureau4f3c5772022-05-25 16:41:36 +0200118 <RegistryValue Type="string" Name="Version" Value="$(var.QEMU_GA_VERSION)" />
Yossi Hindin66ae13b2015-05-06 14:57:39 +0300119 </RegistryKey>
Andrey Drobyshevf9f0e612022-11-29 19:38:08 +0200120 <RegistryKey Root="HKLM"
121 Key="System\CurrentControlSet\Services\EventLog\Application\qemu-ga">
122 <RegistryValue Type="integer" Name="TypesSupported" Value="7" />
123 <RegistryValue Type="string" Name="EventMessageFile" Value="[qemu_ga_directory]qemu-ga.exe" />
124 </RegistryKey>
Kfir Manorfe67fc02023-02-09 10:50:02 +0200125 <RegistryKey Root="HKLM"
126 Key="System\CurrentControlSet\Services\QEMU Guest Agent VSS Provider">
127 <RegistryValue Type="integer" Name="VssOption" Value="1" />
128 </RegistryKey>
Yossi Hindin66ae13b2015-05-06 14:57:39 +0300129 </Component>
130 </Directory>
131 </Directory>
132 </Directory>
133
Konstantin Kostiuk07ce1782023-03-03 21:20:08 +0200134 <Property Id="rundll" Value="rundll32.exe"/>
Leonid Bloch848849d2015-08-03 20:54:24 +0300135 <Property Id="REINSTALLMODE" Value="amus"/>
Yossi Hindin66ae13b2015-05-06 14:57:39 +0300136
Leonid Bloch8b17ccc2015-08-03 20:54:22 +0300137 <?ifdef var.InstallVss?>
Yossi Hindin66ae13b2015-05-06 14:57:39 +0300138 <CustomAction Id="RegisterCom"
Konstantin Kostiuk07ce1782023-03-03 21:20:08 +0200139 ExeCommand='"[qemu_ga_directory]qga-vss.dll",DLLCOMRegister'
Yossi Hindin66ae13b2015-05-06 14:57:39 +0300140 Execute="deferred"
Konstantin Kostiuk07ce1782023-03-03 21:20:08 +0200141 Property="rundll"
Yossi Hindin66ae13b2015-05-06 14:57:39 +0300142 Impersonate="no"
143 Return="check"
144 >
145 </CustomAction>
146 <CustomAction Id="UnRegisterCom"
Konstantin Kostiuk07ce1782023-03-03 21:20:08 +0200147 ExeCommand='"[qemu_ga_directory]qga-vss.dll",DLLCOMUnregister'
Yossi Hindin66ae13b2015-05-06 14:57:39 +0300148 Execute="deferred"
Konstantin Kostiuk07ce1782023-03-03 21:20:08 +0200149 Property="rundll"
Yossi Hindin66ae13b2015-05-06 14:57:39 +0300150 Impersonate="no"
151 Return="check"
Leonid Bloch0a187502015-07-29 20:10:51 +0300152 >
153 </CustomAction>
Yossi Hindin66ae13b2015-05-06 14:57:39 +0300154 <?endif?>
155
156 <Feature Id="QEMUFeature" Title="QEMU Guest Agent" Level="1">
157 <ComponentRef Id="qemu_ga" />
Leonid Bloch5e994f92015-08-03 20:54:23 +0300158 <?ifdef var.InstallVss?>
Michael Rothe3008582021-08-02 22:28:58 -0500159 <ComponentRef Id="libstdc++_6_lib" />
Leonid Bloch5e994f92015-08-03 20:54:23 +0300160 <ComponentRef Id="qga_vss_dll" />
161 <ComponentRef Id="qga_vss_tlb" />
162 <?endif?>
Yuri Pudgorodskiyf2b608a2015-11-19 15:20:37 +0300163 <ComponentRef Id="gspawn-helper-console" />
Yuri Pudgorodskiy44c6e002015-11-25 22:02:26 +0300164 <ComponentRef Id="gspawn-helper" />
Leonid Bloch5e994f92015-08-03 20:54:23 +0300165 <ComponentRef Id="iconv" />
166 <ComponentRef Id="libgcc_arch_lib" />
167 <ComponentRef Id="libglib" />
168 <ComponentRef Id="libintl" />
169 <ComponentRef Id="libssp" />
170 <ComponentRef Id="libwinpthread" />
Yossi Hindin66ae13b2015-05-06 14:57:39 +0300171 <ComponentRef Id="registry_entries" />
Thomas Lamprechtf2dce822017-06-01 14:47:46 +0200172 <ComponentRef Id="libpcre" />
Yossi Hindin66ae13b2015-05-06 14:57:39 +0300173 </Feature>
174
175 <InstallExecuteSequence>
Leonid Bloch8b17ccc2015-08-03 20:54:22 +0300176 <?ifdef var.InstallVss?>
Yossi Hindin66ae13b2015-05-06 14:57:39 +0300177 <Custom Action="UnRegisterCom" After="StopServices">Installed</Custom>
Leonid Bloch848849d2015-08-03 20:54:24 +0300178 <Custom Action="RegisterCom" After="InstallServices">NOT REMOVE</Custom>
Yossi Hindin66ae13b2015-05-06 14:57:39 +0300179 <?endif?>
180 </InstallExecuteSequence>
181 </Product>
182</Wix>