wix-20040623
[openafs.git] / src / WINNT / install / wix / openafs.wxs
1 \feff<?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     <Product 
11         Id="$(var.ProductCode)"
12         Codepage="$(var.Codepage)"
13         Language="$(var.LanguageCode)"
14         Manufacturer="$(var.Manufacturer)"
15         Name="$(var.ProductName)"
16         UpgradeCode="6823EEDD-84FC-4204-ABB3-A80D25779833"
17         Version="$(var.NumericVersion)"
18         >
19
20                 <!--
21                 Note that we are not specifying an explicit Package Code below.  That way WiX will
22                 generate a new one for each build.  If an explicit one needs to be specified, use :
23                          Id="$(var.PackageCode)"
24                 -->
25         <Package
26          AdminImage="no"
27          Comments="$(var.PackageComments)"
28          Compressed="yes"
29          Description="$(var.ProductName)"
30          InstallerVersion="110"
31          Keywords="Installer,OpenAFS,$(var.Manufacturer)"
32          Languages="$(var.Languages)"
33          Manufacturer="$(var.Manufacturer)"
34          Platforms="Intel"
35          ShortNames="no"
36          SummaryCodepage="1252"
37          />
38         
39         <!-- Launch conditions -->
40         <Condition
41          Message="$(loc.StrLaunchCond)">
42          <![CDATA[VersionNT >= 500]]>
43         </Condition>
44         
45         <!-- Global Properties -->
46         <?include property.wxi?>
47         
48         <!-- File system and registry settings -->
49         <Directory Id="TARGETDIR" Name="SourceDir">
50             <?include registry.wxi?>
51             <?include files.wxi?>
52         </Directory>
53         
54         <!-- Features -->
55         <?include feature.wxi?>
56         
57         <!-- User interface -->
58         <?include lang\$(var.Language)\ui.wxi?>
59         
60         <!-- Custom actions -->
61     <?ifndef UseDllLoopbackInstaller?>
62         <Binary
63          Id="BIN_instloop"
64          src="$(var.MediaBinDir)instloop.exe"/>
65     <?else?>
66         <Binary
67          Id="BIN_afsLoopback"
68          src="$(var.MediaBinDir)afsloopback.dll"/>
69     <?endif?>
70         <Binary
71                  Id="BIN_afsCustom"
72                  src="$(var.MediaDllDir)afscustom.dll"/>
73         <?ifdef UseDllLoopbackInstaller?>
74         <CustomAction
75          Id="InstallLoopback"
76          BinaryKey="BIN_afsLoopback"
77          DllEntry="installLoopbackMSI"
78          Execute="deferred" 
79          Impersonate="no"
80          />
81         <?ifdef RemoveLoopback?>
82         <CustomAction
83          Id="RemoveLoopback"
84          BinaryKey="BIN_afsLoopback"
85          DllEntry="uninstallLoopbackMSI"
86          Execute="deferred" 
87          />
88         <CustomAction
89          Id="RollbackLoopback"
90          BinaryKey="BIN_afsLoopback"
91          DllEntry="uninstallLoopbackMSI"
92          Execute="deferred" 
93          />
94         <?endif?>
95         <?else?>
96                 <CustomAction
97                  Id="InstallLoopback"
98                  BinaryKey="BIN_instloop"
99                  ExeCommand="-i"
100                  Impersonate="no"
101                  Execute="deferred"
102                  />
103                 <?ifdef RemoveLoopback?>
104                         <CustomAction
105                         Id="RollbackLoopback"
106                         BinaryKey="BIN_instloop"
107                         ExeCommand="-u"
108                         Impersonate="no"
109                         Execute="rollback"
110                         />
111                         <CustomAction
112                         Id="RemoveLoopback"
113                         BinaryKey="BIN_instloop"
114                         ExeCommand="-u"
115                         Impersonate="no"
116                         Execute="deferred"
117                         />
118                 <?endif?>
119         <?endif?>
120         <CustomAction
121          Id="InstallNetProvider" 
122          BinaryKey="BIN_afsCustom" 
123          DllEntry="InstallNetProvider"
124          Execute="oncePerProcess" />
125                 <CustomAction 
126                  Id="RemoveNetProvider" 
127                  BinaryKey="BIN_afsCustom"
128                  DllEntry="UninstallNetProvider"
129                  Return="ignore"
130                  Execute="oncePerProcess" />
131                 <CustomAction 
132                  Id="RollbackNetProvider" 
133                  BinaryKey="BIN_afsCustom"
134                  DllEntry="UninstallNetProvider"
135                  Return="ignore"
136                  Execute="rollback" />
137                 <CustomAction
138                  Id="ConfigureClient"
139                  BinaryKey="BIN_afsCustom"
140                  DllEntry="ConfigureClientService"
141                  Impersonate="no"
142                  Execute="deferred" />
143                 <CustomAction
144                  Id="ConfigureServer"
145                  BinaryKey="BIN_afsCustom"
146                  DllEntry="ConfigureServerService"
147                  Impersonate="no"
148                  Execute="deferred" />
149                 <CustomAction 
150                  Id="RemoveNsisInstallation" 
151                  BinaryKey="BIN_afsCustom"
152                  DllEntry="UninstallNsisInstallation"
153                  Execute="immediate" />
154                 <CustomAction
155                  Id="AbortInstallationA"
156                  BinaryKey="BIN_afsCustom"
157                  DllEntry="AbortMsiImmediate"
158                  Execute="immediate" />
159                 <CustomAction
160                  Id="AbortInstallationB"
161                  BinaryKey="BIN_afsCustom"
162                  DllEntry="AbortMsiImmediate"
163                  Execute="immediate" />
164
165         <!-- Installation Sequences -->
166         <AdvertiseExecuteSequence />
167         <AdminExecuteSequence />
168         <InstallExecuteSequence>
169                         <RemoveExistingProducts After="InstallValidate">IBMAFS_UPGRADE OR OPENAFS_UPGRADE</RemoveExistingProducts>
170                         <Custom Action="RemoveNsisInstallation" Before="AbortInstallationA">NSISUNINSTALL &lt;&gt; "" AND UILevel &gt;= 4</Custom>
171                         <Custom Action="AbortInstallationA" Before="CostInitialize">NSISUNINSTALL &lt;&gt; "" AND UILevel &lt; 4</Custom>
172                         <!-- Assert that if the server is going to be installed locally after this session, control center and client are also local -->
173                         <Custom Action="AbortInstallationB" After="MigrateFeatureStates">
174                                 <![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) ))]]>
175                         </Custom>
176                 <?ifdef RemoveLoopback?>
177                         <Custom Action="RemoveLoopback" After="SelfRegModules">&amp;feaLoopback=2 OR &amp;feaLoopback=3</Custom>
178             <Custom Action="RollbackLoopback" After="RemoveLoopback">&amp;feaLoopback=3</Custom>
179             <Custom Action="InstallLoopback" After="RollbackLoopback">&amp;feaLoopback=3</Custom>
180                 <?else?>
181             <Custom Action="InstallLoopback" After="SelfRegModules">&amp;feaLoopback=3</Custom>
182         <?endif?>
183             <Custom Action="RollbackNetProvider" After="WriteRegistryValues">&amp;feaClient=3</Custom>
184                         <Custom Action="InstallNetProvider" After="RollbackNetProvider">&amp;feaClient=3</Custom>
185                         <Custom Action="RemoveNetProvider" After="InstallNetProvider">&amp;feaClient=2</Custom>
186                         <Custom Action="ConfigureClient" After="InstallServices">&amp;feaClient=3</Custom>
187                         <Custom Action="ConfigureServer" After="ConfigureClient">&amp;feaServer=3</Custom>
188             <ScheduleReboot After="PublishProduct">&amp;feaClient=3 OR &amp;feaServer=3 OR &amp;feaClient=2 OR &amp;feaServer=2</ScheduleReboot>
189         </InstallExecuteSequence>
190
191         <!-- Related producs -->
192         <!-- MIT's OpenAFS MSI installer -->
193         <Upgrade Id="6823EEDD-84FC-4204-ABB3-A80D25779833">
194             <UpgradeVersion IgnoreRemoveFailure="no" IncludeMaximum="no" Maximum="$(var.NumericVersion)" MigrateFeatures="yes" Property="OPENAFS_UPGRADE" />
195         </Upgrade>
196         
197         <!-- MIT's Transarc AFS MSI Installer -->
198         <Upgrade Id="5332B94F-DE38-4927-9EAB-51F4A64193A7">
199             <UpgradeVersion IgnoreRemoveFailure="no" IncludeMaximum="yes" Maximum="3.6.2" MigrateFeatures="no" Property="IBMAFS_UPGRADE" />
200         </Upgrade>
201         
202         <!-- openafs.org NSIS installer is detected using other means -->
203         <!-- Please let us know if you want other Installers to be detected and upgraded/removed -->
204
205                 <!-- Media -->
206                 <Media Id="1" Cabinet="disk1.cab" CompressionLevel="high" EmbedCab="yes" />
207     </Product>
208 </Wix>