summaryrefslogtreecommitdiff
path: root/contrib/msi/podman.wxs
blob: c1b8f1a2332656110c64047e9b84f2bd92833c73 (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
<?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"/>
    <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>
          </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"/>

    <Feature Id="Complete" Level="1">
      <ComponentRef Id="INSTALLDIR_Component"/>
      <ComponentRef Id="MainExecutable"/>
      <ComponentRef Id="WinPathExecutable"/>
      <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" After="InstallFiles">NOT Installed</Custom>
      <Custom Action="RemovePath" Before="RemoveFiles" After="InstallInitiailize">(REMOVE="ALL") AND (NOT UPGRADINGPRODUCTCODE)</Custom>
    </InstallExecuteSequence>

  </Product>
</Wix>