windows-wix-install-idn-redist-20080630
[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         <!-- Custom actions -->
78     <?ifndef UseDllLoopbackInstaller?>
79         <Binary
80          Id="BIN_instloop"
81          src="$(var.MediaBinDir)instloop.exe"/>
82     <?else?>
83         <Binary
84          Id="BIN_afsLoopback"
85          src="$(var.MediaBinDir)afsloopback.dll"/>
86     <?endif?>
87         <Binary
88                  Id="BIN_afsCustom"
89                  src="$(var.MediaDllDir)afscustom.dll"/>
90     <Binary
91        Id="BIN_idndl.exe"
92        src="$(var.IDNMRedistDir)\idndl.$(var.Arch).exe" />
93     <CustomAction
94        Id="InstallIDNMRedistributable"
95        BinaryKey="BIN_idndl.exe"
96        ExeCommand="/quiet /norestart"
97        Execute="deferred"
98        Impersonate="no"
99        />
100
101         <?ifdef UseDllLoopbackInstaller?>
102         <CustomAction
103          Id="InstallLoopback"
104          BinaryKey="BIN_afsLoopback"
105          DllEntry="installLoopbackMSI"
106          Execute="deferred" 
107          Impersonate="no"
108          />
109         <?ifdef RemoveLoopback?>
110         <CustomAction
111          Id="RemoveLoopback"
112          BinaryKey="BIN_afsLoopback"
113          DllEntry="uninstallLoopbackMSI"
114          Execute="deferred" 
115          Impersonate="no"
116          />
117         <CustomAction
118          Id="RollbackLoopback"
119          BinaryKey="BIN_afsLoopback"
120          DllEntry="uninstallLoopbackMSI"
121          Execute="deferred" 
122          Impersonate="no"
123          />
124         <?endif?>
125         <?else?>
126                 <CustomAction
127                  Id="InstallLoopback"
128                  BinaryKey="BIN_instloop"
129                  ExeCommand="-i"
130                  Impersonate="no"
131                  Execute="deferred"
132                  />
133                 <?ifdef RemoveLoopback?>
134                         <CustomAction
135                         Id="RollbackLoopback"
136                         BinaryKey="BIN_instloop"
137                         ExeCommand="-u"
138                         Impersonate="no"
139                         Execute="rollback"
140                         />
141                         <CustomAction
142                         Id="RemoveLoopback"
143                         BinaryKey="BIN_instloop"
144                         ExeCommand="-u"
145                         Impersonate="no"
146                         Execute="deferred"
147                         />
148                 <?endif?>
149         <?endif?>
150         <CustomAction
151          Id="InstallNetProvider" 
152          BinaryKey="BIN_afsCustom" 
153          DllEntry="InstallNetProvider"
154          Execute="deferred" 
155          Impersonate="no"
156         />
157                 <CustomAction 
158                  Id="RemoveNetProvider" 
159                  BinaryKey="BIN_afsCustom"
160                  DllEntry="UninstallNetProvider"
161                  Return="ignore"
162                  Execute="deferred" 
163                  Impersonate="no"
164                 />
165                 <CustomAction 
166                  Id="RollbackNetProvider" 
167                  BinaryKey="BIN_afsCustom"
168                  DllEntry="UninstallNetProvider"
169                  Return="ignore"
170                  Execute="rollback" />
171                 <CustomAction
172                  Id="ConfigureClient"
173                  BinaryKey="BIN_afsCustom"
174                  DllEntry="ConfigureClientService"
175                  Impersonate="no"
176                  Execute="deferred" />
177                 <CustomAction
178                  Id="ConfigureServer"
179                  BinaryKey="BIN_afsCustom"
180                  DllEntry="ConfigureServerService"
181                  Impersonate="no"
182                  Execute="deferred" />
183                 <CustomAction 
184                  Id="RemoveNsisInstallation" 
185                  BinaryKey="BIN_afsCustom"
186                  DllEntry="UninstallNsisInstallation"
187                  Execute="immediate" />
188                 <CustomAction
189                  Id="CreateAFSAdminGroup"
190                  BinaryKey="BIN_afsCustom"
191                  DllEntry="CreateAFSClientAdminGroup"
192                  Impersonate="no"
193                  Execute="deferred" />
194                 <CustomAction
195                  Id="RemoveAFSAdminGroup"
196                  BinaryKey="BIN_afsCustom"
197                  DllEntry="RemoveAFSClientAdminGroup"
198                  Impersonate="no"
199                  Execute="deferred" />
200                 <CustomAction
201                  Id="RollbackAFSAdminGroup"
202                  BinaryKey="BIN_afsCustom"
203                  DllEntry="RemoveAFSClientAdminGroup"
204                  Impersonate="no"
205                  Execute="rollback" />
206                 <CustomAction
207                  Id="AbortInstallationA"
208                  BinaryKey="BIN_afsCustom"
209                  DllEntry="AbortMsiImmediate"
210                  Execute="immediate" />
211                 <CustomAction
212                  Id="AbortInstallationB"
213                  BinaryKey="BIN_afsCustom"
214                  DllEntry="AbortMsiImmediate"
215                  Execute="immediate" />
216
217         <!-- Installation Sequences -->
218         <AdvertiseExecuteSequence />
219         <AdminExecuteSequence />
220         <InstallExecuteSequence>
221                         <RemoveExistingProducts After="InstallValidate">(Not Installed) And (IBMAFS_UPGRADE OR OPENAFS_UPGRADE OR AFSPLUGIN_UPGRADE)</RemoveExistingProducts>
222                         <Custom Action="RemoveNsisInstallation" Before="AbortInstallationA">NSISUNINSTALL &lt;&gt; "" AND UILevel &gt;= 4</Custom>
223                         <Custom Action="AbortInstallationA" Before="CostInitialize">NSISUNINSTALL &lt;&gt; "" AND UILevel &lt; 4</Custom>
224                         <!-- Assert that if the server is going to be installed locally after this session, control center and client are also local -->
225                         <Custom Action="AbortInstallationB" After="MigrateFeatureStates">
226                                 <![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) ))]]>
227                         </Custom>
228                 <?ifdef RemoveLoopback?>
229                         <Custom Action="RemoveLoopback" After="SelfRegModules">&amp;feaLoopback=2 OR &amp;feaLoopback=3</Custom>
230             <Custom Action="RollbackLoopback" After="RemoveLoopback">&amp;feaLoopback=3</Custom>
231             <Custom Action="InstallLoopback" After="RollbackLoopback">&amp;feaLoopback=3</Custom>
232                 <?else?>
233             <Custom Action="InstallLoopback" After="SelfRegModules">&amp;feaLoopback=3</Custom>
234         <?endif?>
235             <Custom Action="RollbackNetProvider" After="WriteRegistryValues">&amp;feaClient=3</Custom>
236                         <Custom Action="InstallNetProvider" After="RollbackNetProvider">&amp;feaClient=3</Custom>
237                         <Custom Action="RemoveNetProvider" After="InstallNetProvider">&amp;feaClient=2</Custom>
238       <Custom Action="InstallIDNMRedistributable" After="WriteRegistryValues">!feaClient=2 And &amp;feaClient=3 And (VersionNT=501 Or VersionNT=502)</Custom>
239                         <Custom Action="ConfigureClient" After="InstallServices">&amp;feaClient=3</Custom>
240                         <Custom Action="ConfigureServer" After="ConfigureClient">&amp;feaServer=3</Custom>
241                         <!-- <Custom Action="RemoveAFSAdminGroup" Before="">&amp;feaClient=2</Custom> -->
242                         <Custom Action="RollbackAFSAdminGroup" Before="CreateAFSAdminGroup">&amp;feaClient=3</Custom>
243                         <Custom Action="CreateAFSAdminGroup" Before="CreateFolders">&amp;feaClient=3</Custom>
244             <ScheduleReboot After="PublishProduct">&amp;feaClient=3 OR &amp;feaServer=3 OR &amp;feaClient=2 OR &amp;feaServer=2</ScheduleReboot>
245         </InstallExecuteSequence>
246
247         <!-- Related producs -->
248         <!-- OpenAFS MSI installer -->
249         <Upgrade Id="6823EEDD-84FC-4204-ABB3-A80D25779833">
250             <UpgradeVersion IgnoreRemoveFailure="no" IncludeMaximum="yes" Maximum="$(var.NumericVersion)" MigrateFeatures="yes" Property="OPENAFS_UPGRADE" />
251         </Upgrade>
252         
253         <!-- MIT's Transarc AFS MSI Installer -->
254         <Upgrade Id="5332B94F-DE38-4927-9EAB-51F4A64193A7">
255             <UpgradeVersion IgnoreRemoveFailure="no" IncludeMaximum="yes" Maximum="3.6.2" MigrateFeatures="no" Property="IBMAFS_UPGRADE" />
256         </Upgrade>
257         
258   <?if $(env.CPU) = "i386" ?>
259         <!-- Secure-Endpoints OpenAFS NetIDMgr plug-in -->
260         <Upgrade Id="646D643A-73E3-4C77-AE4A-EDBE313DD45D">
261             <UpgradeVersion IgnoreRemoveFailure="no" IncludeMaximum="no" Maximum="$(var.NumericVersion)" MigrateFeatures="no" Property="AFSPLUGIN_UPGRADE" />
262         </Upgrade>
263   <?endif?>
264         
265         <!-- openafs.org NSIS installer is detected using other means -->
266         <!-- Please let us know if you want other Installers to be detected and upgraded/removed -->
267
268                 <!-- Media -->
269                 <Media Id="1" Cabinet="disk1.cab" CompressionLevel="high" EmbedCab="yes" />
270     </Product>
271 </Wix>