xref: /freebsd/crypto/krb5/src/windows/installer/wix/kfw.wxs (revision f1c4c3daccbaf3820f0e2224de53df12fc952fcc)
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3
4  Copyright (C) 2004,2005, 2006 by the Massachusetts Institute of Technology.
5  All rights reserved.
6
7  Export of this software from the United States of America may
8    require a specific license from the United States Government.
9    It is the responsibility of any person or organization contemplating
10    export to obtain such a license before exporting.
11
12  WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
13  distribute this software and its documentation for any purpose and
14  without fee is hereby granted, provided that the above copyright
15  notice appear in all copies and that both that copyright notice and
16  this permission notice appear in supporting documentation, and that
17  the name of M.I.T. not be used in advertising or publicity pertaining
18  to distribution of the software without specific, written prior
19  permission.  Furthermore if you modify this software you must label
20  your software as modified software and not distribute it in such a
21  fashion that it might be confused with the original M.I.T. software.
22  M.I.T. makes no representations about the suitability of
23  this software for any purpose.  It is provided "as is" without express
24  or implied warranty.
25
26  -->
27
28<!-- configuration -->
29<?include config.wxi?>
30<?include platform.wxi?>
31
32<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
33    <Product
34        Id="$(var.ProductCode)"
35        Codepage="$(var.CodePage)"
36        Language="$(var.Language)"
37        Manufacturer="!(loc.Manufacturer)"
38        Name="$(var.ProductName)"
39        UpgradeCode="$(var.UpgradeCode)"
40        Version="$(var.VersionString)">
41
42        <!-- The weird package code results in a new one being generated each time we compile -->
43        <Package
44            Id="????????-????-????-????-????????????"
45            Keywords="Installer,MSI,Database"
46            Description="$(var.ProductName)"
47            Comments="$(var.ProductFullName)"
48            Manufacturer="!(loc.Manufacturer)"
49            InstallerVersion="$(var.InstallerVersion)"
50            Languages="$(var.Language)"
51            Compressed="yes"
52            SummaryCodepage="$(var.CodePage)"
53            />
54
55        <?include lang\ui_$(var.BuildLang).wxi?>
56        <?include files.wxi?>
57        <?include features.wxi?>
58        <?include property.wxi?>
59
60        <!-- Launch conditions -->
61        <Condition Message="!(loc.AdminRequired)">Privileged</Condition>
62        <Condition Message="!(loc.OsVersionRequired)">VersionNT &gt;= 501</Condition>
63        <Condition Message="!(loc.OsXPSP3)">(Not (VersionNT = 501)) Or (ServicePackLevel &gt;= 3)</Condition>
64        <Condition Message="!(loc.OsVistaSP2)">(Not (VersionNT = 600)) Or (ServicePackLevel &gt;= 2)</Condition>
65        <Condition Message="!(loc.CMNotSelected)">USELEASH Or USENETIDMGR</Condition>
66        <Condition Message="!(loc.CMDupSelected)">Not (USELEASH And USENETIDMGR)</Condition>
67        <Condition Message="!(loc.StrPlatform64)"><![CDATA[VersionNT64]]></Condition>
68
69        <!-- Custom actions -->
70        <Binary Id="binCustom" SourceFile="custom\custom.dll" />
71
72        <CustomAction
73            Id="EnableTgtSessionKey"
74            BinaryKey="binCustom"
75            DllEntry="EnableAllowTgtSessionKey"
76            Execute="deferred"
77            Impersonate="no"
78            Return="check" />
79        <Property Id="EnableTgtSessionKey" Value="$(var.VersionString)" />
80
81        <CustomAction
82            Id="RevertTgtSessionKey"
83            BinaryKey="binCustom"
84            DllEntry="RevertAllowTgtSessionKey"
85            Execute="deferred"
86            Impersonate="no"
87            Return="check" />
88        <Property Id="RevertTgtSessionKey" Value="$(var.VersionString)" />
89
90        <CustomAction
91            Id="RollbackTgtSessionKey"
92            BinaryKey="binCustom"
93            DllEntry="RevertAllowTgtSessionKey"
94            Execute="rollback"
95            Impersonate="no"
96            Return="check" />
97        <Property Id="RollbackTgtSessionKey" Value="$(var.VersionString)" />
98
99	<CustomAction
100            Id="RemoveNsisInstallation"
101            BinaryKey="binCustom"
102            DllEntry="UninstallNsisInstallation"
103            Execute="immediate" />
104
105	<CustomAction
106            Id="AbortCantRemoveNSIS"
107            Value="[CantRemoveNSISError]"
108            Property="CantRemoveNSISError" />
109
110	<CustomAction
111            Id="AbortNoIE"
112            Value="[NoIE501Error]"
113            Property="NoIE501Error" />
114
115        <CustomAction
116            Id="ListRunningProcesses"
117            BinaryKey="binCustom"
118            DllEntry="ListRunningProcesses"
119            Execute="immediate"
120            Return="ignore" />
121
122        <CustomAction
123            Id="KillRunningProcesses"
124            BinaryKey="binCustom"
125            DllEntry="KillRunningProcesses"
126            Execute="immediate"
127            Return="ignore" />
128
129        <CustomAction
130          Id="InstallNetProvider"
131          BinaryKey="binCustom"
132          DllEntry="InstallNetProvider"
133          Impersonate="no"
134          Execute="deferred" />
135
136        <CustomAction
137          Id="RemoveNetProvider"
138          BinaryKey="binCustom"
139          DllEntry="UninstallNetProvider"
140          Impersonate="no"
141          Return="ignore"
142          Execute="deferred" />
143
144        <CustomAction Id="RenameKrb5Ini_Cmd"
145         Property="RenameKrb5Ini"
146         Value="&quot;cmd.exe&quot; /c rename &quot;[WindowsFolder]\krb5.ini&quot; krb5-ini-pre-kfw4"
147         Execute="immediate" />
148        <CustomAction
149         Id="RenameKrb5Ini"
150         BinaryKey="WixCA"
151         DllEntry="CAQuietExec"
152         Execute="deferred"
153         Impersonate="no"
154         Return="ignore" />
155
156        <CustomAction
157         Id="RollbackNetProvider"
158         BinaryKey="binCustom"
159         DllEntry="UninstallNetProvider"
160         Return="ignore"
161         Execute="rollback" />
162
163	<!-- Installation Sequences -->
164	<AdminExecuteSequence />
165        <InstallExecuteSequence>
166	<Custom Action="ListRunningProcesses" Before="KillRunningProcesses" />
167	<Custom Action="KillRunningProcesses" Before="InstallValidate"/>
168	<RemoveExistingProducts After="InstallValidate">(Not Installed) And (UPGRADEPISMERE Or UPGRADEKFW Or UPGRADEKFW64)</RemoveExistingProducts>
169	<Custom Action="RenameKrb5Ini_Cmd" Before="RenameKrb5Ini"/>
170	<Custom Action="RenameKrb5Ini" Before="InstallFinalize">SYSTEMKRB5INI &lt;&gt; ""</Custom>
171	<!-- When running with a UI, CCP_Success property is not passed down to the server. -->
172	<Custom Action="AbortNoIE" Before="RemoveNsisInstallation">UILevel = 0 And (Not Installed) And (CCP_Success &lt;&gt; 1)</Custom>
173	<Custom Action="RemoveNsisInstallation" Before="AbortCantRemoveNSIS">UPGRADENSIS &lt;&gt; "" And UILevel &gt;= 4</Custom>
174	<Custom Action="AbortCantRemoveNSIS" Before="CostInitialize">UPGRADENSIS &lt;&gt; "" And UILevel &lt; 4</Custom>
175        <Custom Action="RollbackTgtSessionKey" After="WriteRegistryValues">VersionNT &gt;= 500 And &amp;feaKfwClient=3</Custom>
176        <Custom Action="EnableTgtSessionKey" After="RollbackTgtSessionKey">VersionNT &gt;= 500 And &amp;feaKfwClient=3</Custom>
177        <Custom Action="RevertTgtSessionKey" Before="RemoveRegistryValues">VersionNT &gt;= 500 And &amp;feaKfwClient=2</Custom>
178
179        <Custom Action="RollbackNetProvider" After="EnableTgtSessionKey">&amp;feaKfwClient=3</Custom>
180        <Custom Action="InstallNetProvider" After="RollbackNetProvider">&amp;feaKfwClient=3</Custom>
181        <Custom Action="RemoveNetProvider" After="InstallNetProvider">&amp;feaKfwClient=2</Custom>
182        <ScheduleReboot After="InstallFinalize" />
183        </InstallExecuteSequence>
184
185        <!-- Upgrade paths -->
186
187        <!-- MIT Project Pismere MSI -->
188        <Upgrade Id="83977767-388D-4DF8-BB08-3BF2401635BD">
189            <UpgradeVersion IgnoreRemoveFailure="no" IncludeMinimum="no" Maximum="4.0.0" MigrateFeatures="no" Property="UPGRADEPISMERE"/>
190        </Upgrade>
191
192        <!-- KfW MSI -->
193        <Upgrade Id="61211594-AAA1-4A98-A299-757326763CC7">
194            <UpgradeVersion IgnoreRemoveFailure="no" IncludeMinimum="no" Maximum="$(var.VersionString)" IncludeMaximum="yes" MigrateFeatures="yes" Property="UPGRADEKFW" />
195        </Upgrade>
196
197        <!-- KfW 64-bit MSI -->
198        <Upgrade Id="6DA9CD86-6028-4852-8C94-452CAC229244">
199            <UpgradeVersion IgnoreRemoveFailure="no" IncludeMinimum="no" Maximum="$(var.VersionString)" IncludeMaximum="yes" MigrateFeatures="yes" Property="UPGRADEKFW64" />
200        </Upgrade>
201
202        <!-- NSIS installation -->
203        <!-- The NSIS installation, being non-MSI, is detected and removed through other means. -->
204
205        <!-- Check and warn if we don't have the right version of IE installed -->
206        <ComplianceCheck>
207            <DirectorySearch Id="ccd_iphlpapi" Depth="1" Path="[SystemFolder]">
208                <FileSearch Id="cc_iphlp" MinDate="1999-04-23T00:00:00-05:00" Name="iphlpapi.dll" />
209            </DirectorySearch>
210        </ComplianceCheck>
211
212        <!-- We embed all the files in a single cabinet. -->
213        <Media Id="1" Cabinet="Disk1" CompressionLevel="high" EmbedCab="yes" />
214
215        <!-- Custom table used by KillProcesses custom action -->
216        <CustomTable Id="KillProcess">
217            <Column Id="Id" PrimaryKey="yes" Nullable="no" Type="string" Width="32" />
218            <Column Id="Image" Nullable="no" Type="string" Width="255" />
219            <Column Id="Desc" Nullable="yes" Type="string" Width="255" />
220
221            <Row>
222                <Data Column="Id">kpLeash</Data>
223                <Data Column="Image">leash32.exe</Data>
224                <Data Column="Desc">Leash Ticket Manager</Data>
225            </Row>
226            <Row>
227                <Data Column="Id">kpNetIDMgr</Data>
228                <Data Column="Image">netidmgr.exe</Data>
229                <Data Column="Desc">Network Identity Manager</Data>
230            </Row>
231            <Row>
232                <Data Column="Id">kpKrbcc</Data>
233                <Data Column="Image">krbcc32s.exe</Data>
234                <Data Column="Desc">Kerberos Credential Cache</Data>
235            </Row>
236            <Row>
237                <Data Column="Id">kpKrbcc64</Data>
238                <Data Column="Image">krbcc64s.exe</Data>
239                <Data Column="Desc">Kerberos Credential Cache</Data>
240            </Row>
241            <Row>
242                <Data Column="Id">kpK95</Data>
243                <Data Column="Image">k95.exe</Data>
244                <Data Column="Desc">Kermit 95</Data>
245            </Row>
246            <Row>
247                <Data Column="Id">kpK95g</Data>
248                <Data Column="Image">k95g.exe</Data>
249                <Data Column="Desc">Kermit 95 GUI</Data>
250            </Row>
251            <Row>
252                <Data Column="Id">kpkrb5</Data>
253                <Data Column="Image">krb5.exe</Data>
254                <Data Column="Desc">Kerberos Client</Data>
255            </Row>
256            <Row>
257                <Data Column="Id">kpgss</Data>
258                <Data Column="Image">gss.exe</Data>
259                <Data Column="Desc">GSSAPI Test Client</Data>
260            </Row>
261            <Row>
262                <Data Column="Id">kpafscreds</Data>
263                <Data Column="Image">afscreds.exe</Data>
264                <Data Column="Desc">AFS Credentials Manager</Data>
265            </Row>
266            <Row>
267                <Data Column="Id">kccapiserver</Data>
268                <Data Column="Image">ccapiserver.exe</Data>
269                <Data Column="Desc">Credentials Cache API Server</Data>
270            </Row>
271            <Row>
272                <Data Column="Id">kMITKerberos</Data>
273                <Data Column="Image">MIT Kerberos.exe</Data>
274                <Data Column="Desc">MIT Kerberos Ticket Manager</Data>
275            </Row>
276        </CustomTable>
277    </Product>
278</Wix>
279
280