summaryrefslogtreecommitdiff
path: root/contrib/msi/podman.wxs
blob: ac2b5f3284b7401780571147142b72ccec9d75c7 (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
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

  <?ifndef var.VERSION?>
  <?error VERSION must be defined via command line argument?>
  <?endif?>

  <?ifndef var.ManSourceDir?>
  <?define ManSourceDir = "bin/windows" ?>
  <?endif?>

  <Product Name="Podman $(var.VERSION)" Id="*" UpgradeCode="696BAB5D-CA1F-4B05-B123-320F245B8D6D" Version="$(var.VERSION)" Language="1033" Manufacturer="Red Hat Inc.">

    <Package Id="*" Keywords="Installer" Description="Red Hat's Podman $(var.VERSION) Installer" Comments="Apache 2.0 License" Manufacturer="Red Hat Inc." InstallScope="perMachine" InstallerVersion="200" Compressed="yes"/>
    <Media Id="1" Cabinet="Podman.cab" EmbedCab="yes"/>
    <!-- Switch to AllowDowngrades="yes" when msitools is released with commit dde7dd2f -->
    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed. Uninstall first to downgrade."/>
    <Property Id="DiskPrompt" Value="Red Hat's Podman $(var.VERSION) Installation"/>

    <Directory Id="TARGETDIR" Name="SourceDir">

      <Directory Id="ProgramFiles64Folder" Name="PFiles">
        <Directory Id="RedHatPFiles" Name="RedHat">
          <Directory Id="INSTALLDIR" Name="Podman">
            <Component Id="INSTALLDIR_Component" Guid="14B310C4-9B5D-4DA5-ADF9-B9D008E4CD82" Win64="Yes">
              <CreateFolder/>
            </Component>
            <Component Id="MainExecutable" Guid="73752F94-6589-4C7B-ABED-39D655A19714" Win64="Yes">
              <File Id="520C6E17-77A2-4F41-9611-30FA763A0702" Name="podman.exe" Source="bin/windows/podman.exe" KeyPath="yes"/>
            </Component>
            <Component Id="WinPathExecutable" Guid="00F5B731-D4A6-4B69-87B0-EA4EBAB89F95" Win64="Yes">
              <File Id="8F507E28-A61D-4E64-A92B-B5A00F023AE8" Name="winpath.exe" Source="bin/windows/winpath.exe" KeyPath="yes"/>
            </Component>
            <Component Id="WinSshProxyExecutable" Guid="0DA730AB-2F97-40E8-A8FC-356E88EAA4D2" Win64="Yes">
              <File Id="4A2AD125-34E7-4BD8-BE28-B2A9A5EDBEB5" Name="win-sshproxy.exe" Source="bin/windows/win-sshproxy.exe" KeyPath="yes"/>
            </Component>
          </Directory>
        </Directory>
      </Directory>
    </Directory>

    <CustomAction Id="AddPath" ExeCommand="add" FileKey="8F507E28-A61D-4E64-A92B-B5A00F023AE8" Execute="deferred" Impersonate="yes" Return="check"/>
    <CustomAction Id="RemovePath" ExeCommand="remove" FileKey="8F507E28-A61D-4E64-A92B-B5A00F023AE8" Execute="deferred" Impersonate="yes" Return="check"/>
    <CustomAction Id='LaunchFile' ExeCommand="open &quot;[INSTALLDIR]podman-for-windows.html&quot;" FileKey="8F507E28-A61D-4E64-A92B-B5A00F023AE8"  Execute="immediate"  Impersonate="yes" Return="check"/>
    <Feature Id="Complete" Level="1">
      <ComponentRef Id="INSTALLDIR_Component"/>
      <ComponentRef Id="MainExecutable"/>
      <ComponentRef Id="WinPathExecutable"/>
      <ComponentRef Id="WinSshProxyExecutable"/>
      <ComponentGroupRef Id="ManFiles"/>
    </Feature>

    <Icon Id="podman.ico" SourceFile="contrib/msi/podman-logo.ico"/>
    <Property Id="ARPPRODUCTICON" Value="podman.ico"/>

    <InstallExecuteSequence>
      <RemoveExistingProducts Before="InstallInitialize"/>
      <Custom Action="AddPath" Before="InstallFinalize"  After="InstallFiles">NOT Installed</Custom>
      <Custom Action="RemovePath" Before="RemoveFiles" After="InstallInitialize">(REMOVE="ALL") AND (NOT UPGRADINGPRODUCTCODE)</Custom>
      <Custom Action='LaunchFile' After='InstallFinalize'>(NOT Installed) AND (NOT UILevel=2)</Custom>
    </InstallExecuteSequence>

  </Product>
</Wix>