NEWS: Claim support for Python 3.
[cascardo/ovs.git] / windows / ovs-windows-installer / Product.wxs
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   <copyright company="Cloudbase Solutions Srl">
4     Copyright 2015 Cloudbase Solutions Srl
5
6     Licensed under the Apache License, Version 2.0 (the "License"); you may
7     not use this file except in compliance with the License.You may obtain
8     a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12     Unless required by applicable law or agreed to in writing, software
13     distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14     WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the
15     License for the specific language governing permissions and limitations
16     under the License.
17   </copyright>
18 -->
19 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
20      xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
21   <Product Id="{0DF60ED5-6C22-49A0-913E-77412D35C400}" Name="Open vSwitch for Hyper-V" Language="1033" Version="1.0.0.0"
22            Manufacturer="Open vSwitch" UpgradeCode="da802b12-433d-4742-a7ae-783aa0c48222">
23     <Package InstallerVersion="405" Compressed="yes" InstallScope="perMachine" InstallPrivileges="elevated" Platform="x64" />
24     <Condition Message="This application is only supported on Windows 2012 or higher.">
25        <![CDATA[Installed OR (VersionNT >= 602)]]>
26     </Condition>
27
28     <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
29     <MediaTemplate EmbedCab="yes" CompressionLevel="mszip" />
30
31     <Feature Id="OpenvSwitchCLI" Title="Open vSwitch CLI" Level="1" Absent="disallow" InstallDefault="local" TypicalDefault="install" AllowAdvertise="no"
32              Description="Installs the Open vSwitch command line tools."
33              ConfigurableDirectory="INSTALLDIR" Display="expand">
34       <ComponentGroupRef Id="BinariesComponentGroup" />
35       <ComponentGroupRef Id="SymbolsComponentGroup" />
36       <ComponentRef Id="OpenvSwitchEnvVars" />
37
38       <Feature Id="VC120Redist" Title="Visual C++ 12.0 Runtime" AllowAdvertise="no" Display="hidden" Level="1"
39                Absent="disallow" InstallDefault="followParent" TypicalDefault="install">
40         <MergeRef Id="VC120Redist" />
41       </Feature>
42     </Feature>
43
44     <Feature Id="OpenvSwitchDriver" Title="Open vSwitch Hyper-V driver" Level="1" Absent="allow" InstallDefault="local" TypicalDefault="install" AllowAdvertise="no"
45              Description="Installs the Open vSwitch Hyper-V switch extension driver." Display="expand">
46       <ComponentRef Id="OpenvSwitchDriver_Win8" />
47       <ComponentRef Id="OpenvSwitchDriver_Win8.1" />
48       <ComponentRef Id="ConfDir" />
49       <ComponentRef Id="LogsDir" />
50       <ComponentRef Id="AppDataDir" />
51       <ComponentRef Id="OvsdbServerService" />
52       <ComponentRef Id="OvsVSwitchdService" />
53       <ComponentRef Id="OpenvSwitchPSModule" />
54     </Feature>
55
56     <UIRef Id="MyWixUI_FeatureTree" />
57     <UIRef Id="WixUI_ErrorProgressText" />
58
59     <WixVariable Id="WixUIBannerBmp" Value="images\bannrbmp.bmp" />
60     <WixVariable Id="WixUIDialogBmp" Value="images\dlgbmp.bmp" />
61     <WixVariable Id="WixUILicenseRtf" Value="License.rtf" />
62
63     <InstallExecuteSequence>
64       <Custom Action="InstallOpenVSwitchDriver_Prop" After="CostFinalize"><![CDATA[REMOVE <> "ALL" AND (&OpenvSwitchDriver = 3)]]></Custom>
65       <Custom Action="InstallOpenVSwitchDriver" Before="ChangeOvsVSwitchdService" ><![CDATA[REMOVE <> "ALL" AND (&OpenvSwitchDriver = 3)]]></Custom>
66
67       <Custom Action="UninstallOpenVSwitchDriver_Prop" After="CostFinalize"><![CDATA[(&OpenvSwitchDriver=2) AND (!OpenvSwitchDriver=3)]]></Custom>
68       <Custom Action="UninstallOpenVSwitchDriver" Before="InstallFinalize" ><![CDATA[(&OpenvSwitchDriver=2) AND (!OpenvSwitchDriver=3)]]></Custom>
69
70       <Custom Action="GenerateConfDB_Prop" After="CostFinalize"><![CDATA[REMOVE <> "ALL" AND (&OpenvSwitchDriver = 3)]]></Custom>
71       <Custom Action="GenerateConfDB" Before="ChangeOvsdbServerService" ><![CDATA[REMOVE <> "ALL" AND (&OpenvSwitchDriver = 3)]]></Custom>
72
73       <Custom Action="StartOvsdbServerService_Prop" After="CostFinalize"><![CDATA[NOT Installed AND (&OpenvSwitchDriver = 3)]]></Custom>
74       <Custom Action="RestartOvsdbServerService_Prop" After="CostFinalize"><![CDATA[Installed AND REMOVE <> "ALL" AND (&OpenvSwitchDriver = 3)]]></Custom>
75       <Custom Action="ChangeOvsdbServerService" Before="ChangeOvsVSwitchdService"><![CDATA[REMOVE <> "ALL" AND (&OpenvSwitchDriver = 3)]]></Custom>
76
77       <Custom Action="InitializeDB_Prop" After="CostFinalize"><![CDATA[REMOVE <> "ALL" AND (&OpenvSwitchDriver = 3)]]></Custom>
78       <Custom Action="InitializeDB" After="ChangeOvsdbServerService" ><![CDATA[REMOVE <> "ALL" AND (&OpenvSwitchDriver = 3)]]></Custom>
79
80       <Custom Action="StartOvsVSwitchdService_Prop" After="CostFinalize"><![CDATA[NOT Installed AND (&OpenvSwitchDriver = 3)]]></Custom>
81       <Custom Action="RestartOvsVSwitchdService_Prop" After="CostFinalize"><![CDATA[Installed AND REMOVE <> "ALL" AND (&OpenvSwitchDriver = 3)]]></Custom>
82       <Custom Action="ChangeOvsVSwitchdService" Before="InstallFinalize"><![CDATA[REMOVE <> "ALL" AND (&OpenvSwitchDriver = 3)]]></Custom>
83     </InstallExecuteSequence>
84   </Product>
85
86   <Fragment>
87     <Directory Id="TARGETDIR" Name="SourceDir">
88       <Directory Id="ProgramFilesFolder">
89         <Directory Id="INSTALLDIR" Name="Open vSwitch" />
90       </Directory>
91       <Directory Id="CommonAppDataFolder">
92         <Directory Id="APPDATADIR" Name="openvswitch">
93           <Component Id="AppDataDir" Guid="{9FAA3CD1-2234-4D6E-A974-D3D48A40773F}">
94             <CreateFolder />
95           </Component>
96         </Directory>
97       </Directory>
98     </Directory>
99
100     <DirectoryRef Id="INSTALLDIR">
101       <Directory Id="BINARIESDIR" Name="bin" />
102     </DirectoryRef>
103
104     <DirectoryRef Id="INSTALLDIR">
105       <Directory Id="SYMBOLSDIR" Name="symbols" />
106     </DirectoryRef>
107
108     <DirectoryRef Id="INSTALLDIR">
109       <Directory Id="DRIVERDIR" Name="driver" />
110     </DirectoryRef>
111
112     <DirectoryRef Id="INSTALLDIR">
113       <Directory Id="LOGSDIR" Name="logs">
114         <Component Id="LogsDir" Guid="{CA78C399-6E2C-4D39-88FB-1F58AC9DF8AC}">
115           <CreateFolder />
116         </Component>
117       </Directory>
118     </DirectoryRef>
119
120     <DirectoryRef Id="INSTALLDIR">
121       <Directory Id="CONFDIR" Name="conf" />
122     </DirectoryRef>
123   </Fragment>
124
125   <Fragment>
126     <DirectoryRef Id="TARGETDIR">
127       <Directory Id="System64Folder" Name="System64Folder">
128         <Directory Id="WindowsPowerShell" Name="WindowsPowerShell">
129           <Directory Id="v1.0" Name="v1.0">
130             <Directory Id="Modules" Name="Modules">
131               <Directory Id="OVSPSMODULEDIR" Name="OVS" />
132             </Directory>
133           </Directory>
134         </Directory>
135       </Directory>
136     </DirectoryRef>
137
138     <Component Id="OpenvSwitchPSModule" Directory="OVSPSMODULEDIR" Guid="{91819E0F-36F9-44C1-BCA3-973AE991E386}" Win64="yes">
139       <File Id="OVS.psm1" Source="Services\OVS.psm1" Checksum="yes" KeyPath="yes" />
140     </Component>
141   </Fragment>
142
143   <Fragment>
144     <DirectoryRef Id="TARGETDIR">
145       <Component Id="OpenvSwitchEnvVars" Guid="{4FCCA9D3-77BE-4283-815E-E3E63D4BF763}">
146         <Environment Id="PATH" Name="PATH" Value="[BINARIESDIR]" Permanent="no" Part="last" Action="set" System="yes" />
147         <Environment Id="OVS_RUNDIR" Name="OVS_RUNDIR" Value="[APPDATADIR]" Permanent="no" Part="all" Action="set" System="yes" />
148         <Environment Id="OVS_PKGDATADIR" Name="OVS_PKGDATADIR" Value="[DRIVERDIR]" Permanent="no" Part="all" Action="set" System="yes" />
149         <Environment Id="OVS_LOGDIR" Name="OVS_LOGDIR" Value="[LOGSDIR]" Permanent="no" Part="all" Action="set" System="yes" />
150         <Environment Id="OVS_SYSCONFDIR" Name="OVS_SYSCONFDIR" Value="[CONFDIR]" Permanent="no" Part="all" Action="set" System="yes" />
151         <Environment Id="OVS_BINDIR" Name="OVS_BINDIR" Value="[BINARIESDIR]" Permanent="no" Part="all" Action="set" System="yes" />
152       </Component>
153     </DirectoryRef>
154   </Fragment>
155
156   <Fragment>
157     <Component Id="ConfDir" Directory="CONFDIR" Guid="{6DB7BC99-FF12-41E2-9EAA-A98A579BE27B}">
158       <File Id="vswitch.ovsschema" Source="Services\vswitch.ovsschema" Checksum="yes" KeyPath="yes" />
159       <RemoveFile Id="removeConfDb" Name="conf.db" On="install" />
160       <RemoveFile Id="removeConfDbLock" Name=".conf.db.~lock~" On="install" />
161     </Component>
162
163     <Component Id="OvsdbServerService" Directory="BINARIESDIR" Guid="{280201D5-35E7-45D6-83B9-293F1A4F7F0E}">
164       <File Id="ovsdbserver.exe" Source="Services\ovsdb-server.exe" Checksum="yes" />
165       <ServiceInstall
166                 Arguments='--log-file="[LOGSDIR]ovsdb-server.log" --pidfile --service --service-monitor --unixctl="[APPDATADIR]ovsdb-server.ctl" --remote=punix:"[APPDATADIR]db.sock" "[CONFDIR]conf.db"'
167                 Id="OvsdbServerServiceInstaller"
168                 Type="ownProcess"
169                 Vital="yes"
170                 Name="ovsdb-server"
171                 DisplayName="Open vSwitch DB Service"
172                 Description="Open vSwitch DB Service"
173                 Start="auto"
174                 Account="LocalSystem"
175                 ErrorControl="ignore"
176                 Interactive="no">
177         <ServiceDependency Id="vmms" />
178       </ServiceInstall>
179       <!-- Start service at the end of the setup, not here -->
180       <ServiceControl
181         Id="OvsdbServerServiceStartService"
182         Stop="both"
183         Remove="uninstall"
184         Name="ovsdb-server"
185         Wait="yes" />
186       <util:ServiceConfig
187         ServiceName="ovsdb-server"
188         FirstFailureActionType="restart"
189         SecondFailureActionType="restart"
190         ThirdFailureActionType="restart"
191         RestartServiceDelayInSeconds="1" />
192     </Component>
193
194     <Component Id="OvsVSwitchdService" Directory="BINARIESDIR" Guid="{A2ED5531-B2D7-4CD3-8ADE-B525A8BEB957}">
195       <File Id="ovsvswitchd.exe" Source="Services\ovs-vswitchd.exe" Checksum="yes" />
196       <ServiceInstall
197                 Arguments='--log-file="[LOGSDIR]ovs-vswitchd.log" unix:"[APPDATADIR]db.sock" --unixctl="[APPDATADIR]ovs-vswitchd.ctl" --pidfile --service --service-monitor'
198                 Id="OvsVSwitchdServiceServiceInstaller"
199                 Type="ownProcess"
200                 Vital="yes"
201                 Name="ovs-vswitchd"
202                 DisplayName="Open vSwitch Service"
203                 Description="Open vSwitch Service"
204                 Start="auto"
205                 Account="LocalSystem"
206                 ErrorControl="ignore"
207                 Interactive="no">
208         <ServiceDependency Id="ovsdb-server" />
209       </ServiceInstall>
210       <!-- Start service at the end of the setup, not here -->
211       <ServiceControl
212         Id="OvsVSwitchdServiceServiceStartService"
213         Stop="both"
214         Remove="uninstall"
215         Name="ovs-vswitchd"
216         Wait="yes" />
217       <util:ServiceConfig
218         ServiceName="ovs-vswitchd"
219         FirstFailureActionType="restart"
220         SecondFailureActionType="restart"
221         ThirdFailureActionType="restart"
222         RestartServiceDelayInSeconds="1" />
223     </Component>
224   </Fragment>
225
226   <Fragment>
227     <DirectoryRef Id="DRIVERDIR">
228       <Component Id='OpenvSwitchDriver_Win8' Guid='{7A1E2446-8196-4738-8362-5CFD55896A7B}'>
229         <Condition><![CDATA[VersionNT = "602"]]></Condition>
230           <File Id='win8_ovsext.sys' Name='ovsext.sys' DiskId='1' Source='Driver\Win8\ovsext.sys' Checksum='yes' KeyPath='yes' />
231           <File Id='win8_ovsext.inf' Name='ovsext.inf' DiskId='1' Source='Driver\Win8\ovsext.inf' Checksum='yes' />
232           <File Id='win8_ovsext.cat' Name='ovsext.cat' DiskId='1' Source='Driver\Win8\ovsext.cat' Checksum='yes' />
233      </Component>
234      <Component Id='OpenvSwitchDriver_Win8.1' Guid='{7A1E2446-8196-4738-8362-5CFD55896A7C}'>
235         <Condition><![CDATA[VersionNT = "603"]]></Condition>
236           <File Id='win81_ovsext.sys' Name='ovsext.sys' DiskId='1' Source='Driver\Win8.1\ovsext.sys' Checksum='yes' KeyPath='yes'/>
237           <File Id='win81_ovsext.inf' Name='ovsext.inf' DiskId='1' Source='Driver\Win8.1\ovsext.inf' Checksum='yes' />
238           <File Id='win81_ovsext.cat' Name='ovsext.cat' DiskId='1' Source='Driver\Win8.1\ovsext.cat' Checksum='yes' />
239       </Component>
240     </DirectoryRef>
241   </Fragment>
242
243   <Fragment>
244     <DirectoryRef Id="TARGETDIR">
245       <Merge Id="VC120Redist" SourceFile="Redist\Microsoft_VC120_CRT_x86.msm" DiskId="1" Language="0" />
246     </DirectoryRef>
247   </Fragment>
248
249 </Wix>