VirtualBox

source: vbox/trunk/src/VBox/Installer/win/VirtualBox.wxs@ 103038

Last change on this file since 103038 was 103038, checked in by vboxsync, 3 months ago

Main/Python: Windows installer fixes. ​bugref:10579

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 32.8 KB
Line 
1<?xml version='1.0' encoding='windows-1252'?>
2<!--
3 VirtualBox Windows Installation Script (WiX)
4-->
5<!--
6 Copyright (C) 2014-2023 Oracle and/or its affiliates.
7
8 This file is part of VirtualBox base platform packages, as
9 available from https://www.virtualbox.org.
10
11 This program is free software; you can redistribute it and/or
12 modify it under the terms of the GNU General Public License
13 as published by the Free Software Foundation, in version 3 of the
14 License.
15
16 This program is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, see <https://www.gnu.org/licenses>.
23
24 SPDX-License-Identifier: GPL-3.0-only
25-->
26
27<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
28 xmlns:difxapp="http://schemas.microsoft.com/wix/DifxAppExtension"
29 xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
30
31 <?include Defines.wxi ?>
32
33<?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
34 <!-- The merge module file names -->
35 <?define Property_VBoxMergeApp = "$(env.VBOX_WIN_INST_MERGE_APP)" ?>
36 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
37 <?define Property_VBoxMergeCOM32On64 = "$(env.VBOX_WIN_INST_MERGE_COM32ON64)" ?>
38 <?endif ?>
39 <?if $(env.VBOX_WITH_USB) = "yes" ?>
40 <?define Property_VBoxMergeUSB = "$(env.VBOX_WIN_INST_MERGE_USB)" ?>
41 <?endif ?>
42 <?if $(env.VBOX_WITH_NETFLT) = "yes" ?>
43 <?define Property_VBoxMergeNetworkFlt = "$(env.VBOX_WIN_INST_MERGE_NETFLT)" ?>
44 <?endif ?>
45 <?if $(env.VBOX_WITH_NETADP) = "yes" ?>
46 <?define Property_VBoxMergeNetworkAdp = "$(env.VBOX_WIN_INST_MERGE_NETADP)" ?>
47 <?define Property_VBoxMergeNetworkAdp6 = "$(env.VBOX_WIN_INST_MERGE_NETADP6)" ?>
48 <?endif ?>
49 <?if $(env.VBOX_WITH_NETFLT) = "yes" ?>
50 <?define Property_VBoxMergeNetworkLwf = "$(env.VBOX_WIN_INST_MERGE_NETLWF)" ?>
51 <?endif ?>
52 <?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
53 <?define Property_VBoxMergePython = "$(env.VBOX_WIN_INST_MERGE_PYTHON)" ?>
54 <?endif ?>
55<?endif ?>
56
57 <Product Id="*"
58 UpgradeCode="C4BAD770-BFE8-4D2C-A592-693028A7215B"
59 Name="$(env.VBOX_PRODUCT) $(env.VBOX_VERSION_STRING)"
60 Language="!(loc.LANG)"
61 Codepage="1252"
62 Version="$(var.Property_Version)"
63 Manufacturer="$(env.VBOX_VENDOR)">
64
65 <Package Id="*"
66 Keywords="Installer"
67 Description="$(env.VBOX_PRODUCT) $(var.Property_VersionExt) installation package"
68 Comments="$(env.VBOX_PRODUCT) installation package"
69 Compressed="yes"
70 Manufacturer="$(env.VBOX_VENDOR)"
71 InstallerVersion="200"
72 InstallPrivileges="elevated"
73 Platform="$(var.Property_Platform)"/>
74
75 <?include CommonProperties.wxi ?>
76
77 <!-- Global properties -->
78 <Property Id="ARPPRODUCTICON">IconVirtualBox</Property>
79 <Property Id="ARPURLINFOABOUT">http://www.virtualbox.org</Property>
80 <Property Id="ARPURLUPDATEINFO">http://www.virtualbox.org</Property>
81
82 <Property Id="NETWORKTYPE" Value="NDIS6" Secure="yes"/>
83
84<?if $(env.VBOX_WITH_MSM_INSTALL) = "no" ?>
85 <!-- Force NDIS5 on pre-Vista -->
86 <SetProperty Id="NETWORKTYPE" After="LaunchConditions" Value="NDIS5"><![CDATA[(VersionNT < 600)]]></SetProperty>
87<?endif ?>
88
89 <!-- Whether or not registering of known desktop shortcut for the Quick Launch Bar should be created -->
90 <Property Id="VBOX_REGISTERFILEEXTENSIONS" Value="1" Secure="yes"/>
91
92 <SetProperty Id="VBOX_REGISTERFILEEXTENSIONS" After="AppSearch" Sequence="both" Value="{}">
93 <![CDATA[VBOX_REGISTERFILEEXTENSIONS="0"]]>
94 </SetProperty>
95
96 <!-- Install the product for all users on the system -->
97 <Property Id="ALLUSERS"><![CDATA[1]]></Property>
98
99 <!-- Force overwriting all files and re-create shortcuts to guarantee a working environment -->
100 <Property Id='REINSTALLMODE' Value='amus'/>
101
102 <?include PublicProperties.wxi ?>
103
104 <!-- Make sure installation will not start on anything other but the NT family -->
105<?if $(env.KBUILD_TARGET_ARCH) = "amd64" ?>
106 <Condition Message="!(loc.Only64Bit)">
107 VersionNT64
108 </Condition>
109<?else ?>
110 <Condition Message="!(loc.Only32Bit)">
111 NOT VersionNT64
112 </Condition>
113
114 <Condition Message="!(loc.WrongOS)">
115 NOT VersionNT=500 AND NOT Version9X AND NOT VersionNT64
116 </Condition>
117
118<?endif ?>
119
120 <Condition Message="!(loc.NeedAdmin)">
121 Privileged
122 </Condition>
123
124<?if $(env.VBOX_WITH_CRT_PACKING) = "no" ?>
125 <!-- Check if we have the required MS CRT(s) installed when we're not shipping those. -->
126 <Condition Message="!(loc.NeedMSCRT)">
127 Installed OR (VBOX_MSCRT_INSTALLED)
128 </Condition>
129<?endif ?>
130
131 <!-- Detect old innotek installation -->
132 <!-- Force a manual uninstall of an already installed innotek VirtualBox version first -->
133 <Property Id="VBOXINNOTEK">
134 <RegistrySearch Id="RegSearchInnotekVersion" Root="HKLM" Key="SOFTWARE\Innotek\VirtualBox" Name="Version" Type="raw" Win64="$(var.Property_Win64)"/>
135 </Property>
136 <Condition Message="!(loc.InnotekFound)">
137 NOT VBOXINNOTEK
138 </Condition>
139
140
141 <!-- *************************** Upgrade packages only ******************************* -->
142 <!-- Minimum and Maximum specify the range of versions we are supposed to update with this upgrade.
143 IncludeMaximum and IncludeMinimum specify whether the bound value is actually included in the range or not
144 (IncludeMaximum = yes meaning to find versions below or equal to the version specified in Maximum while
145 IncludeMaximum = no only finds those below the Maximum).
146 OnlyDetect tells the installer not to remove the previous product. This is useful as long as we
147 only change files in the package -->
148
149 <Upgrade Id="C4BAD770-BFE8-4D2C-A592-693028A7215B"> <!-- Upgrade of Sun xVM VirtualBox >= v1.6.0 -->
150
151 <!-- Upgrade is flagged if current-install is newer than or equal to package - TODO: should make a dialog appear asking user to confirm downgrade -->
152 <!-- Setting "OnlyDetect" to "no" makes the installer uninstall an already newer installed version -->
153 <UpgradeVersion Property="NEWERVERSIONDETECTED" Minimum="$(var.Property_Version)" IncludeMinimum="no" OnlyDetect="no" />
154
155 <!-- Flag is set if the install will trigger an upgrade of an existing install -->
156 <UpgradeVersion Property="PREVIOUSVERSIONSINSTALLED" Minimum="1.0.0.0" Maximum="$(var.Property_Version)" IncludeMaximum="yes" />
157
158 </Upgrade>
159
160 <!-- The product's icon table -->
161 <Icon Id="IconVirtualBox" SourceFile="$(env.VBOX_WINDOWS_ICON_FILE)" />
162
163 <!-- The media/binary IDs -->
164 <!--
165 The effects of CompressionLevel options:
166 default/mszip, high: 32.54s
167 -rw-rw-rw- 1 bird 0 53 591 221 2016-09-25 03:56 common.cab
168 -rw-rw-rw- 1 bird 0 41 560 082 2016-09-25 03:56 VirtualBox-5.1.51-r110887_en_US.msi
169 high, high: 46.76s
170 -rw-rw-rw- 1 bird 0 53 591 221 2016-09-25 03:49 common.cab
171 -rw-rw-rw- 1 bird 0 34 056 210 2016-09-25 03:49 VirtualBox-5.1.51-r110887_en_US.msi
172 medium, medium: 29.95s
173 -rw-rw-rw- 1 bird 0 56 293 089 2016-09-25 03:53 common.cab
174 -rw-rw-rw- 1 bird 0 35 498 002 2016-09-25 03:54 VirtualBox-5.1.51-r110887_en_US.msi
175 low, low: 25.41s
176 -rw-rw-rw- 1 bird 0 57 616 155 2016-09-25 03:52 common.cab
177 -rw-rw-rw- 1 bird 0 37 181 458 2016-09-25 03:52 VirtualBox-5.1.51-r110887_en_US.msi
178 mszip/default, mszip/default: 16.13s
179 -rw-rw-rw- 1 bird 0 58 751 954 2016-09-25 03:49 common.cab
180 -rw-rw-rw- 1 bird 0 41 560 082 2016-09-25 03:50 VirtualBox-5.1.51-r110887_en_US.msi
181 none, none: 2.37s
182 -rw-rw-rw- 1 bird 0 92 470 301 2016-09-25 03:47 common.cab
183 -rw-rw-rw- 1 bird 0 135 874 578 2016-09-25 03:47 VirtualBox-5.1.51-r110887_en_US.msi
184
185 We set the level in the VBOX_CAB_COMPRESSION_LEVEL and VBOX_CAB_COMPRESSION_LEVEL_COMMON
186 environment variables so we don't waste time compressing and decompressing the intermediate
187 language MSIs and the common.cab that we're not going to use (x86).
188 -->
189 <Media Id="1" Cabinet="product.cab" EmbedCab="yes" CompressionLevel="$(env.VBOX_CAB_COMPRESSION_LEVEL)" />
190<?if $(env.VBOX_WITH_MSM_INSTALL) = "no" ?>
191 <?if $(env.VBOX_WITH_COMBINED_PACKAGE) = "yes" ?>
192 <Media Id="2" Cabinet="common.cab" EmbedCab="no" CompressionLevel="$(env.VBOX_CAB_COMPRESSION_LEVEL_COMMON)" />
193 <?endif ?>
194<?endif ?>
195 <Binary Id="VBoxInstallHelper" SourceFile="$(env.PATH_OUT)\bin\VBoxInstallHelper.dll" />
196
197 <!-- Custom actions -->
198
199 <!-- Figure out where a previous installation was, if any -->
200<?if $(env.KBUILD_TARGET_ARCH) = "amd64" ?>
201 <CustomAction Id="ca_OriginalTargetDir" Execute="firstSequence" Property="INSTALLDIR"
202 Value="[ProgramFiles64Folder]\$(env.VBOX_VENDOR_SHORT)\VirtualBox" />
203
204 <Property Id="EXISTINGINSTALLDIR" Secure="yes">
205 <RegistrySearch Id="RegistryGetInstallPath" Root="HKLM" Key="$(var.Property_RegKey)" Name="InstallDir"
206 Type="raw" Win64="$(var.Property_Win64)"/>
207 </Property>
208 <CustomAction Id="ca_DefaultTargetDir" Execute="firstSequence" Property="INSTALLDIR" Value="[EXISTINGINSTALLDIR]" />
209<?else ?>
210 <CustomAction Id="ca_OriginalTargetDir" Execute="firstSequence" Property="INSTALLDIR"
211 Value="[ProgramFilesFolder]\$(env.VBOX_VENDOR_SHORT)\VirtualBox" />
212
213 <Property Id="EXISTINGINSTALLDIR" Secure="yes">
214 <RegistrySearch Id="RegistryGetInstallPath" Root="HKLM" Key="$(var.Property_RegKey)" Name="InstallDir"
215 Type="raw" Win64="$(var.Property_Win64)"/>
216 </Property>
217 <CustomAction Id="ca_DefaultTargetDir" Execute="firstSequence" Property="INSTALLDIR" Value="[EXISTINGINSTALLDIR]" />
218<?endif ?>
219 <CustomAction Id="ca_UninstallTAPInstances" BinaryKey="VBoxInstallHelper"
220 DllEntry="UninstallTAPInstances" Execute="deferred" Return="check" Impersonate="no"/>
221
222 <CustomAction Id="ca_UninstallVBoxDrv" BinaryKey="VBoxInstallHelper"
223 DllEntry="UninstallVBoxDrv" Execute="deferred" Return="ignore" Impersonate="no"/>
224
225 <Property Id="VBOXDEPENDENCY" Secure="yes">
226 <DirectorySearch Id="VBoxInstallDir" Path="[EXISTINGINSTALLDIR]">
227 <FileSearch Name="dependency.dep"/>
228 </DirectorySearch>
229 </Property>
230
231<?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
232 <Property Id="EXISTING_PYTHON_API_FOLDER" Secure="yes" >
233 <RegistrySearch Id="RegistryGetPythonApiInstallPath" Root="HKLM" Key="$(var.Property_RegKey)"
234 Name="PythonApiInstallDir" Type="raw" Win64="$(var.Property_Win64)"/>
235 </Property>
236<?endif ?>
237
238 <!--
239 install upgrade uninstall
240 VBOXDEPENDENCY 0 1/0 1/0
241 UPGRADINGPRODUCTCODE 0 1 0
242 final 0 1 0
243 not final 1 0 1
244 -->
245
246 <Condition Message="It was detected an application which has been using currently installed VirtualBox version.
247 You must remove this application before continuing installation.
248 See the file dependency.dep in the VirtualBox installation directory for details. ">
249 NOT (VBOXDEPENDENCY AND UPGRADINGPRODUCTCODE)
250 </Condition>
251
252 <!-- Detect old Sun installation -->
253 <!-- Force a manual uninstall of an already installed Sun VirtualBox version first -->
254 <!--<Property Id="VBOXSUN">
255 <RegistrySearch Id="RegSearchSunVersion" Root="HKLM" Key="SOFTWARE\Sun\VirtualBox" Name="Version" Type="raw" Win64="$(var.Property_Win64)"/>
256 </Property>
257 <Condition Message="!(loc.SunFound)">
258 NOT VBOXSUN
259 </Condition>-->
260
261 <!-- Note: Only if we include FE/Qt, we offer to start VirtualBox at the end of a successful installation. -->
262<?if $(env.VBOX_WITH_QTGUI) = "yes" ?>
263 <!-- Note: Make sure to set the CWD (via 'Directory' attribute) to not run off a possibly temporary directory or some such (see @bugref{10203}). -->
264 <CustomAction Id="ca_StartVBox" Directory="INSTALLDIR" ExeCommand="[INSTALLDIR]VirtualBox.exe" Return="asyncNoWait" Impersonate="yes" />
265<?endif ?>
266
267 <CustomAction Id="ca_CheckSerial" BinaryKey="VBoxInstallHelper" DllEntry="CheckSerial" Impersonate="no"/>
268
269 <CustomAction Id="ca_InstallBranding" BinaryKey="VBoxInstallHelper" DllEntry="InstallBranding" Execute="deferred" Return="check" Impersonate="no"/>
270 <CustomAction Id="ca_InstallBrandingArgs" Property="ca_InstallBranding" Value="[INSTALLDIR]" Execute="immediate"/>
271
272 <CustomAction Id="ca_UninstallBranding" BinaryKey="VBoxInstallHelper" DllEntry="UninstallBranding" Execute="deferred" Return="check" Impersonate="no"/>
273 <CustomAction Id="ca_UninstallBrandingArgs" Property="ca_UninstallBranding" Value="[INSTALLDIR]" Execute="immediate"/>
274
275<?if $(env.VBOX_WITH_MSM_INSTALL) = "no" ?>
276 <?include VBoxMergeAppCA.wxi ?>
277 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
278 <?include VBoxMergeCOM32On64CA.wxi ?>
279 <?endif ?>
280 <?if $(env.VBOX_WITH_NETFLT) = "yes" ?>
281 <?include VBoxMergeNetFltCA.wxi ?>
282 <?include VBoxMergeNetLwfCA.wxi ?>
283 <?endif ?>
284 <?include VBoxMergeNetAdpCA.wxi ?>
285 <?include VBoxMergeNetAdp6CA.wxi ?>
286 <?include VBoxMergeUSBCA.wxi ?>
287 <?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
288 <?include VBoxMergePythonCA.wxi ?>
289 <?endif ?>
290<?endif ?>
291
292 <Directory Id="TARGETDIR" Name="SourceDir">
293 <Directory Id="$(var.Property_ProgramFiles)" Name="PFiles">
294 <Directory Id="VENDOR" Name="$(env.VBOX_VENDOR_SHORT)">
295 <Directory Id="INSTALLDIR" Name="VirtualBox">
296 <!-- Components for removing empty folder after cleaning traces -->
297 <Component Id="cp_INSTALLDIR" Guid="374723AF-5990-4552-A1B0-82C72EFA360F">
298 <RemoveFolder Id="INSTALLDIR" On="uninstall" />
299 </Component>
300<?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
301 <Merge Id="msm_VBoxApp" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeApp)" DiskId="1">
302 <ConfigurationData Name="argRegisterExtensions" Value="[VBOX_REGISTERFILEEXTENSIONS]"/>
303 </Merge>
304 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
305 <Merge Id="msm_VBoxCOM32On64" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeCOM32On64)" DiskId="1" />
306 <?endif ?>
307<?else ?>
308 <Directory Id="msm_VBoxApplicationFolder" FileSource=".">
309 <?include VBoxMergeApp.wxi ?>
310 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
311 <?include VBoxMergeCOM32On64.wxi ?>
312 <?endif ?>
313 </Directory>
314<?endif ?>
315 <Directory Id="dir_Drivers" Name="drivers">
316<?if $(env.VBOX_WITH_USB) = "yes" ?>
317 <Directory Id="dir_USB" Name="USB">
318 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
319 <Merge Id="msm_VBoxUSB" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeUSB)" DiskId="1" />
320 <?else ?>
321 <Directory Id="msm_VBoxUSBFolder" FileSource=".">
322 <?include VBoxMergeUSB.wxi ?>
323 </Directory>
324 <?endif ?>
325 </Directory>
326<?endif ?>
327 <Directory Id="dir_Network" Name="network">
328<?if $(env.VBOX_WITH_NETFLT) = "yes" ?>
329 <Directory Id="dir_NetFlt" Name="netflt">
330 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
331 <Merge Id="msm_VBoxNetworkFlt" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeNetworkFlt)" DiskId="1">
332 <ConfigurationData Name="passedNetworkType" Value="[NETWORKTYPE]"/>
333 </Merge>
334 <?else ?>
335 <Directory Id="msm_VBoxNetworkFltFolder" FileSource=".">
336 <?include VBoxMergeNetFlt.wxi ?>
337 </Directory>
338 <?endif ?>
339 </Directory>
340<?endif ?>
341<?if $(env.VBOX_WITH_NETADP) = "yes" ?>
342 <Directory Id="dir_NetAdp" Name="netadp">
343 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
344 <Merge Id="msm_VBoxNetworkAdp" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeNetworkAdp)" DiskId="1">
345 <ConfigurationData Name="passedNetworkType" Value="[NETWORKTYPE]"/>
346 </Merge>
347 <?else ?>
348 <Directory Id="msm_VBoxNetworkAdpFolder" FileSource=".">
349 <?include VBoxMergeNetAdp.wxi ?>
350 </Directory>
351 <?endif ?>
352 </Directory>
353<?endif ?>
354
355<?if $(env.VBOX_WITH_NETFLT) = "yes" ?>
356 <Directory Id="dir_NetLwf" Name="netlwf">
357 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
358 <Merge Id="msm_VBoxNetworkLwf" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeNetworkLwf)" DiskId="1">
359 <ConfigurationData Name="passedNetworkType" Value="[NETWORKTYPE]"/>
360 </Merge>
361 <?else ?>
362 <Directory Id="msm_VBoxNetworkLwfFolder" FileSource=".">
363 <?include VBoxMergeNetLwf.wxi ?>
364 </Directory>
365 <?endif ?>
366 </Directory>
367<?endif ?>
368
369<?if $(env.VBOX_WITH_NETADP) = "yes" ?>
370 <Directory Id="dir_NetAdp6" Name="netadp6">
371 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
372 <Merge Id="msm_VBoxNetworkAdp6" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeNetworkAdp6)" DiskId="1">
373 <ConfigurationData Name="passedNetworkType" Value="[NETWORKTYPE]"/>
374 </Merge>
375 <?else ?>
376 <Directory Id="msm_VBoxNetworkAdp6Folder" FileSource=".">
377 <?include VBoxMergeNetAdp6.wxi ?>
378 </Directory>
379 <?endif ?>
380 </Directory>
381<?endif ?>
382 </Directory>
383 </Directory>
384 <Directory Id="dir_SDK" Name="sdk">
385<?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
386 <Directory Id="dir_SDKInstaller" Name="installer"> <!-- Note: For < VBox 7.1 this folder was called 'install'. -->
387 <Directory Id="dir_SDKInstallerPython" Name="python">
388 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
389 <Merge Id="msm_VBoxPython" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergePython)" DiskId="1" />
390 <?else ?>
391 <Directory Id="msm_VBoxPythonFolder" FileSource=".">
392 <?include VBoxMergePython.wxi ?>
393 </Directory>
394 <?endif ?>
395 </Directory>
396 </Directory>
397<?endif ?>
398 <!-- Component for removing empty folder after cleaning traces -->
399 <Component Id="cp_SDK" Guid="ACA59290-B2D6-4E96-B164-C45F70A90219">
400 <RemoveFolder Id="dir_SDK" On="uninstall" />
401 </Component>
402 </Directory>
403
404<?if $(env.VBOX_WITH_QTGUI) = "yes" ?>
405 <!-- Set up special directory IDs for referencing to the start menu
406 or the Quick Launch bar.
407 See: http://msdn.microsoft.com/en-us/library/aa368276.aspx
408 http://wix.mindcapers.com/wiki/Shortcuts_in_WiX -->
409 <Directory Id="ProgramMenuFolder">
410 <Directory Id="dir_StartMenuVBox" Name="$(env.VBOX_PRODUCT)"/>
411 </Directory>
412
413 <Directory Id="DesktopFolder" Name="Desktop"/>
414
415 <Directory Id="AppDataFolder" Name="AppData">
416 <Directory Id="dir_AppDataMicrosoft" Name="Microsoft">
417 <Directory Id="dir_AppDataMSIE" Name="Internet Explorer">
418 <Directory Id="dir_QuicklaunchFolder" Name="Quick Launch"/>
419 </Directory>
420 </Directory>
421 </Directory>
422
423 <!-- Start menu entries. -->
424 <Component Id="cp_StartMenuVBox" Guid="C2DC321A-CE63-40EE-8A98-724DF8BD12FB" Win64="$(var.Property_Win64)">
425 <Condition>VBOX_INSTALLSTARTMENUENTRIES</Condition>
426 <Shortcut Id="sc_StartMenuVBox" Directory="dir_StartMenuVBox" Name="$(env.VBOX_PRODUCT)" Description="$(env.VBOX_PRODUCT)"
427 Target="[INSTALLDIR]VirtualBox.exe" WorkingDirectory="INSTALLDIR"/>
428 <RegistryValue Root="HKCU" Key="$(var.Property_RegKeyInstall)"
429 Type="string" Value="installed" KeyPath="yes" />
430 <?include $(env.PATH_TARGET)\Shortcuts_StartMenu.wxi ?>
431 </Component>
432
433 <!-- Desktop shortcut. -->
434 <Component Id="cp_DesktopShortcut" Guid="668F8A1A-F5CE-48B3-BB1A-3042EE27B279" Win64="$(var.Property_Win64)">
435 <Condition>VBOX_INSTALLDESKTOPSHORTCUT</Condition>
436 <Shortcut Id="sc_DesktopVBox" Directory="DesktopFolder" Name="$(env.VBOX_PRODUCT)" Description="$(env.VBOX_PRODUCT)"
437 Target="[INSTALLDIR]VirtualBox.exe" WorkingDirectory="INSTALLDIR"/>
438 <RegistryValue Root="HKCU" Key="$(var.Property_RegKeyInstall)" Type="string"
439 Value="installed" KeyPath="yes" />
440 </Component>
441
442 <!-- QuickLaunch shortcut. -->
443 <Component Id="cp_QuickLaunchVBox" Guid="CC19E026-938A-41CB-8E77-3F33296244B6" Win64="$(var.Property_Win64)">
444 <CreateFolder/>
445 <Condition>VBOX_INSTALLQUICKLAUNCHSHORTCUT</Condition>
446 <Shortcut Id="sc_QuickLaunchVBox" Directory="dir_QuicklaunchFolder" Name="$(env.VBOX_PRODUCT)" Description="$(env.VBOX_PRODUCT)"
447 Target="[INSTALLDIR]VirtualBox.exe" WorkingDirectory="INSTALLDIR"/>
448 <RegistryValue Root="HKCU" Key="$(var.Property_RegKeyInstall)"
449 Type="string" Value="installed" KeyPath="yes" />
450 </Component>
451<?endif ?>
452 </Directory>
453 </Directory>
454 </Directory>
455 </Directory> <!-- TARGETDIR -->
456
457 <!-- Note: Feature IDs *must not* be renamed to use any prefixes or such,
458 otherwise this will break manual selection using the ADDLOCAL= syntax
459 when using the command line / scripts (see VBox manual). -->
460 <Feature Id="VBoxApplication" Title="VirtualBox Application" Level="1"
461 Description="!(loc.VB_App)"
462 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand"
463 Absent="disallow" AllowAdvertise="no" >
464
465<?if $(env.VBOX_WITH_QTGUI) = "yes" ?>
466 <!-- Components which are handled only by this installer itself -->
467 <ComponentRef Id="cp_StartMenuVBox" />
468 <ComponentRef Id="cp_DesktopShortcut" />
469 <ComponentRef Id="cp_QuickLaunchVBox" />
470<?endif ?>
471 <!-- Components for removing empty folders after cleaning traces -->
472 <ComponentRef Id="cp_INSTALLDIR" />
473 <ComponentRef Id="cp_SDK" />
474
475 <!-- Components handled either by the installer itself or
476 the merge module -->
477<?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
478 <MergeRef Id="msm_VBoxApp" />
479 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
480 <MergeRef Id="msm_VBoxCOM32On64" />
481 <?endif ?>
482<?else ?>
483 <!-- Make sure to reference the permissions component, which takes care of setting
484 the required ACLs for our files / folders. -->
485 <ComponentRef Id="cp_Permissions" />
486 <?if $(env.VBOX_WITH_QTGUI) = "yes" ?>
487 <ComponentRef Id="cp_RegisterExtensions" />
488 <?endif ?>
489 <?if $(env.VBOX_WITH_DOCS_PACKING) = "yes" ?>
490 <ComponentRef Id="cp_Docs" />
491 <?endif ?>
492 <?if $(env.VBOX_WITH_QTGUI) = "yes" ?>
493 <ComponentRef Id="cp_NLS" />
494 <?endif ?>
495 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
496 <ComponentRef Id="cp_MainCOM_x86" />
497 <?endif ?>
498 <ComponentRef Id="cp_MainCOM" />
499 <?if $(env.VBOX_WITH_SDS) = "yes" ?>
500 <ComponentRef Id="cp_VBoxSDS" />
501 <?endif ?>
502 <?if $(env.VBOX_WITH_MIDL_PROXY_STUB) = "yes" ?>
503 <ComponentRef Id="cp_ProxyStub" />
504 <ComponentRef Id="cp_ProxyStubLegacy" />
505 <?endif?>
506 <ComponentRef Id="cp_MainBinaries" />
507 <?if $(env.VBOX_WITH_QTGUI) = "yes" ?>
508 <ComponentRef Id="cp_QtPlatforms" />
509 <ComponentRef Id="cp_QtSqldrivers" />
510 <ComponentRef Id="cp_QtStyles" />
511 <?endif ?>
512 <?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
513 <ComponentRef Id="cp_VBoxPyInst" />
514 <ComponentRef Id="cp_VBoxPySetup" />
515 <ComponentRef Id="cp_VBoxPyMod" />
516 <ComponentRef Id="cp_VBoxPyDel" />
517 <?endif ?>
518 <?if $(env.VBOX_WITH_VBOXSDL) = "yes" ?>
519 <ComponentRef Id="cp_VBoxSDLBinaries" />
520 <?endif ?>
521 <?if $(env.VBOX_WITH_WEBSERVICES) = "yes" ?>
522 <ComponentRef Id="cp_VBoxWebService" />
523 <?endif ?>
524 <ComponentRef Id="cp_VBoxCAPI" />
525 <?if $(env.VBOX_WITH_UNATTENDED) = "yes" ?>
526 <!-- unattended template component -->
527 <ComponentRef Id="cp_UnattendedTemplates" />
528 <?endif ?>
529 <?if $(env.VBOX_SIGNING_MODE) != none ?>
530 <ComponentRef Id="cp_VBoxSupCat_PreW10" />
531 <ComponentRef Id="cp_VBoxSupCat_W10" />
532 <?endif ?>
533 <ComponentRef Id="cp_VBoxSup" />
534<?endif ?>
535
536<?if $(env.VBOX_WITH_USB) = "yes" ?>
537 <Feature Id="VBoxUSB" Title="VirtualBox USB Support" Level="1"
538 Description="!(loc.VB_USBDriver)"
539 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand"
540 Absent="allow" AllowAdvertise="no" >
541 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
542 <MergeRef Id="msm_VBoxUSB" />
543 <?else ?>
544 <?if $(env.VBOX_SIGNING_MODE) != none ?>
545 <ComponentRef Id="cp_USBFilterDriverCat_PreW10" />
546 <ComponentRef Id="cp_USBFilterDriverCat_W10" />
547 <?endif ?>
548 <ComponentRef Id="cp_USBFilterDriver" />
549 <?if $(env.VBOX_SIGNING_MODE) != none ?>
550 <ComponentRef Id="cp_USBDeviceDriverCat_PreW10" />
551 <ComponentRef Id="cp_USBDeviceDriverCat_W10" />
552 <?endif ?>
553 <ComponentRef Id="cp_USBDeviceDriver" />
554 <?endif ?>
555 </Feature>
556<?endif ?>
557
558<?if $(env.VBOX_WITH_NETFLT) = "yes" ?>
559 <Feature Id="VBoxNetwork" Title="VirtualBox Networking" Level="1"
560 Description="!(loc.VB_Network)"
561 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand"
562 Absent="allow" AllowAdvertise="no" >
563 <Feature Id="VBoxNetworkFlt" Title="VirtualBox Bridged Networking" Level="1"
564 Description="!(loc.VB_NetFltDriver)"
565 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand"
566 Absent="allow" AllowAdvertise="no" >
567 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
568 <MergeRef Id="msm_VBoxNetworkFlt" />
569 <MergeRef Id="msm_VBoxNetworkLwf" />
570 <?else ?>
571 <ComponentRef Id="cp_NetFltDriver" />
572 <?if $(env.VBOX_SIGNING_MODE) != none ?>
573 <ComponentRef Id="cp_NetLwfDriverCat_PreW10" />
574 <ComponentRef Id="cp_NetLwfDriverCat_W10" />
575 <?endif ?>
576 <ComponentRef Id="cp_NetLwfDriver" />
577 <?endif ?>
578 </Feature>
579 <Feature Id="VBoxNetworkAdp" Title="VirtualBox Host-Only Networking" Level="1"
580 Description="!(loc.VB_NetAdpDriver)"
581 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand"
582 Absent="allow" AllowAdvertise="no" >
583 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
584 <MergeRef Id="msm_VBoxNetworkAdp" />
585 <MergeRef Id="msm_VBoxNetworkAdp6" />
586 <?else ?>
587 <ComponentRef Id="cp_NetAdpDriver" />
588 <?if $(env.VBOX_SIGNING_MODE) != none ?>
589 <ComponentRef Id="cp_NetAdp6DriverCat_PreW10" />
590 <ComponentRef Id="cp_NetAdp6DriverCat_W10" />
591 <?endif ?>
592 <ComponentRef Id="cp_NetAdp6Driver" />
593 <?endif ?>
594 </Feature>
595
596 </Feature>
597<?endif ?>
598
599<?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
600 <Feature Id="VBoxPython" Title="VirtualBox Python Support" Level="1"
601 Description="!(loc.VB_Python)"
602 ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand"
603 Absent="allow" AllowAdvertise="no" >
604 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
605 <MergeRef Id="msm_VBoxPython" />
606 <?else ?>
607 <ComponentRef Id="cp_VBoxPythonBinding" />
608 <?endif ?>
609 </Feature>
610<?endif ?>
611 </Feature>
612
613 <!-- Include user interface definition -->
614 <?include UserInterface.wxi ?>
615
616 <InstallExecuteSequence>
617
618 <!--
619 To debug the action sequences, do: "msiexec /i <VBox.msi> /lar <Logfile>"
620
621 InstallUISequence (client side) is:
622 AppSearch
623 LaunchConditions
624 ValidateProductID
625 CostInitialize
626 FileCost
627 CostFinalize
628 ExecuteAction -> will pass control over to "InstallExecuteSequence"
629
630 The first six actions above will be repeated but skipped on the server
631 side if already run on the client side.
632
633 InstallExecuteSequence (server side) is:
634 <First six action from InstallUISequence>
635 .
636 InstallInitialize
637 .
638 InstallFinalize
639
640 The actions between InstallInitialize and InstallFinalize will be gone through twice:
641 - The first time the installer creates an installation script containing all actions in the right
642 sequence which need to get executed in a batch later. At this point the launch conditions for
643 custom actions must be met already!
644 - The second time the generated installation script will be run as-is.
645
646 Also, the InstallUISequence and InstallExecuteSequence tables run in different sessions which
647 need public properties (that is, UPPERCASE properties).
648 -->
649
650 <!-- AppSearch must be done before "RemoveExistingProducts" and before "FindRelatedProducts" -->
651 <AppSearch Sequence="1"></AppSearch>
652 <LaunchConditions After="AppSearch" />
653
654 <!-- First install the new version and then remove the old version. This is more efficient -->
655 <RemoveExistingProducts After="InstallValidate"><![CDATA[PREVIOUSVERSIONSINSTALLED OR NEWERVERSIONDETECTED]]></RemoveExistingProducts>
656
657 <Custom Action="ca_OriginalTargetDir" After="FileCost"><![CDATA[(NOT INSTALLDIR)]]></Custom>
658 <Custom Action="ca_DefaultTargetDir" Before="FileCost" ><![CDATA[NOT INSTALLDIR AND EXISTINGINSTALLDIR]]></Custom>
659
660 <!-- Check + unininstall old TAP instances - we don't need them anymore -->
661 <Custom Action="ca_UninstallTAPInstances" Before="InstallFiles" >1</Custom>
662
663 <!-- Check + uninstall old VBoxDrv service - it was renamed to VBoxSup. -->
664 <Custom Action="ca_UninstallVBoxDrv" Before="InstallFiles" >1</Custom>
665
666 <Custom Action="ca_InstallBrandingArgs" Before="ca_InstallBranding" ><![CDATA[NOT REMOVE]]></Custom>
667 <Custom Action="ca_InstallBranding" Before="InstallFinalize" ><![CDATA[NOT REMOVE]]></Custom>
668
669 <!-- Uninstall branding on complete uninstall, not on update -->
670 <Custom Action="ca_UninstallBrandingArgs" Before="ca_UninstallBranding" ><![CDATA[(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")]]></Custom>
671 <Custom Action="ca_UninstallBranding" Before="InstallFinalize" ><![CDATA[(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")]]></Custom>
672
673<?if $(env.VBOX_WITH_MSM_INSTALL) = "no" ?>
674 <?include VBoxMergeAppSeq.wxi ?>
675 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
676 <?include VBoxMergeCOM32On64Seq.wxi ?>
677 <?endif ?>
678 <?if $(env.VBOX_WITH_NETFLT) = "yes" ?>
679 <?include VBoxMergeNetFltSeq.wxi ?>
680 <?include VBoxMergeNetLwfSeq.wxi ?>
681 <?endif ?>
682 <?include VBoxMergeNetAdpSeq.wxi ?>
683 <?include VBoxMergeNetAdp6Seq.wxi ?>
684 <?include VBoxMergeUSBSeq.wxi ?>
685 <?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
686 <?include VBoxMergePythonSeq.wxi ?>
687 <?endif ?>
688<?endif ?>
689
690 </InstallExecuteSequence>
691
692 </Product>
693</Wix>
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use