xref: /freebsd/crypto/krb5/src/windows/installer/wix/kfw.wxs (revision 7f2fe78b9dd5f51c821d771b63d2e096f6fd49e9)
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        <?if $(sys.BUILDARCH) = "x64" ?>
68            <Condition Message="!(loc.StrPlatform64)">
69                <![CDATA[VersionNT64]]>
70            </Condition>
71        <?endif?>
72
73        <!-- Custom actions -->
74        <Binary Id="binCustom" SourceFile="custom\custom.dll" />
75
76        <CustomAction
77            Id="EnableTgtSessionKey"
78            BinaryKey="binCustom"
79            DllEntry="EnableAllowTgtSessionKey"
80            Execute="deferred"
81            Impersonate="no"
82            Return="check" />
83        <Property Id="EnableTgtSessionKey" Value="$(var.VersionString)" />
84
85        <CustomAction
86            Id="RevertTgtSessionKey"
87            BinaryKey="binCustom"
88            DllEntry="RevertAllowTgtSessionKey"
89            Execute="deferred"
90            Impersonate="no"
91            Return="check" />
92        <Property Id="RevertTgtSessionKey" Value="$(var.VersionString)" />
93
94        <CustomAction
95            Id="RollbackTgtSessionKey"
96            BinaryKey="binCustom"
97            DllEntry="RevertAllowTgtSessionKey"
98            Execute="rollback"
99            Impersonate="no"
100            Return="check" />
101        <Property Id="RollbackTgtSessionKey" Value="$(var.VersionString)" />
102
103	<CustomAction
104            Id="RemoveNsisInstallation"
105            BinaryKey="binCustom"
106            DllEntry="UninstallNsisInstallation"
107            Execute="immediate" />
108
109	<CustomAction
110            Id="AbortCantRemoveNSIS"
111            Value="[CantRemoveNSISError]"
112            Property="CantRemoveNSISError" />
113
114	<CustomAction
115            Id="AbortNoIE"
116            Value="[NoIE501Error]"
117            Property="NoIE501Error" />
118
119        <CustomAction
120            Id="ListRunningProcesses"
121            BinaryKey="binCustom"
122            DllEntry="ListRunningProcesses"
123            Execute="immediate"
124            Return="ignore" />
125
126        <CustomAction
127            Id="KillRunningProcesses"
128            BinaryKey="binCustom"
129            DllEntry="KillRunningProcesses"
130            Execute="immediate"
131            Return="ignore" />
132
133        <CustomAction
134          Id="InstallNetProvider"
135          BinaryKey="binCustom"
136          DllEntry="InstallNetProvider"
137          Impersonate="no"
138          Execute="deferred" />
139
140        <CustomAction
141          Id="RemoveNetProvider"
142          BinaryKey="binCustom"
143          DllEntry="UninstallNetProvider"
144          Impersonate="no"
145          Return="ignore"
146          Execute="deferred" />
147
148        <CustomAction Id="RenameKrb5Ini_Cmd"
149         Property="RenameKrb5Ini"
150         Value="&quot;cmd.exe&quot; /c rename &quot;[WindowsFolder]\krb5.ini&quot; krb5-ini-pre-kfw4"
151         Execute="immediate" />
152        <CustomAction
153         Id="RenameKrb5Ini"
154         BinaryKey="WixCA"
155         DllEntry="CAQuietExec"
156         Execute="deferred"
157         Impersonate="no"
158         Return="ignore" />
159
160        <CustomAction
161         Id="RollbackNetProvider"
162         BinaryKey="binCustom"
163         DllEntry="UninstallNetProvider"
164         Return="ignore"
165         Execute="rollback" />
166
167	<!-- Installation Sequences -->
168	<AdminExecuteSequence />
169        <InstallExecuteSequence>
170	<Custom Action="ListRunningProcesses" Before="KillRunningProcesses" />
171	<Custom Action="KillRunningProcesses" Before="InstallValidate"/>
172	<RemoveExistingProducts After="InstallValidate">(Not Installed) And (UPGRADEPISMERE Or UPGRADEKFW Or UPGRADEKFW64)</RemoveExistingProducts>
173	<Custom Action="RenameKrb5Ini_Cmd" Before="RenameKrb5Ini"/>
174	<Custom Action="RenameKrb5Ini" Before="InstallFinalize">SYSTEMKRB5INI &lt;&gt; ""</Custom>
175	<!-- When running with a UI, CCP_Success property is not passed down to the server. -->
176	<Custom Action="AbortNoIE" Before="RemoveNsisInstallation">UILevel = 0 And (Not Installed) And (CCP_Success &lt;&gt; 1)</Custom>
177	<Custom Action="RemoveNsisInstallation" Before="AbortCantRemoveNSIS">UPGRADENSIS &lt;&gt; "" And UILevel &gt;= 4</Custom>
178	<Custom Action="AbortCantRemoveNSIS" Before="CostInitialize">UPGRADENSIS &lt;&gt; "" And UILevel &lt; 4</Custom>
179        <Custom Action="RollbackTgtSessionKey" After="WriteRegistryValues">VersionNT &gt;= 500 And &amp;feaKfwClient=3</Custom>
180        <Custom Action="EnableTgtSessionKey" After="RollbackTgtSessionKey">VersionNT &gt;= 500 And &amp;feaKfwClient=3</Custom>
181        <Custom Action="RevertTgtSessionKey" Before="RemoveRegistryValues">VersionNT &gt;= 500 And &amp;feaKfwClient=2</Custom>
182
183        <Custom Action="RollbackNetProvider" After="EnableTgtSessionKey">&amp;feaKfwClient=3</Custom>
184        <Custom Action="InstallNetProvider" After="RollbackNetProvider">&amp;feaKfwClient=3</Custom>
185        <Custom Action="RemoveNetProvider" After="InstallNetProvider">&amp;feaKfwClient=2</Custom>
186        <ScheduleReboot After="InstallFinalize" />
187        </InstallExecuteSequence>
188
189        <!-- Upgrade paths -->
190
191        <!-- MIT Project Pismere MSI -->
192        <Upgrade Id="83977767-388D-4DF8-BB08-3BF2401635BD">
193            <UpgradeVersion IgnoreRemoveFailure="no" IncludeMinimum="no" Maximum="4.0.0" MigrateFeatures="no" Property="UPGRADEPISMERE"/>
194        </Upgrade>
195
196        <!-- KfW MSI -->
197        <Upgrade Id="61211594-AAA1-4A98-A299-757326763CC7">
198            <UpgradeVersion IgnoreRemoveFailure="no" IncludeMinimum="no" Maximum="$(var.VersionString)" IncludeMaximum="yes" MigrateFeatures="yes" Property="UPGRADEKFW" />
199        </Upgrade>
200
201        <!-- KfW 64-bit MSI -->
202        <Upgrade Id="6DA9CD86-6028-4852-8C94-452CAC229244">
203            <UpgradeVersion IgnoreRemoveFailure="no" IncludeMinimum="no" Maximum="$(var.VersionString)" IncludeMaximum="yes" MigrateFeatures="yes" Property="UPGRADEKFW64" />
204        </Upgrade>
205
206        <!-- NSIS installation -->
207        <!-- The NSIS installation, being non-MSI, is detected and removed through other means. -->
208
209        <!-- Check and warn if we don't have the right version of IE installed -->
210        <ComplianceCheck>
211            <DirectorySearch Id="ccd_iphlpapi" Depth="1" Path="[SystemFolder]">
212                <FileSearch Id="cc_iphlp" MinDate="1999-04-23T00:00:00-05:00" Name="iphlpapi.dll" />
213            </DirectorySearch>
214        </ComplianceCheck>
215
216        <!-- We embed all the files in a single cabinet. -->
217        <Media Id="1" Cabinet="Disk1" CompressionLevel="high" EmbedCab="yes" />
218
219        <!-- Custom table used by KillProcesses custom action -->
220        <CustomTable Id="KillProcess">
221            <Column Id="Id" PrimaryKey="yes" Nullable="no" Type="string" Width="32" />
222            <Column Id="Image" Nullable="no" Type="string" Width="255" />
223            <Column Id="Desc" Nullable="yes" Type="string" Width="255" />
224
225            <Row>
226                <Data Column="Id">kpLeash</Data>
227                <Data Column="Image">leash32.exe</Data>
228                <Data Column="Desc">Leash Ticket Manager</Data>
229            </Row>
230            <Row>
231                <Data Column="Id">kpNetIDMgr</Data>
232                <Data Column="Image">netidmgr.exe</Data>
233                <Data Column="Desc">Network Identity Manager</Data>
234            </Row>
235            <Row>
236                <Data Column="Id">kpKrbcc</Data>
237                <Data Column="Image">krbcc32s.exe</Data>
238                <Data Column="Desc">Kerberos Credential Cache</Data>
239            </Row>
240            <Row>
241                <Data Column="Id">kpKrbcc64</Data>
242                <Data Column="Image">krbcc64s.exe</Data>
243                <Data Column="Desc">Kerberos Credential Cache</Data>
244            </Row>
245            <Row>
246                <Data Column="Id">kpK95</Data>
247                <Data Column="Image">k95.exe</Data>
248                <Data Column="Desc">Kermit 95</Data>
249            </Row>
250            <Row>
251                <Data Column="Id">kpK95g</Data>
252                <Data Column="Image">k95g.exe</Data>
253                <Data Column="Desc">Kermit 95 GUI</Data>
254            </Row>
255            <Row>
256                <Data Column="Id">kpkrb5</Data>
257                <Data Column="Image">krb5.exe</Data>
258                <Data Column="Desc">Kerberos Client</Data>
259            </Row>
260            <Row>
261                <Data Column="Id">kpgss</Data>
262                <Data Column="Image">gss.exe</Data>
263                <Data Column="Desc">GSSAPI Test Client</Data>
264            </Row>
265            <Row>
266                <Data Column="Id">kpafscreds</Data>
267                <Data Column="Image">afscreds.exe</Data>
268                <Data Column="Desc">AFS Credentials Manager</Data>
269            </Row>
270            <Row>
271                <Data Column="Id">kccapiserver</Data>
272                <Data Column="Image">ccapiserver.exe</Data>
273                <Data Column="Desc">Credentials Cache API Server</Data>
274            </Row>
275            <Row>
276                <Data Column="Id">kMITKerberos</Data>
277                <Data Column="Image">MIT Kerberos.exe</Data>
278                <Data Column="Desc">MIT Kerberos Ticket Manager</Data>
279            </Row>
280        </CustomTable>
281    </Product>
282</Wix>
283
284