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