summaryrefslogtreecommitdiff
path: root/usbclerk.wxs.in
blob: fed7805686c314ce8e3244a483117c34a47b28b4 (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
65
66
67
68
69
70
<?xml version="1.0" encoding="utf-8"?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

  <?define Version = "@VERSION@"?>
  <?define UpgradeCode = "4a2c31e6-b10b-4c56-be28-c1ac35f5c52e"?>
  <Product Id="*" Name="USB Clerk" Manufacturer="$(env.MANUFACTURER)"
           Version="$(var.Version)" UpgradeCode="$(var.UpgradeCode)"
           Language="1033">

    <Package InstallerVersion="200" Compressed="yes" Comments="comments"/>
    <Media Id="1" Cabinet="cabinet.cab" EmbedCab="yes"/>

    <Property Id="ARPHELPLINK" Value="http://www.spice-space.org"/>
    <Property Id="ARPNOMODIFY" Value="1"/>
    <Property Id="ARPNOREPAIR" Value="1"/>
    <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="USB Clerk is already installed.">NOT NEWERVERSIONDETECTED</Condition>
    <InstallExecuteSequence>
      <RemoveExistingProducts After="InstallValidate"/>
    </InstallExecuteSequence>

    <!-- try to uninstall NSIS -->
    <Property Id='NSISINSTALL'>
      <RegistrySearch Id='NSISSearch' Root='HKLM' Key='Software\Spice\usbclerk' Type="raw" Name='Uninstall'/>
    </Property>
    <CustomAction Id="NSISUninstall" Property="NSISINSTALL" ExeCommand="/S" Execute="deferred" Impersonate="no" Return="ignore"/>
    <InstallExecuteSequence>
      <AppSearch Sequence='1'/>
      <Custom Action="NSISUninstall" After="InstallInitialize">NSISINSTALL AND NOT Installed</Custom>
    </InstallExecuteSequence>

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="INSTALLDIR" Name="USBClerk">
          <Component Id="CUSBClerk" Guid="e99861f7-524c-4107-860d-27f866072e53">
            <File Id='usbclerkexe' Name='usbclerk.exe' DiskId='1' Source='usbclerk.exe' KeyPath='yes'/>
            <ServiceInstall Id="USBClerkServiceInstall"
                            Name="USBClerk"
                            DisplayName="USB Clerk service"
                            Description="A Spice service for USB redirection"
                            Type="ownProcess"
                            Start="auto"
                            Account="[SERVICEACCOUNT]"
                            Password="[SERVICEPASSWORD]"
                            ErrorControl="normal"/>
           <ServiceControl Id="StartService"
                            Name="USBClerk"
                            Start="install"
                            Stop="both"
                            Remove="uninstall"
                            Wait="yes"/>
          </Component>
          <Component Id="CDepsTxt" Guid="be86cc16-bf4d-11e2-bbde-0024d71e178c">
            <File Id='depstxt' Name='deps.txt' DiskId='1' Source='deps.txt' KeyPath='yes'/>
          </Component>
        </Directory>
      </Directory>
    </Directory>

    <Feature Id="Complete"  Level="1">
      <ComponentRef Id="CUSBClerk"/>
      <ComponentRef Id="CDepsTxt"/>
    </Feature>

  </Product>
</Wix>