871ba41fe618343ffb89b9a76390f73b5592ff2e
[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         <Binary
62          Id="BIN_Instloop"
63          src="$(var.MediaBinDir)instloop.exe"/>
64         <Binary
65                  Id="BIN_afsCustom"
66                  src="$(var.MediaBinDir)afscustom.dll"/>
67         <CustomAction
68          Id="InstallLoopback"
69          BinaryKey="BIN_Instloop"
70          ExeCommand="-i"
71          Execute="deferred"
72          Impersonate="no"
73          />
74         <?ifdef RemoveLoopback?>
75         <CustomAction
76          Id="RemoveLoopback"
77          BinaryKey="BIN_Instloop"
78          ExeCommand="-u"
79          Execute="deferred"
80          Return="ignore"
81          Impersonate="no"
82          />
83         <CustomAction
84          Id="RollbackLoopback"
85          BinaryKey="BIN_Instloop"
86          ExeCommand="-u"
87          Execute="rollback"
88          Return="ignore"
89          Impersonate="no"
90          />
91         <?endif?>
92         <CustomAction
93          Id="InstallNetProvider" 
94          BinaryKey="BIN_afsCustom" 
95          DllEntry="InstallNetProvider"
96          Execute="oncePerProcess" />
97                 <CustomAction 
98                  Id="RemoveNetProvider" 
99                  BinaryKey="BIN_afsCustom"
100                  DllEntry="UninstallNetProvider"
101                  Return="ignore"
102                  Execute="oncePerProcess" />
103                 <CustomAction 
104                  Id="RollbackNetProvider" 
105                  BinaryKey="BIN_afsCustom"
106                  DllEntry="UninstallNetProvider"
107                  Return="ignore"
108                  Execute="rollback" />
109                 <CustomAction
110                  Id="ConfigureClient"
111                  BinaryKey="BIN_afsCustom"
112                  DllEntry="ConfigureClientService"
113                  Impersonate="no"
114                  Execute="deferred" />
115                 <CustomAction
116                  Id="ConfigureServer"
117                  BinaryKey="BIN_afsCustom"
118                  DllEntry="ConfigureServerService"
119                  Impersonate="no"
120                  Execute="deferred" />
121                 <CustomAction 
122                  Id="RemoveNsisInstallation" 
123                  BinaryKey="BIN_afsCustom"
124                  DllEntry="UninstallNsisInstallation"
125                  Execute="immediate" />
126                 <CustomAction
127                  Id="AbortInstallationA"
128                  BinaryKey="BIN_afsCustom"
129                  DllEntry="AbortMsiImmediate"
130                  Execute="immediate" />
131                 <CustomAction
132                  Id="AbortInstallationB"
133                  BinaryKey="BIN_afsCustom"
134                  DllEntry="AbortMsiImmediate"
135                  Execute="immediate" />
136
137         <!-- Installation Sequences -->
138         <AdvertiseExecuteSequence />
139         <AdminExecuteSequence />
140         <InstallExecuteSequence>
141                         <RemoveExistingProducts After="InstallValidate">IBMAFS_UPGRADE OR OPENAFS_UPGRADE</RemoveExistingProducts>
142                         <Custom Action="RemoveNsisInstallation" Before="AbortInstallationA">NSISUNINSTALL &lt;&gt; "" AND UILevel &gt;= 4</Custom>
143                         <Custom Action="AbortInstallationA" Before="CostInitialize">NSISUNINSTALL &lt;&gt; "" AND UILevel &lt; 4</Custom>
144                         <!-- Assert that if the server is going to be installed locally after this session, control center and client are also local -->
145                         <Custom Action="AbortInstallationB" After="MigrateFeatureStates">
146                                 <![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) ))]]>
147                         </Custom>
148                 <?ifdef RemoveLoopback?>
149                         <Custom Action="RemoveLoopback" After="SelfRegModules">&amp;feaLoopback=2 OR &amp;feaLoopback=3</Custom>
150             <Custom Action="RollbackLoopback" After="RemoveLoopback">&amp;feaLoopback=3</Custom>
151             <Custom Action="InstallLoopback" After="RollbackLoopback">&amp;feaLoopback=3</Custom>
152                 <?else?>
153             <Custom Action="InstallLoopback" After="SelfRegModules">&amp;feaLoopback=3</Custom>
154         <?endif?>
155             <Custom Action="RollbackNetProvider" After="WriteRegistryValues">&amp;feaClient=3</Custom>
156                         <Custom Action="InstallNetProvider" After="RollbackNetProvider">&amp;feaClient=3</Custom>
157                         <Custom Action="RemoveNetProvider" After="InstallNetProvider">&amp;feaClient=2</Custom>
158                         <Custom Action="ConfigureClient" After="InstallServices">&amp;feaClient=3</Custom>
159                         <Custom Action="ConfigureServer" After="ConfigureClient">&amp;feaServer=3</Custom>
160             <ScheduleReboot After="PublishProduct">&amp;feaClient=3 OR &amp;feaServer=3 OR &amp;feaClient=2 OR &amp;feaServer=2</ScheduleReboot>
161         </InstallExecuteSequence>
162
163         <!-- Related producs -->
164         <!-- MIT's OpenAFS MSI installer -->
165         <Upgrade Id="6823EEDD-84FC-4204-ABB3-A80D25779833">
166             <UpgradeVersion IgnoreRemoveFailure="no" IncludeMaximum="no" Maximum="$(var.NumericVersion)" MigrateFeatures="yes" Property="OPENAFS_UPGRADE" />
167         </Upgrade>
168         
169         <!-- MIT's Transarc AFS MSI Installer -->
170         <Upgrade Id="5332B94F-DE38-4927-9EAB-51F4A64193A7">
171             <UpgradeVersion IgnoreRemoveFailure="no" IncludeMaximum="yes" Maximum="3.6.2" MigrateFeatures="no" Property="IBMAFS_UPGRADE" />
172         </Upgrade>
173         
174         <!-- openafs.org NSIS installer is detected using other means -->
175         <!-- Please let us know if you want other Installers to be detected and upgraded/removed -->
176
177                 <!-- Media -->
178                 <Media Id="1" Cabinet="disk1.cab" CompressionLevel="mszip" EmbedCab="yes" />
179     </Product>
180 </Wix>