2 <Wix xmlns='http://schemas.microsoft.com/wix/2003/01/wi'>
4 <!-- See config.wxi for the symbols that it defines/asserts -->
7 <!-- See language_config for localization options. -->
8 <?include language_config.wxi?>
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
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)"
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)"
32 Id="????????-????-????-????-????????????"
34 Comments="$(var.PackageComments)"
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)"
43 SummaryCodepage="1252"
46 <!-- Launch conditions -->
47 <Condition Message="$(loc.StrLaunchCond)">
48 <![CDATA[VersionNT >= 500]]>
50 <Condition Message="$(loc.AdminRequired)">Privileged</Condition>
51 <?if $(var.Platform) = "x64" ?>
52 <Condition Message="$(loc.StrPlatform64)">
53 <![CDATA[VersionNT64]]>
56 <Condition Message="$(loc.StrPlatformNot64)">
57 <![CDATA[NOT VersionNT64]]>
61 <!-- Global Properties -->
62 <?include property.wxi?>
64 <!-- File system and registry settings -->
65 <Directory Id="TARGETDIR" Name="SourceDir">
66 <?include platform.wxi?>
67 <?include registry.wxi?>
72 <?include feature.wxi?>
74 <!-- User interface -->
75 <?include lang\$(var.Language)\ui.wxi?>
77 <Property Id="RUNDLL32EXE" Secure="yes">
78 <DirectorySearch Id="RunDLLSearch" Depth="0" Path="[$(var.PISystemFolder)]">
79 <FileSearch Id="RunDLLSearch" Name="rundll32.exe" />
83 <Property Id="SETUPAPIDLL" Secure="yes">
84 <DirectorySearch Id="SetupAPISearch" Depth="0" Path="[$(var.PISystemFolder)]">
85 <FileSearch Id="SetupAPISearch" Name="setupapi.dll" />
89 <Condition Message="Can't find RunDLL32.exe. We looked in [$(var.PISystemFolder)].">
93 <Condition Message="Can't find SetupAPI.DLL. We looked in [$(var.PISystemFolder)].">
97 <!-- Custom actions -->
98 <?ifndef UseDllLoopbackInstaller?>
101 src="$(var.MediaBinDir)instloop.exe"/>
105 src="$(var.MediaBinDir)afsloopback.dll"/>
109 src="$(var.MediaDllDir)afscustom.dll"/>
112 src="$(var.IDNMRedistDir)\idndl.$(var.Arch).exe" />
114 Id="InstallIDNMRedistributable"
115 BinaryKey="BIN_idndl.exe"
116 ExeCommand="/quiet /norestart"
121 <CustomAction Id="InstallRdrDriver" Directory="$(var.PISystemFolder)"
122 Execute="deferred" Impersonate="no"
123 ExeCommand='"[RUNDLL32EXE]" [SETUPAPIDLL],InstallHinfSection DefaultInstall 128 [#file_RedirDriverInstall.inf]' />
125 <CustomAction Id="UninstallRdrDriver" Directory="$(var.PISystemFolder)"
126 Execute="deferred" Return="ignore" Impersonate="no"
127 ExeCommand='"[RUNDLL32EXE]" [SETUPAPIDLL],InstallHinfSection DefaultUninstall 128 [#file_RedirDriverInstall.inf]' />
129 <CustomAction Id="InstallRdrLibrary" Directory="$(var.PISystemFolder)"
130 Execute="deferred" Impersonate="no"
131 ExeCommand='"[RUNDLL32EXE]" [SETUPAPIDLL],InstallHinfSection DefaultInstall 128 [#file_RedirLibInstall.inf]' />
133 <CustomAction Id="UninstallRdrLibrary" Directory="$(var.PISystemFolder)"
134 Execute="deferred" Return="ignore" Impersonate="no"
135 ExeCommand='"[RUNDLL32EXE]" [SETUPAPIDLL],InstallHinfSection DefaultUninstall 128 [#file_RedirLibInstall.inf]' />
137 <?ifdef UseDllLoopbackInstaller?>
140 BinaryKey="BIN_afsLoopback"
141 DllEntry="installLoopbackMSI"
145 <?ifdef RemoveLoopback?>
148 BinaryKey="BIN_afsLoopback"
149 DllEntry="uninstallLoopbackMSI"
154 Id="RollbackLoopback"
155 BinaryKey="BIN_afsLoopback"
156 DllEntry="uninstallLoopbackMSI"
164 BinaryKey="BIN_instloop"
169 <?ifdef RemoveLoopback?>
171 Id="RollbackLoopback"
172 BinaryKey="BIN_instloop"
179 BinaryKey="BIN_instloop"
187 Id="InstallNetProvider"
188 BinaryKey="BIN_afsCustom"
189 DllEntry="InstallNetProvider"
194 Id="RemoveNetProvider"
195 BinaryKey="BIN_afsCustom"
196 DllEntry="UninstallNetProvider"
202 Id="RollbackNetProvider"
203 BinaryKey="BIN_afsCustom"
204 DllEntry="UninstallNetProvider"
209 Id="InstallRedirNetProvider"
210 BinaryKey="BIN_afsCustom"
211 DllEntry="InstallRedirNetProvider"
216 Id="RemoveRedirNetProvider"
217 BinaryKey="BIN_afsCustom"
218 DllEntry="UninstallRedirNetProvider"
224 Id="RollbackRedirNetProvider"
225 BinaryKey="BIN_afsCustom"
226 DllEntry="UninstallRedirNetProvider"
228 Execute="rollback" />
232 BinaryKey="BIN_afsCustom"
233 DllEntry="ConfigureClientService"
235 Execute="deferred" />
238 BinaryKey="BIN_afsCustom"
239 DllEntry="ConfigureServerService"
241 Execute="deferred" />
243 Id="RemoveNsisInstallation"
244 BinaryKey="BIN_afsCustom"
245 DllEntry="UninstallNsisInstallation"
246 Execute="immediate" />
248 Id="CreateAFSAdminGroup"
249 BinaryKey="BIN_afsCustom"
250 DllEntry="CreateAFSClientAdminGroup"
252 Execute="deferred" />
254 Id="RemoveAFSAdminGroup"
255 BinaryKey="BIN_afsCustom"
256 DllEntry="RemoveAFSClientAdminGroup"
258 Execute="deferred" />
260 Id="RollbackAFSAdminGroup"
261 BinaryKey="BIN_afsCustom"
262 DllEntry="RemoveAFSClientAdminGroup"
264 Execute="rollback" />
266 Id="AbortInstallationA"
267 BinaryKey="BIN_afsCustom"
268 DllEntry="AbortMsiImmediate"
269 Execute="immediate" />
271 Id="AbortInstallationB"
272 BinaryKey="BIN_afsCustom"
273 DllEntry="AbortMsiImmediate"
274 Execute="immediate" />
276 Id="BackupAFSClientRegistryKeys"
277 BinaryKey="BIN_afsCustom"
278 DllEntry="BackupAFSClientRegistryKeys"
282 Id="RestoreAFSClientRegistryKeys"
283 BinaryKey="BIN_afsCustom"
284 DllEntry="RestoreAFSClientRegistryKeys"
288 Id="RollbackRestoreAFSClientRegistryKeys"
289 BinaryKey="BIN_afsCustom"
290 DllEntry="BackupAFSClientRegistryKeys"
294 Id="DetectSavedConfiguration"
295 BinaryKey="BIN_afsCustom"
296 DllEntry="DetectSavedConfiguration"
297 Execute="firstSequence" />
299 Id="SetInstallLocation"
300 Property="ARPINSTALLLOCATION"
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 <> "" AND UILevel >= 4</Custom>
309 <Custom Action="AbortInstallationA" Before="CostInitialize">NSISUNINSTALL <> "" AND UILevel < 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) ))]]>
314 <?ifdef RemoveLoopback?>
315 <Custom Action="RemoveLoopback" After="SelfRegModules">&feaLoopback=2 OR &feaLoopback=3</Custom>
316 <Custom Action="RollbackLoopback" After="RemoveLoopback">&feaLoopback=3</Custom>
317 <Custom Action="InstallLoopback" After="RollbackLoopback">&feaLoopback=3</Custom>
319 <Custom Action="InstallLoopback" After="SelfRegModules">&feaLoopback=3</Custom>
321 <Custom Action="InstallIDNMRedistributable" After="WriteRegistryValues">!feaClient=2 And &feaClient=3 And (VersionNT=501 Or VersionNT=502)</Custom>
322 <Custom Action="RollbackNetProvider" After="InstallIDNMRedistributable">&feaClient=3</Custom>
323 <Custom Action="InstallNetProvider" After="RollbackNetProvider">&feaClient=3</Custom>
324 <Custom Action="RemoveNetProvider" After="InstallNetProvider">&feaClient=2</Custom>
326 <Custom Action="RollbackRedirNetProvider" After="InstallNetProvider">&feaClientDriver=3</Custom>
327 <Custom Action="InstallRedirNetProvider" After="RollbackRedirNetProvider">&feaClientDriver=3</Custom>
328 <Custom Action="RemoveRedirNetProvider" After="InstallRedirNetProvider">&feaClientDriver=2</Custom>
330 <Custom Action="ConfigureClient" After="InstallServices">&feaClient=3</Custom>
331 <Custom Action="ConfigureServer" After="ConfigureClient">&feaServer=3</Custom>
332 <Custom Action="RollbackRestoreAFSClientRegistryKeys" After="RemoveNetProvider">!feaClient=2 And &feaClient=3 And RESTORE_CONFIG</Custom>
333 <Custom Action="RestoreAFSClientRegistryKeys" After="RollbackRestoreAFSClientRegistryKeys">!feaClient=2 And &feaClient=3 And RESTORE_CONFIG</Custom>
334 <Custom Action="BackupAFSClientRegistryKeys" Before="DeleteServices">!feaClient=3 And &feaClient=2</Custom>
335 <!-- <Custom Action="RemoveAFSAdminGroup" Before="">&feaClient=2</Custom> -->
336 <Custom Action="RollbackAFSAdminGroup" Before="CreateAFSAdminGroup">&feaClient=3</Custom>
337 <Custom Action="CreateAFSAdminGroup" Before="CreateFolders">&feaClient=3</Custom>
338 <Custom Action="SetInstallLocation" Before="RegisterProduct" />
340 <Custom Action="UninstallRdrDriver" After="InstallInitialize">&feaClientDriver=2 And RUNDLL32EXE And SETUPAPIDLL</Custom>
341 <Custom Action="UninstallRdrLibrary" After="InstallInitialize">&feaClientDriver=2 And RUNDLL32EXE And SETUPAPIDLL</Custom>
342 <Custom Action="InstallRdrDriver" Before="RegisterProduct">&feaClientDriver=3 And RUNDLL32EXE And SETUPAPIDLL</Custom>
343 <Custom Action="InstallRdrLibrary" Before="RegisterProduct">&feaClientDriver=3 And RUNDLL32EXE And SETUPAPIDLL</Custom>
345 <Custom Action="DetectSavedConfiguration" Before="CostInitialize" />
346 <ScheduleReboot After="PublishProduct">&feaClient=3 OR &feaServer=3 OR &feaClient=2 OR &feaServer=2</ScheduleReboot>
347 </InstallExecuteSequence>
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" />
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" />
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" />
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 -->
371 <Media Id="1" Cabinet="disk1.cab" CompressionLevel="high" EmbedCab="yes" />