summaryrefslogtreecommitdiffstats
path: root/src/windows/installer/wix/kfw.wxs
blob: 2f7e41358a2f25af8b2e7abea032d7952b7ec10b (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<?xml version="1.0" encoding="utf-8"?>
<!--

  Copyright (C) 2004 by the Massachusetts Institute of Technology.
  All rights reserved.
 
  Export of this software from the United States of America may
    require a specific license from the United States Government.
    It is the responsibility of any person or organization contemplating
    export to obtain such a license before exporting.
 
  WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
  distribute this software and its documentation for any purpose and
  without fee is hereby granted, provided that the above copyright
  notice appear in all copies and that both that copyright notice and
  this permission notice appear in supporting documentation, and that
  the name of M.I.T. not be used in advertising or publicity pertaining
  to distribution of the software without specific, written prior
  permission.  Furthermore if you modify this software you must label
  your software as modified software and not distribute it in such a
  fashion that it might be confused with the original M.I.T. software.
  M.I.T. makes no representations about the suitability of
  this software for any purpose.  It is provided "as is" without express
  or implied warranty.
  
  -->

<!-- configuration -->
<?include config.wxi?>

<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi">
    <Product 
        Id="$(var.ProductCode)"
        Codepage="$(var.CodePage)"
        Language="$(var.Language)"
        Manufacturer="$(loc.Manufacturer)"
        Name="$(var.ProductName)"
        UpgradeCode="61211594-AAA1-4A98-A299-757326763CC7"
        Version="$(var.VersionString)">
    
        <!-- The weird package code results in a new one being generated each time we compile -->
        <Package 
            Id="????????-????-????-????-????????????"
            Keywords="Installer,MSI,Database"
            Description="$(var.ProductName)"
            Comments="$(var.ProductFullName)"
            Manufacturer="$(loc.Manufacturer)"
            InstallerVersion="110"
            Languages="$(var.Language)"
            Compressed="yes"
            SummaryCodepage="$(var.CodePage)" 
            />
        
        <?include lang\ui_$(var.BuildLang).wxi?>
        <?include files.wxi?>
        <?include features.wxi?>
        <?include property.wxi?>
        
        <!-- Launch conditions -->
        <Condition Message="$(loc.AdminRequired)">Privileged</Condition>
        <Condition Message="$(loc.OsVersionRequired)">Version9X &gt;= 410 Or VersionNT &gt;= 400</Condition>
        
        <!-- Custom actions -->
        <Binary Id="binCustom" src="custom\custom.dll" />
        
        <CustomAction 
            Id="EnableTgtSessionKey"
            BinaryKey="binCustom"
            DllEntry="EnableAllowTgtSessionKey"
            Execute="deferred"
            Impersonate="no"
            Return="check" />
        <Property Id="EnableTgtSessionKey" Value="$(var.VersionString)" />

        <CustomAction 
            Id="RevertTgtSessionKey"
            BinaryKey="binCustom"
            DllEntry="RevertAllowTgtSessionKey"
            Execute="deferred"
            Impersonate="no"
            Return="check" />
        <Property Id="RevertTgtSessionKey" Value="$(var.VersionString)" />

        <CustomAction 
            Id="RollbackTgtSessionKey"
            BinaryKey="binCustom"
            DllEntry="RevertAllowTgtSessionKey"
            Execute="rollback"
            Impersonate="no"
            Return="check" />
        <Property Id="RollbackTgtSessionKey" Value="$(var.VersionString)" />

		<CustomAction 
            Id="RemoveNsisInstallation" 
            BinaryKey="binCustom"
            DllEntry="UninstallNsisInstallation"
            Execute="immediate" />

		<CustomAction
            Id="AbortCantRemoveNSIS"
            Value="[CantRemoveNSISError]" />

		<CustomAction
            Id="AbortNoIE"
            Value="[NoIE501Error]" />
            
        <CustomAction
            Id="ListRunningProcesses"
            BinaryKey="binCustom"
            DllEntry="ListRunningProcesses"
            Execute="immediate"
            Return="ignore" />
            
        <CustomAction
            Id="KillRunningProcesses"
            BinaryKey="binCustom"
            DllEntry="KillRunningProcesses"
            Execute="immediate"
            Return="ignore" />

		<AdminExecuteSequence />
        <InstallExecuteSequence>
			<RemoveExistingProducts After="InstallValidate">UPGRADEPISMERE Or UPGRADEKFW</RemoveExistingProducts>
		    <Custom Action="KillRunningProcesses" After="InstallValidate"/>
			<!-- When running with a UI, CCP_Success property is not passed down to the server. -->
			<Custom Action="AbortNoIE" Before="RemoveNsisInstallation">UILevel = 0 And (Not Installed) And (CCP_Success &lt;&gt; 1)</Custom>
			<Custom Action="RemoveNsisInstallation" Before="AbortCantRemoveNSIS">UPGRADENSIS &lt;&gt; "" And UILevel &gt;= 4</Custom>
			<Custom Action="AbortCantRemoveNSIS" Before="CostInitialize">UPGRADENSIS &lt;&gt; "" And UILevel &lt; 4</Custom>
            <Custom Action="RollbackTgtSessionKey" After="WriteRegistryValues">VersionNT &gt;= 500 And &amp;feaKfwClient=3</Custom>
            <Custom Action="EnableTgtSessionKey" After="RollbackTgtSessionKey">VersionNT &gt;= 500 And &amp;feaKfwClient=3</Custom>
            <Custom Action="RevertTgtSessionKey" Before="RemoveRegistryValues">VersionNT &gt;= 500 And &amp;feaKfwClient=2</Custom>
        </InstallExecuteSequence>

        <!-- Upgrade paths -->

        <!-- MIT Project Pismere MSI -->
        <Upgrade Id="83977767-388D-4DF8-BB08-3BF2401635BD">
            <UpgradeVersion IgnoreRemoveFailure="no" IncludeMinimum="no" Maximum="4.0.0" MigrateFeatures="no" Property="UPGRADEPISMERE"/>
        </Upgrade>
        
        <!-- KfW MSI -->
        <Upgrade Id="61211594-AAA1-4A98-A299-757326763CC7">
            <UpgradeVersion IgnoreRemoveFailure="no" IncludeMinimum="no" Maximum="$(var.VersionString)" IncludeMaximum="no" MigrateFeatures="yes" Property="UPGRADEKFW" />
        </Upgrade>
       
        <!-- NSIS installation -->
        <!-- The NSIS installation, being non-MSI, is detected and removed through other means. -->
        
        <!-- Check and warn if we don't have the right version of IE installed -->
        <ComplianceCheck>
            <DirectorySearch Id="ccd_iphlpapi" Depth="1" Path="[SystemFolder]">
                <FileSearch Id="cc_iphlp" MinDate="1999-04-23T00:00:00-05:00" Name="iphlpapi.dll" />
            </DirectorySearch>
        </ComplianceCheck>
        
        <!-- We embed all the files in a single cabinet. -->
        <Media Id="1" Cabinet="Disk1" CompressionLevel="high" EmbedCab="yes" />
        
        <!-- Custom table used by KillProcesses custom action -->
        <CustomTable Id="KillProcess">
            <Column Id="Id" PrimaryKey="yes" Nullable="no" Type="string" Width="32" />
            <Column Id="Image" Nullable="no" Type="string" Width="255" />
            <Column Id="Desc" Nullable="yes" Type="string" Width="255" />
            
            <Row>
                <Data Column="Id">kpLeash</Data>
                <Data Column="Image">leash32.exe</Data>
                <Data Column="Desc">Leash Ticket Manager</Data>
            </Row>
            <Row>
                <Data Column="Id">kpKrbcc</Data>
                <Data Column="Image">krbcc32s.exe</Data>
                <Data Column="Desc">Kerberos Credential Cache</Data>
            </Row>
            <Row>
                <Data Column="Id">kpK95</Data>
                <Data Column="Image">k95.exe</Data>
                <Data Column="Desc"></Data>
            </Row>
            <Row>
                <Data Column="Id">kpK95g</Data>
                <Data Column="Image">k95g.exe</Data>
                <Data Column="Desc"></Data>
            </Row>
            <Row>
                <Data Column="Id">kpkrb5</Data>
                <Data Column="Image">krb5.exe</Data>
                <Data Column="Desc">Kerberos Client</Data>
            </Row>
            <Row>
                <Data Column="Id">kpgss</Data>
                <Data Column="Image">gss.exe</Data>
                <Data Column="Desc">GSSAPI Test Client</Data>
            </Row>
            <Row>
                <Data Column="Id">kpafscreds</Data>
                <Data Column="Image">afscreds.exe</Data>
                <Data Column="Desc">AFS Credentials Manager</Data>
            </Row>
        </CustomTable>
    </Product>
</Wix>