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