xref: /openbmc/qemu/qga/installer/qemu-ga.wxs (revision fe67fc0e)
166ae13bbSYossi Hindin<?xml version="1.0" encoding="UTF-8"?>
266ae13bbSYossi Hindin<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
366ae13bbSYossi Hindin  <?if $(var.Arch) = "64"?>
466ae13bbSYossi Hindin    <?define ArchLib=libgcc_s_seh-1.dll?>
566ae13bbSYossi Hindin    <?define GaProgramFilesFolder="ProgramFiles64Folder" ?>
60480a1b6SMarc-André Lureau  <?else?>
766ae13bbSYossi Hindin    <?if $(var.Arch) = "32"?>
85f2a8b1fSGerd Hoffmann      <?define ArchLib=libgcc_s_dw2-1.dll?>
966ae13bbSYossi Hindin      <?define GaProgramFilesFolder="ProgramFilesFolder" ?>
100480a1b6SMarc-André Lureau    <?else?>
1166ae13bbSYossi Hindin      <?error Unexpected Arch value $(var.Arch)?>
1266ae13bbSYossi Hindin    <?endif?>
130480a1b6SMarc-André Lureau  <?endif?>
1466ae13bbSYossi Hindin
1566ae13bbSYossi Hindin  <Product
1666ae13bbSYossi Hindin    Name="QEMU guest agent"
17a972304dSBishara AbuHattoum    Id="*"
181d394fb7SLeonid Bloch    UpgradeCode="{EB6B8302-C06E-4BEC-ADAC-932C68A3A98D}"
194f3c5778SMarc-André Lureau    Manufacturer="$(var.QEMU_GA_MANUFACTURER)"
204f3c5778SMarc-André Lureau    Version="$(var.QEMU_GA_VERSION)"
2166ae13bbSYossi Hindin    Language="1033">
2266ae13bbSYossi Hindin    <?if $(var.Arch) = 32 ?>
2366ae13bbSYossi Hindin    <Condition Message="Error: 32-bit version of Qemu GA can not be installed on 64-bit Windows.">NOT VersionNT64</Condition>
2466ae13bbSYossi Hindin    <?endif?>
2566ae13bbSYossi Hindin    <Package
264f3c5778SMarc-André Lureau      Manufacturer="$(var.QEMU_GA_MANUFACTURER)"
2766ae13bbSYossi Hindin      InstallerVersion="200"
2866ae13bbSYossi Hindin      Languages="1033"
2966ae13bbSYossi Hindin      Compressed="yes"
3066ae13bbSYossi Hindin      InstallScope="perMachine"
3166ae13bbSYossi Hindin      />
324f3c5778SMarc-André Lureau    <Media Id="1" Cabinet="qemu_ga.$(var.QEMU_GA_VERSION).cab" EmbedCab="yes" />
3366ae13bbSYossi Hindin    <Property Id="WHSLogo">1</Property>
3488288c2aSKonstantin Kostiuk    <Property Id="ARPNOMODIFY" Value="yes" Secure="yes" />
35848849ddSLeonid Bloch    <MajorUpgrade
36848849ddSLeonid Bloch      DowngradeErrorMessage="Error: A newer version of QEMU guest agent is already installed."
37848849ddSLeonid Bloch      />
3866ae13bbSYossi Hindin
3966ae13bbSYossi Hindin    <Directory Id="TARGETDIR" Name="SourceDir">
4066ae13bbSYossi Hindin      <Directory Id="$(var.GaProgramFilesFolder)" Name="QEMU Guest Agent">
4166ae13bbSYossi Hindin        <Directory Id="qemu_ga_directory" Name="Qemu-ga">
421d394fb7SLeonid Bloch          <Component Id="qemu_ga" Guid="{908B7199-DE2A-4DC6-A8D0-27A5AE444FEA}">
434f3c5778SMarc-André Lureau            <File Id="qemu_ga.exe" Name="qemu-ga.exe" Source="$(var.BUILD_DIR)/qga/qemu-ga.exe" KeyPath="yes" DiskId="1"/>
4466ae13bbSYossi Hindin            <ServiceInstall
4566ae13bbSYossi Hindin              Id="ServiceInstaller"
4666ae13bbSYossi Hindin              Type="ownProcess"
4766ae13bbSYossi Hindin              Vital="yes"
4866ae13bbSYossi Hindin              Name="QEMU-GA"
4966ae13bbSYossi Hindin              DisplayName="QEMU Guest Agent"
5066ae13bbSYossi Hindin              Description="QEMU Guest Agent"
5166ae13bbSYossi Hindin              Start="auto"
5266ae13bbSYossi Hindin              Account="LocalSystem"
5366ae13bbSYossi Hindin              ErrorControl="ignore"
5466ae13bbSYossi Hindin              Interactive="no"
55ebc88c0eSMichael Roth              Arguments="-d --retry-path"
5666ae13bbSYossi Hindin              >
5766ae13bbSYossi Hindin            </ServiceInstall>
58bb1ce44bSBasil Salman            <ServiceControl Id="StartService" Start="install" Stop="both" Remove="uninstall" Name="QEMU-GA" Wait="yes" />
5966ae13bbSYossi Hindin          </Component>
605e994f94SLeonid Bloch          <?ifdef var.InstallVss?>
61e300858eSMichael Roth          <Component Id="libstdc++_6_lib" Guid="{55E737B5-9127-4A11-9FC3-A29367714574}">
625b9e7d05SMarc-André Lureau            <File Id="libstdc++-6.lib" Name="libstdc++-6.dll" Source="$(var.BIN_DIR)/libstdc++-6.dll" KeyPath="yes" DiskId="1"/>
63e300858eSMichael Roth          </Component>
645e994f94SLeonid Bloch          <Component Id="qga_vss_dll" Guid="{CB19C453-FABB-4BB1-ABAB-6B74F687BFBB}">
654f3c5778SMarc-André Lureau            <File Id="qga_vss.dll" Name="qga-vss.dll" Source="$(var.BUILD_DIR)/qga/vss-win32/qga-vss.dll" KeyPath="yes" DiskId="1"/>
665e994f94SLeonid Bloch          </Component>
675e994f94SLeonid Bloch          <Component Id="qga_vss_tlb" Guid="{D8D584B1-59C2-4FB7-A91F-636FF7BFA66E}">
684f3c5778SMarc-André Lureau            <File Id="qga_vss.tlb" Name="qga-vss.tlb" Source="$(var.BUILD_DIR)/qga/vss-win32/qga-vss.tlb" KeyPath="yes" DiskId="1"/>
695e994f94SLeonid Bloch          </Component>
705e994f94SLeonid Bloch          <?endif?>
71f2b608abSYuri Pudgorodskiy          <?if $(var.Arch) = "32"?>
72f2b608abSYuri Pudgorodskiy          <Component Id="gspawn-helper-console" Guid="{446185B3-87BE-43D2-96B8-0FEFD9E8696D}">
735b9e7d05SMarc-André Lureau            <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"/>
74f2b608abSYuri Pudgorodskiy          </Component>
7544c6e00cSYuri Pudgorodskiy          <Component Id="gspawn-helper" Guid="{CD67A5A3-2DB1-4DA1-A67A-8D71E797B466}">
765b9e7d05SMarc-André Lureau            <File Id="gspawn-win32-helper.exe" Name="gspawn-win32-helper.exe" Source="$(var.BIN_DIR)/gspawn-win32-helper-console.exe" KeyPath="yes" DiskId="1"/>
7744c6e00cSYuri Pudgorodskiy          </Component>
78f2b608abSYuri Pudgorodskiy          <?endif?>
79f2b608abSYuri Pudgorodskiy          <?if $(var.Arch) = "64"?>
80f2b608abSYuri Pudgorodskiy          <Component Id="gspawn-helper-console" Guid="{9E615A9F-349A-4992-A5C2-C10BAD173660}">
815b9e7d05SMarc-André Lureau            <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"/>
82f2b608abSYuri Pudgorodskiy          </Component>
8344c6e00cSYuri Pudgorodskiy          <Component Id="gspawn-helper" Guid="{D201AD22-1846-4E4F-B6E1-C7A908ED2457}">
845b9e7d05SMarc-André Lureau            <File Id="gspawn-win64-helper.exe" Name="gspawn-win64-helper.exe" Source="$(var.BIN_DIR)/gspawn-win64-helper-console.exe" KeyPath="yes" DiskId="1"/>
8544c6e00cSYuri Pudgorodskiy          </Component>
86f2b608abSYuri Pudgorodskiy          <?endif?>
875e994f94SLeonid Bloch          <Component Id="iconv" Guid="{35EE3558-D34B-4F0A-B8BD-430FF0775246}">
885b9e7d05SMarc-André Lureau            <File Id="iconv.dll" Name="iconv.dll" Source="$(var.BIN_DIR)/iconv.dll" KeyPath="yes" DiskId="1"/>
895e994f94SLeonid Bloch          </Component>
905e994f94SLeonid Bloch          <Component Id="libgcc_arch_lib" Guid="{ADD4D07D-4515-4AB6-AF3E-C904961B4BB0}">
915b9e7d05SMarc-André Lureau            <File Id="libgcc_arch_lib" Name="$(var.ArchLib)" Source="$(var.BIN_DIR)/$(var.ArchLib)" KeyPath="yes" DiskId="1"/>
925e994f94SLeonid Bloch          </Component>
935e994f94SLeonid Bloch          <Component Id="libglib" Guid="{D31BFD83-2773-4B65-B45A-E0D2ADA58679}">
945b9e7d05SMarc-André Lureau            <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"/>
955e994f94SLeonid Bloch          </Component>
965e994f94SLeonid Bloch          <Component Id="libintl" Guid="{A641BC2D-A907-4A94-9149-F30ED430878F}">
975b9e7d05SMarc-André Lureau            <File Id="libintl_8.dll" Name="libintl-8.dll" Source="$(var.BIN_DIR)/libintl-8.dll" KeyPath="yes" DiskId="1"/>
985e994f94SLeonid Bloch          </Component>
995e994f94SLeonid Bloch          <Component Id="libssp" Guid="{7880087B-02B4-4EF6-A5D3-D18F8E3D90E1}">
1005b9e7d05SMarc-André Lureau            <File Id="libssp_0.dll" Name="libssp-0.dll" Source="$(var.BIN_DIR)/libssp-0.dll" KeyPath="yes" DiskId="1"/>
1015e994f94SLeonid Bloch          </Component>
1025e994f94SLeonid Bloch          <Component Id="libwinpthread" Guid="{6C117C78-0F47-4B07-8F34-6BEE11643829}">
1035b9e7d05SMarc-André Lureau            <File Id="libwinpthread_1.dll" Name="libwinpthread-1.dll" Source="$(var.BIN_DIR)/libwinpthread-1.dll" KeyPath="yes" DiskId="1"/>
1045e994f94SLeonid Bloch          </Component>
1059ca180bcSAndrey Drobyshev          <?if $(var.LIBPCRE) = "libpcre1"?>
106f2dce827SThomas Lamprecht            <Component Id="libpcre" Guid="{7A86B45E-A009-489A-A849-CE3BACF03CD0}">
1075b9e7d05SMarc-André Lureau              <File Id="libpcre_1.dll" Name="libpcre-1.dll" Source="$(var.BIN_DIR)/libpcre-1.dll" KeyPath="yes" DiskId="1"/>
108f2dce827SThomas Lamprecht            </Component>
1099ca180bcSAndrey Drobyshev          <?else?>
1109ca180bcSAndrey Drobyshev            <Component Id="libpcre" Guid="{F92A3804-B59C-419D-8F29-99A30352C156}">
1119ca180bcSAndrey Drobyshev              <File Id="libpcre2_8_0.dll" Name="libpcre2-8-0.dll" Source="$(var.BIN_DIR)/libpcre2-8-0.dll" KeyPath="yes" DiskId="1"/>
1129ca180bcSAndrey Drobyshev            </Component>
1139ca180bcSAndrey Drobyshev          <?endif?>
1141d394fb7SLeonid Bloch          <Component Id="registry_entries" Guid="{D075D109-51CA-11E3-9F8B-000C29858960}">
11566ae13bbSYossi Hindin            <RegistryKey Root="HKLM"
1164f3c5778SMarc-André Lureau                         Key="Software\$(var.QEMU_GA_MANUFACTURER)\$(var.QEMU_GA_DISTRO)\Tools\QemuGA">
11766ae13bbSYossi Hindin              <RegistryValue Type="string" Name="ProductID" Value="fb0a0d66-c7fb-4e2e-a16b-c4a3bfe8d13b" />
1184f3c5778SMarc-André Lureau              <RegistryValue Type="string" Name="Version" Value="$(var.QEMU_GA_VERSION)" />
11966ae13bbSYossi Hindin            </RegistryKey>
120f9f0e617SAndrey Drobyshev            <RegistryKey Root="HKLM"
121f9f0e617SAndrey Drobyshev                         Key="System\CurrentControlSet\Services\EventLog\Application\qemu-ga">
122f9f0e617SAndrey Drobyshev              <RegistryValue Type="integer" Name="TypesSupported" Value="7" />
123f9f0e617SAndrey Drobyshev              <RegistryValue Type="string" Name="EventMessageFile" Value="[qemu_ga_directory]qemu-ga.exe" />
124f9f0e617SAndrey Drobyshev            </RegistryKey>
125*fe67fc0eSKfir Manor            <RegistryKey Root="HKLM"
126*fe67fc0eSKfir Manor                         Key="System\CurrentControlSet\Services\QEMU Guest Agent VSS Provider">
127*fe67fc0eSKfir Manor              <RegistryValue Type="integer" Name="VssOption" Value="1" />
128*fe67fc0eSKfir Manor            </RegistryKey>
12966ae13bbSYossi Hindin          </Component>
13066ae13bbSYossi Hindin        </Directory>
13166ae13bbSYossi Hindin      </Directory>
13266ae13bbSYossi Hindin    </Directory>
13366ae13bbSYossi Hindin
13407ce178aSKonstantin Kostiuk    <Property Id="rundll" Value="rundll32.exe"/>
135848849ddSLeonid Bloch    <Property Id="REINSTALLMODE" Value="amus"/>
13666ae13bbSYossi Hindin
13766ae13bbSYossi Hindin    <?ifdef var.InstallVss?>
13866ae13bbSYossi Hindin    <CustomAction Id="RegisterCom"
13907ce178aSKonstantin Kostiuk              ExeCommand='"[qemu_ga_directory]qga-vss.dll",DLLCOMRegister'
14066ae13bbSYossi Hindin              Execute="deferred"
14107ce178aSKonstantin Kostiuk              Property="rundll"
14266ae13bbSYossi Hindin              Impersonate="no"
14366ae13bbSYossi Hindin              Return="check"
14466ae13bbSYossi Hindin              >
14566ae13bbSYossi Hindin    </CustomAction>
14666ae13bbSYossi Hindin    <CustomAction Id="UnRegisterCom"
14707ce178aSKonstantin Kostiuk              ExeCommand='"[qemu_ga_directory]qga-vss.dll",DLLCOMUnregister'
14866ae13bbSYossi Hindin              Execute="deferred"
14907ce178aSKonstantin Kostiuk              Property="rundll"
15066ae13bbSYossi Hindin              Impersonate="no"
15166ae13bbSYossi Hindin              Return="check"
1520a18750fSLeonid Bloch              >
1530a18750fSLeonid Bloch    </CustomAction>
15466ae13bbSYossi Hindin    <?endif?>
15566ae13bbSYossi Hindin
15666ae13bbSYossi Hindin    <Feature Id="QEMUFeature" Title="QEMU Guest Agent" Level="1">
15766ae13bbSYossi Hindin      <ComponentRef Id="qemu_ga" />
1585e994f94SLeonid Bloch      <?ifdef var.InstallVss?>
159e300858eSMichael Roth      <ComponentRef Id="libstdc++_6_lib" />
1605e994f94SLeonid Bloch      <ComponentRef Id="qga_vss_dll" />
1615e994f94SLeonid Bloch      <ComponentRef Id="qga_vss_tlb" />
1625e994f94SLeonid Bloch      <?endif?>
163f2b608abSYuri Pudgorodskiy      <ComponentRef Id="gspawn-helper-console" />
16444c6e00cSYuri Pudgorodskiy      <ComponentRef Id="gspawn-helper" />
1655e994f94SLeonid Bloch      <ComponentRef Id="iconv" />
1665e994f94SLeonid Bloch      <ComponentRef Id="libgcc_arch_lib" />
1675e994f94SLeonid Bloch      <ComponentRef Id="libglib" />
1685e994f94SLeonid Bloch      <ComponentRef Id="libintl" />
1695e994f94SLeonid Bloch      <ComponentRef Id="libssp" />
1705e994f94SLeonid Bloch      <ComponentRef Id="libwinpthread" />
17166ae13bbSYossi Hindin      <ComponentRef Id="registry_entries" />
172f2dce827SThomas Lamprecht      <ComponentRef Id="libpcre" />
17366ae13bbSYossi Hindin    </Feature>
17466ae13bbSYossi Hindin
17566ae13bbSYossi Hindin    <InstallExecuteSequence>
17666ae13bbSYossi Hindin      <?ifdef var.InstallVss?>
17766ae13bbSYossi Hindin      <Custom Action="UnRegisterCom" After="StopServices">Installed</Custom>
178848849ddSLeonid Bloch      <Custom Action="RegisterCom" After="InstallServices">NOT REMOVE</Custom>
17966ae13bbSYossi Hindin      <?endif?>
18066ae13bbSYossi Hindin    </InstallExecuteSequence>
18166ae13bbSYossi Hindin  </Product>
18266ae13bbSYossi Hindin</Wix>
183