venus: Remove dedebug
[openafs.git] / src / WINNT / install / wix / openafs.wxs
1 <?xml version="1.0" ?>
2 <Wix xmlns='http://schemas.microsoft.com/wix/2003/01/wi'>
3
4     <!-- See config.wxi for the symbols that it defines/asserts -->
5     <?include config.wxi?>
6
7     <!-- See language_config for localization options. -->
8     <?include language_config.wxi?>
9
10     <!--
11       We autogenerate a new product code for each build.  According to MSDN we have
12       to change the product code whenever we change the name of the MSI file.  Each
13       version of OpenAFS has a different MSI name.  Thus, each version needs a
14       unique product code.
15       -->
16     <Product
17         Id="????????-????-????-????-????????????"
18         Codepage="$(var.Codepage)"
19         Language="$(var.LanguageCode)"
20         Manufacturer="$(var.Manufacturer)"
21         Name="$(var.ProductName)"
22         UpgradeCode="6823EEDD-84FC-4204-ABB3-A80D25779833"
23         Version="$(var.NumericVersion)"
24         >
25
26                 <!--
27                 Note that we are not specifying an explicit Package Code below.  That way WiX will
28                 generate a new one for each build.  If an explicit one needs to be specified, use :
29                          Id="$(var.PackageCode)"
30                 -->
31         <Package
32                  Id="????????-????-????-????-????????????"
33          AdminImage="no"
34          Comments="$(var.PackageComments)"
35          Compressed="yes"
36          Description="$(var.ProductName)"
37          InstallerVersion="$(var.InstallerVersion)"
38          Keywords="Installer,OpenAFS,$(var.Manufacturer)"
39          Languages="$(var.Languages)"
40          Manufacturer="$(var.Manufacturer)"
41          Platforms="$(var.Platform)"
42          ShortNames="no"
43          SummaryCodepage="1252"
44          />
45
46         <!-- Launch conditions -->
47         <Condition Message="$(loc.StrLaunchCond)">
48          <![CDATA[VersionNT >= 500]]>
49         </Condition>
50         <Condition Message="$(loc.AdminRequired)">Privileged</Condition>
51     <?if $(var.Platform) = "x64" ?>
52         <Condition Message="$(loc.StrPlatform64)">
53          <![CDATA[VersionNT64]]>
54         </Condition>
55     <?else?>
56         <Condition Message="$(loc.StrPlatformNot64)">
57          <![CDATA[NOT VersionNT64]]>
58         </Condition>
59     <?endif?>
60
61     <!-- Global Properties -->
62     <?include property.wxi?>
63
64     <!-- File system and registry settings -->
65     <Directory Id="TARGETDIR" Name="SourceDir">
66         <?include platform.wxi?>
67         <?include registry.wxi?>
68         <?include files.wxi?>
69     </Directory>
70
71     <!-- Features -->
72     <?include feature.wxi?>
73
74     <!-- User interface -->
75     <?include lang\$(var.Language)\ui.wxi?>
76
77     <Property Id="RUNDLL32EXE" Secure="yes">
78       <DirectorySearch Id="RunDLLSearch" Depth="0" Path="[$(var.PISystemFolder)]">
79         <FileSearch Id="RunDLLSearch" Name="rundll32.exe" />
80       </DirectorySearch>
81     </Property>
82
83     <Property Id="SETUPAPIDLL" Secure="yes">
84       <DirectorySearch Id="SetupAPISearch" Depth="0" Path="[$(var.PISystemFolder)]">
85         <FileSearch Id="SetupAPISearch" Name="setupapi.dll" />
86       </DirectorySearch>
87     </Property>
88
89     <Condition Message="Can't find RunDLL32.exe.  We looked in [$(var.PISystemFolder)].">
90       RUNDLL32EXE
91     </Condition>
92
93     <Condition Message="Can't find SetupAPI.DLL.  We looked in [$(var.PISystemFolder)].">
94       SETUPAPIDLL
95     </Condition>
96
97         <!-- Custom actions -->
98     <?ifndef UseDllLoopbackInstaller?>
99         <Binary
100          Id="BIN_instloop"
101          src="$(var.MediaBinDir)instloop.exe"/>
102     <?else?>
103         <Binary
104          Id="BIN_afsLoopback"
105          src="$(var.MediaBinDir)afsloopback.dll"/>
106     <?endif?>
107         <Binary
108          Id="BIN_afsCustom"
109          src="$(var.MediaDllDir)afscustom.dll"/>
110     <Binary
111        Id="BIN_idndl.exe"
112        src="$(var.IDNMRedistDir)\idndl.$(var.Arch).exe" />
113     <CustomAction
114        Id="InstallIDNMRedistributable"
115        BinaryKey="BIN_idndl.exe"
116        ExeCommand="/quiet /norestart"
117        Execute="deferred"
118        Impersonate="no"
119        />
120
121     <CustomAction Id="InstallRdrDriver" Directory="$(var.PISystemFolder)"
122                   Execute="deferred" Impersonate="no"
123                   ExeCommand='"[RUNDLL32EXE]" [SETUPAPIDLL],InstallHinfSection DefaultInstall 128 [#file_RedirDriverInstall.inf]' />
124
125     <CustomAction Id="UninstallRdrDriver" Directory="$(var.PISystemFolder)"
126                   Execute="deferred" Return="ignore" Impersonate="no"
127                   ExeCommand='"[RUNDLL32EXE]" [SETUPAPIDLL],InstallHinfSection DefaultUninstall 128 [#file_RedirDriverInstall.inf]' />
128
129     <CustomAction Id="InstallRdrLibrary" Directory="$(var.PISystemFolder)"
130                   Execute="deferred" Impersonate="no"
131                   ExeCommand='"[RUNDLL32EXE]" [SETUPAPIDLL],InstallHinfSection DefaultInstall 128 [#file_RedirLibInstall.inf]' />
132
133     <CustomAction Id="UninstallRdrLibrary" Directory="$(var.PISystemFolder)"
134                   Execute="deferred" Return="ignore" Impersonate="no"
135                   ExeCommand='"[RUNDLL32EXE]" [SETUPAPIDLL],InstallHinfSection DefaultUninstall 128 [#file_RedirLibInstall.inf]' />
136
137     <?ifdef UseDllLoopbackInstaller?>
138         <CustomAction
139             Id="InstallLoopback"
140             BinaryKey="BIN_afsLoopback"
141             DllEntry="installLoopbackMSI"
142             Execute="deferred"
143             Impersonate="no"
144             />
145         <?ifdef RemoveLoopback?>
146             <CustomAction
147                 Id="RemoveLoopback"
148                 BinaryKey="BIN_afsLoopback"
149                 DllEntry="uninstallLoopbackMSI"
150                 Execute="deferred"
151                 Impersonate="no"
152                 />
153             <CustomAction
154                 Id="RollbackLoopback"
155                 BinaryKey="BIN_afsLoopback"
156                 DllEntry="uninstallLoopbackMSI"
157                 Execute="deferred"
158                 Impersonate="no"
159                 />
160         <?endif?>
161     <?else?>
162         <CustomAction
163             Id="InstallLoopback"
164             BinaryKey="BIN_instloop"
165             ExeCommand="-i"
166             Impersonate="no"
167             Execute="deferred"
168             />
169         <?ifdef RemoveLoopback?>
170             <CustomAction
171                 Id="RollbackLoopback"
172                 BinaryKey="BIN_instloop"
173                 ExeCommand="-u"
174                 Impersonate="no"
175                 Execute="rollback"
176                 />
177             <CustomAction
178                 Id="RemoveLoopback"
179                 BinaryKey="BIN_instloop"
180                 ExeCommand="-u"
181                 Impersonate="no"
182                 Execute="deferred"
183                 />
184         <?endif?>
185     <?endif?>
186     <CustomAction
187        Id="InstallNetProvider"
188        BinaryKey="BIN_afsCustom"
189        DllEntry="InstallNetProvider"
190        Execute="deferred"
191        Impersonate="no"
192        />
193     <CustomAction
194        Id="RemoveNetProvider"
195        BinaryKey="BIN_afsCustom"
196        DllEntry="UninstallNetProvider"
197        Return="ignore"
198        Execute="deferred"
199        Impersonate="no"
200        />
201     <CustomAction
202        Id="RollbackNetProvider"
203        BinaryKey="BIN_afsCustom"
204        DllEntry="UninstallNetProvider"
205        Return="ignore"
206        Execute="rollback"
207        />
208     <CustomAction
209        Id="InstallRedirNetProvider"
210        BinaryKey="BIN_afsCustom"
211        DllEntry="InstallRedirNetProvider"
212        Execute="deferred"
213        Impersonate="no"
214        />
215     <CustomAction
216        Id="RemoveRedirNetProvider"
217        BinaryKey="BIN_afsCustom"
218        DllEntry="UninstallRedirNetProvider"
219        Return="ignore"
220        Execute="deferred"
221        Impersonate="no"
222        />
223     <CustomAction
224        Id="RollbackRedirNetProvider"
225        BinaryKey="BIN_afsCustom"
226        DllEntry="UninstallRedirNetProvider"
227        Return="ignore"
228        Execute="rollback" />
229
230     <CustomAction
231                  Id="ConfigureClient"
232                  BinaryKey="BIN_afsCustom"
233                  DllEntry="ConfigureClientService"
234                  Impersonate="no"
235                  Execute="deferred" />
236                 <CustomAction
237                  Id="ConfigureServer"
238                  BinaryKey="BIN_afsCustom"
239                  DllEntry="ConfigureServerService"
240                  Impersonate="no"
241                  Execute="deferred" />
242                 <CustomAction
243                  Id="RemoveNsisInstallation"
244                  BinaryKey="BIN_afsCustom"
245                  DllEntry="UninstallNsisInstallation"
246                  Execute="immediate" />
247                 <CustomAction
248                  Id="CreateAFSAdminGroup"
249                  BinaryKey="BIN_afsCustom"
250                  DllEntry="CreateAFSClientAdminGroup"
251                  Impersonate="no"
252                  Execute="deferred" />
253                 <CustomAction
254                  Id="RemoveAFSAdminGroup"
255                  BinaryKey="BIN_afsCustom"
256                  DllEntry="RemoveAFSClientAdminGroup"
257                  Impersonate="no"
258                  Execute="deferred" />
259                 <CustomAction
260                  Id="RollbackAFSAdminGroup"
261                  BinaryKey="BIN_afsCustom"
262                  DllEntry="RemoveAFSClientAdminGroup"
263                  Impersonate="no"
264                  Execute="rollback" />
265                 <CustomAction
266                  Id="AbortInstallationA"
267                  BinaryKey="BIN_afsCustom"
268                  DllEntry="AbortMsiImmediate"
269                  Execute="immediate" />
270                 <CustomAction
271                  Id="AbortInstallationB"
272                  BinaryKey="BIN_afsCustom"
273                  DllEntry="AbortMsiImmediate"
274                  Execute="immediate" />
275                 <CustomAction
276                     Id="BackupAFSClientRegistryKeys"
277                     BinaryKey="BIN_afsCustom"
278                     DllEntry="BackupAFSClientRegistryKeys"
279                     Execute="deferred"
280                     Impersonate="no" />
281                 <CustomAction
282                     Id="RestoreAFSClientRegistryKeys"
283                     BinaryKey="BIN_afsCustom"
284                     DllEntry="RestoreAFSClientRegistryKeys"
285                     Execute="deferred"
286                     Impersonate="no" />
287                 <CustomAction
288                     Id="RollbackRestoreAFSClientRegistryKeys"
289                     BinaryKey="BIN_afsCustom"
290                     DllEntry="BackupAFSClientRegistryKeys"
291                     Execute="rollback"
292                     Impersonate="no" />
293                 <CustomAction
294                     Id="DetectSavedConfiguration"
295                     BinaryKey="BIN_afsCustom"
296                     DllEntry="DetectSavedConfiguration"
297                     Execute="firstSequence" />
298                 <CustomAction
299                    Id="SetInstallLocation"
300                    Property="ARPINSTALLLOCATION"
301                    Value="[AFSDIR]" />
302
303         <!-- Installation Sequences -->
304         <AdvertiseExecuteSequence />
305         <AdminExecuteSequence />
306         <InstallExecuteSequence>
307             <RemoveExistingProducts After="InstallValidate">(Not Installed) And (IBMAFS_UPGRADE OR OPENAFS_UPGRADE OR AFSPLUGIN_UPGRADE)</RemoveExistingProducts>
308             <Custom Action="RemoveNsisInstallation" Before="AbortInstallationA">NSISUNINSTALL &lt;&gt; "" AND UILevel &gt;= 4</Custom>
309             <Custom Action="AbortInstallationA" Before="CostInitialize">NSISUNINSTALL &lt;&gt; "" AND UILevel &lt; 4</Custom>
310             <!-- Assert that if the server is going to be installed locally after this session, control center and client are also local -->
311             <Custom Action="AbortInstallationB" After="MigrateFeatureStates">
312                 <![CDATA[((&feaServer=3 OR (!feaServer=3 AND &feaServer<1)) AND (&feaClient=2 OR (&feaClient<>3 AND !feaClient<>3) OR &feaControlCenter=2 OR (&feaControlCenter<>3 AND !feaControlCenter<>3) ))]]>
313             </Custom>
314             <?ifdef RemoveLoopback?>
315                 <Custom Action="RemoveLoopback" After="SelfRegModules">&amp;feaLoopback=2 OR &amp;feaLoopback=3</Custom>
316                 <Custom Action="RollbackLoopback" After="RemoveLoopback">&amp;feaLoopback=3</Custom>
317                 <Custom Action="InstallLoopback" After="RollbackLoopback">&amp;feaLoopback=3</Custom>
318             <?else?>
319                 <Custom Action="InstallLoopback" After="SelfRegModules">&amp;feaLoopback=3</Custom>
320             <?endif?>
321             <Custom Action="InstallIDNMRedistributable" After="WriteRegistryValues">!feaClient=2 And &amp;feaClient=3  And (VersionNT=501 Or VersionNT=502)</Custom>
322             <Custom Action="RollbackNetProvider" After="InstallIDNMRedistributable">&amp;feaClient=3</Custom>
323             <Custom Action="InstallNetProvider" After="RollbackNetProvider">&amp;feaClient=3</Custom>
324             <Custom Action="RemoveNetProvider" After="InstallNetProvider">&amp;feaClient=2</Custom>
325
326             <Custom Action="RollbackRedirNetProvider" After="InstallNetProvider">&amp;feaClientDriver=3</Custom>
327             <Custom Action="InstallRedirNetProvider" After="RollbackRedirNetProvider">&amp;feaClientDriver=3</Custom>
328             <Custom Action="RemoveRedirNetProvider" After="InstallRedirNetProvider">&amp;feaClientDriver=2</Custom>
329
330             <Custom Action="ConfigureClient" After="InstallServices">&amp;feaClient=3</Custom>
331             <Custom Action="ConfigureServer" After="ConfigureClient">&amp;feaServer=3</Custom>
332             <Custom Action="RollbackRestoreAFSClientRegistryKeys" After="RemoveNetProvider">!feaClient=2 And &amp;feaClient=3 And RESTORE_CONFIG</Custom>
333             <Custom Action="RestoreAFSClientRegistryKeys" After="RollbackRestoreAFSClientRegistryKeys">!feaClient=2 And &amp;feaClient=3 And RESTORE_CONFIG</Custom>
334             <Custom Action="BackupAFSClientRegistryKeys" Before="DeleteServices">!feaClient=3 And &amp;feaClient=2</Custom>
335             <!-- <Custom Action="RemoveAFSAdminGroup" Before="">&amp;feaClient=2</Custom> -->
336             <Custom Action="RollbackAFSAdminGroup" Before="CreateAFSAdminGroup">&amp;feaClient=3</Custom>
337             <Custom Action="CreateAFSAdminGroup" Before="CreateFolders">&amp;feaClient=3</Custom>
338             <Custom Action="SetInstallLocation" Before="RegisterProduct" />
339
340             <Custom Action="UninstallRdrDriver" After="InstallInitialize">&amp;feaClientDriver=2 And RUNDLL32EXE And SETUPAPIDLL</Custom>
341             <Custom Action="UninstallRdrLibrary" After="InstallInitialize">&amp;feaClientDriver=2 And RUNDLL32EXE And SETUPAPIDLL</Custom>
342             <Custom Action="InstallRdrDriver" Before="RegisterProduct">&amp;feaClientDriver=3 And RUNDLL32EXE And SETUPAPIDLL</Custom>
343             <Custom Action="InstallRdrLibrary" Before="RegisterProduct">&amp;feaClientDriver=3 And RUNDLL32EXE And SETUPAPIDLL</Custom>
344
345             <Custom Action="DetectSavedConfiguration" Before="CostInitialize" />
346             <ScheduleReboot After="PublishProduct">&amp;feaClient=3 OR &amp;feaServer=3 OR &amp;feaClient=2 OR &amp;feaServer=2</ScheduleReboot>
347         </InstallExecuteSequence>
348
349         <!-- Related producs -->
350         <!-- OpenAFS MSI installer -->
351         <Upgrade Id="6823EEDD-84FC-4204-ABB3-A80D25779833">
352             <UpgradeVersion IgnoreRemoveFailure="no" IncludeMaximum="yes" Maximum="$(var.NumericVersion)" MigrateFeatures="yes" Property="OPENAFS_UPGRADE" />
353         </Upgrade>
354
355         <!-- MIT's Transarc AFS MSI Installer -->
356         <Upgrade Id="5332B94F-DE38-4927-9EAB-51F4A64193A7">
357             <UpgradeVersion IgnoreRemoveFailure="no" IncludeMaximum="yes" Maximum="3.6.2" MigrateFeatures="no" Property="IBMAFS_UPGRADE" />
358         </Upgrade>
359
360   <?if $(env.CPU) = "i386" ?>
361         <!-- Secure-Endpoints OpenAFS NetIDMgr plug-in -->
362         <Upgrade Id="646D643A-73E3-4C77-AE4A-EDBE313DD45D">
363             <UpgradeVersion IgnoreRemoveFailure="no" IncludeMaximum="no" Maximum="$(var.NumericVersion)" MigrateFeatures="no" Property="AFSPLUGIN_UPGRADE" />
364         </Upgrade>
365   <?endif?>
366
367         <!-- openafs.org NSIS installer is detected using other means -->
368         <!-- Please let us know if you want other Installers to be detected and upgraded/removed -->
369
370         <!-- Media -->
371         <Media Id="1" Cabinet="disk1.cab" CompressionLevel="high" EmbedCab="yes" />
372     </Product>
373 </Wix>