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