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