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 <!-- Custom actions -->
78 <?ifndef UseDllLoopbackInstaller?>
81 src="$(var.MediaBinDir)instloop.exe"/>
85 src="$(var.MediaBinDir)afsloopback.dll"/>
89 src="$(var.MediaDllDir)afscustom.dll"/>
92 src="$(var.IDNMRedistDir)\idndl.$(var.Arch).exe" />
94 Id="InstallIDNMRedistributable"
95 BinaryKey="BIN_idndl.exe"
96 ExeCommand="/quiet /norestart"
101 <?ifdef UseDllLoopbackInstaller?>
104 BinaryKey="BIN_afsLoopback"
105 DllEntry="installLoopbackMSI"
109 <?ifdef RemoveLoopback?>
112 BinaryKey="BIN_afsLoopback"
113 DllEntry="uninstallLoopbackMSI"
118 Id="RollbackLoopback"
119 BinaryKey="BIN_afsLoopback"
120 DllEntry="uninstallLoopbackMSI"
128 BinaryKey="BIN_instloop"
133 <?ifdef RemoveLoopback?>
135 Id="RollbackLoopback"
136 BinaryKey="BIN_instloop"
143 BinaryKey="BIN_instloop"
151 Id="InstallNetProvider"
152 BinaryKey="BIN_afsCustom"
153 DllEntry="InstallNetProvider"
158 Id="RemoveNetProvider"
159 BinaryKey="BIN_afsCustom"
160 DllEntry="UninstallNetProvider"
166 Id="RollbackNetProvider"
167 BinaryKey="BIN_afsCustom"
168 DllEntry="UninstallNetProvider"
170 Execute="rollback" />
173 BinaryKey="BIN_afsCustom"
174 DllEntry="ConfigureClientService"
176 Execute="deferred" />
179 BinaryKey="BIN_afsCustom"
180 DllEntry="ConfigureServerService"
182 Execute="deferred" />
184 Id="RemoveNsisInstallation"
185 BinaryKey="BIN_afsCustom"
186 DllEntry="UninstallNsisInstallation"
187 Execute="immediate" />
189 Id="CreateAFSAdminGroup"
190 BinaryKey="BIN_afsCustom"
191 DllEntry="CreateAFSClientAdminGroup"
193 Execute="deferred" />
195 Id="RemoveAFSAdminGroup"
196 BinaryKey="BIN_afsCustom"
197 DllEntry="RemoveAFSClientAdminGroup"
199 Execute="deferred" />
201 Id="RollbackAFSAdminGroup"
202 BinaryKey="BIN_afsCustom"
203 DllEntry="RemoveAFSClientAdminGroup"
205 Execute="rollback" />
207 Id="AbortInstallationA"
208 BinaryKey="BIN_afsCustom"
209 DllEntry="AbortMsiImmediate"
210 Execute="immediate" />
212 Id="AbortInstallationB"
213 BinaryKey="BIN_afsCustom"
214 DllEntry="AbortMsiImmediate"
215 Execute="immediate" />
217 Id="BackupAFSClientRegistryKeys"
218 BinaryKey="BIN_afsCustom"
219 DllEntry="BackupAFSClientRegistryKeys"
223 Id="RestoreAFSClientRegistryKeys"
224 BinaryKey="BIN_afsCustom"
225 DllEntry="RestoreAFSClientRegistryKeys"
229 Id="RollbackRestoreAFSClientRegistryKeys"
230 BinaryKey="BIN_afsCustom"
231 DllEntry="BackupAFSClientRegistryKeys"
235 Id="DetectSavedConfiguration"
236 BinaryKey="BIN_afsCustom"
237 DllEntry="DetectSavedConfiguration"
238 Execute="firstSequence" />
240 Id="SetInstallLocation"
241 Property="ARPINSTALLLOCATION"
244 <!-- Installation Sequences -->
245 <AdvertiseExecuteSequence />
246 <AdminExecuteSequence />
247 <InstallExecuteSequence>
248 <RemoveExistingProducts After="InstallValidate">(Not Installed) And (IBMAFS_UPGRADE OR OPENAFS_UPGRADE OR AFSPLUGIN_UPGRADE)</RemoveExistingProducts>
249 <Custom Action="RemoveNsisInstallation" Before="AbortInstallationA">NSISUNINSTALL <> "" AND UILevel >= 4</Custom>
250 <Custom Action="AbortInstallationA" Before="CostInitialize">NSISUNINSTALL <> "" AND UILevel < 4</Custom>
251 <!-- Assert that if the server is going to be installed locally after this session, control center and client are also local -->
252 <Custom Action="AbortInstallationB" After="MigrateFeatureStates">
253 <![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) ))]]>
255 <?ifdef RemoveLoopback?>
256 <Custom Action="RemoveLoopback" After="SelfRegModules">&feaLoopback=2 OR &feaLoopback=3</Custom>
257 <Custom Action="RollbackLoopback" After="RemoveLoopback">&feaLoopback=3</Custom>
258 <Custom Action="InstallLoopback" After="RollbackLoopback">&feaLoopback=3</Custom>
260 <Custom Action="InstallLoopback" After="SelfRegModules">&feaLoopback=3</Custom>
262 <Custom Action="RollbackNetProvider" After="WriteRegistryValues">&feaClient=3</Custom>
263 <Custom Action="InstallNetProvider" After="RollbackNetProvider">&feaClient=3</Custom>
264 <Custom Action="RemoveNetProvider" After="InstallNetProvider">&feaClient=2</Custom>
265 <Custom Action="InstallIDNMRedistributable" After="WriteRegistryValues">!feaClient=2 And &feaClient=3 And (VersionNT=501 Or VersionNT=502)</Custom>
266 <Custom Action="ConfigureClient" After="InstallServices">&feaClient=3</Custom>
267 <Custom Action="ConfigureServer" After="ConfigureClient">&feaServer=3</Custom>
268 <Custom Action="RollbackRestoreAFSClientRegistryKeys" After="RemoveNetProvider">!feaClient=2 And &feaClient=3 And RESTORE_CONFIG</Custom>
269 <Custom Action="RestoreAFSClientRegistryKeys" After="RollbackRestoreAFSClientRegistryKeys">!feaClient=2 And &feaClient=3 And RESTORE_CONFIG</Custom>
270 <Custom Action="BackupAFSClientRegistryKeys" Before="DeleteServices">!feaClient=3 And &feaClient=2</Custom>
271 <!-- <Custom Action="RemoveAFSAdminGroup" Before="">&feaClient=2</Custom> -->
272 <Custom Action="RollbackAFSAdminGroup" Before="CreateAFSAdminGroup">&feaClient=3</Custom>
273 <Custom Action="CreateAFSAdminGroup" Before="CreateFolders">&feaClient=3</Custom>
274 <Custom Action="SetInstallLocation" Before="RegisterProduct" />
275 <Custom Action="DetectSavedConfiguration" Before="CostInitialize" />
276 <ScheduleReboot After="PublishProduct">&feaClient=3 OR &feaServer=3 OR &feaClient=2 OR &feaServer=2</ScheduleReboot>
277 </InstallExecuteSequence>
279 <!-- Related producs -->
280 <!-- OpenAFS MSI installer -->
281 <Upgrade Id="6823EEDD-84FC-4204-ABB3-A80D25779833">
282 <UpgradeVersion IgnoreRemoveFailure="no" IncludeMaximum="yes" Maximum="$(var.NumericVersion)" MigrateFeatures="yes" Property="OPENAFS_UPGRADE" />
285 <!-- MIT's Transarc AFS MSI Installer -->
286 <Upgrade Id="5332B94F-DE38-4927-9EAB-51F4A64193A7">
287 <UpgradeVersion IgnoreRemoveFailure="no" IncludeMaximum="yes" Maximum="3.6.2" MigrateFeatures="no" Property="IBMAFS_UPGRADE" />
290 <?if $(env.CPU) = "i386" ?>
291 <!-- Secure-Endpoints OpenAFS NetIDMgr plug-in -->
292 <Upgrade Id="646D643A-73E3-4C77-AE4A-EDBE313DD45D">
293 <UpgradeVersion IgnoreRemoveFailure="no" IncludeMaximum="no" Maximum="$(var.NumericVersion)" MigrateFeatures="no" Property="AFSPLUGIN_UPGRADE" />
297 <!-- openafs.org NSIS installer is detected using other means -->
298 <!-- Please let us know if you want other Installers to be detected and upgraded/removed -->
301 <Media Id="1" Cabinet="disk1.cab" CompressionLevel="high" EmbedCab="yes" />