VirtualBox

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

最後變更 在這個檔案從108453是 108408,由 vboxsync 提交於 2 週 前

Host installer/win: Also detect and uninstall any same version which currently is installed. Helps with installing several test builds in a row which might have the same version number (but are technically different products in MSI-speak). bugref:10762

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 28.7 KB
 
1<!--
2 VirtualBox Windows Installation Script (WiX)
3-->
4<!--
5 Copyright (C) 2014-2024 Oracle and/or its affiliates.
6
7 This file is part of VirtualBox base platform packages, as
8 available from https://www.alldomusa.eu.org.
9
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License
12 as published by the Free Software Foundation, in version 3 of the
13 License.
14
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, see <https://www.gnu.org/licenses>.
22
23 SPDX-License-Identifier: GPL-3.0-only
24-->
25
26<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
27
28 <?include Defines.wxi ?>
29
30<?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
31 <!-- The merge module file names -->
32 <?define Property_VBoxMergeApp = "$(env.VBOX_WIN_INST_MERGE_APP)" ?>
33 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
34 <?define Property_VBoxMergeCOM32On64 = "$(env.VBOX_WIN_INST_MERGE_COM32ON64)" ?>
35 <?endif?>
36 <?if $(env.VBOX_WITH_USB) = "yes" ?>
37 <?define Property_VBoxMergeUSB = "$(env.VBOX_WIN_INST_MERGE_USB)" ?>
38 <?endif?>
39 <?if $(env.VBOX_WITH_NETADP) = "yes" ?>
40 <?define Property_VBoxMergeNetworkAdp6 = "$(env.VBOX_WIN_INST_MERGE_NETADP6)" ?>
41 <?endif?>
42 <?if $(env.VBOX_WITH_NETFLT) = "yes" ?>
43 <?define Property_VBoxMergeNetworkLwf = "$(env.VBOX_WIN_INST_MERGE_NETLWF)" ?>
44 <?endif?>
45 <?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
46 <?define Property_VBoxMergePython = "$(env.VBOX_WIN_INST_MERGE_PYTHON)" ?>
47 <?endif?>
48<?endif?>
49
50 <Package UpgradeCode="C4BAD770-BFE8-4D2C-A592-693028A7215B" Name="$(env.VBOX_PRODUCT) $(env.VBOX_VERSION_STRING)"
51 Language="!(loc.LANG)" Version="$(var.Property_Version)" Manufacturer="$(env.VBOX_VENDOR)"
52 InstallerVersion="$(var.VBoxProperty_MsiInstallerVersion)">
53
54 <SummaryInformation Keywords="Installer"
55 Description="$(env.VBOX_PRODUCT) $(var.Property_VersionExt) installation package" Manufacturer="$(env.VBOX_VENDOR)" />
56
57 <?include CommonProperties.wxi ?>
58
59 <!-- We want a verbose installation log by default, to better track down issues. -->
60 <Property Id="MsiLogging" Value="voicewarmupx" />
61
62 <!-- @todo indentation is wrong here and it goes on to about line 525. -->
63 <!-- Global properties -->
64 <Property Id="ARPPRODUCTICON" Value="IconVirtualBox" />
65 <Property Id="ARPURLINFOABOUT" Value="http://www.alldomusa.eu.org" />
66 <Property Id="ARPURLUPDATEINFO" Value="http://www.alldomusa.eu.org" />
67
68 <Property Id="NETWORKTYPE" Value="NDIS6" Secure="yes" />
69
70 <!-- Whether or not registering of file extensions handled by FE/Qt should be performed -->
71 <Property Id="VBOX_REGISTERFILEEXTENSIONS" Value="1" Secure="yes" />
72
73 <SetProperty Id="VBOX_REGISTERFILEEXTENSIONS" After="AppSearch" Sequence="both" Value="{}" Condition="VBOX_REGISTERFILEEXTENSIONS=&quot;0&quot;" />
74
75 <?include PublicProperties.wxi ?>
76
77 <!-- Only 64-bit Windows hosts are supported (x86_64 and ARM64).
78 This is normally checked by VBoxStub, but we need to do this check here as well,
79 in case the .msi gets started directly. -->
80 <Launch Condition="VersionNT64" Message="!(loc.Only64Bit)" />
81
82 <!-- Compare the current host's platform architecture with the installer's architecture (at build time). -->
83 <Launch Condition="VBOX_PLATFORM_ARCH=&quot;$(env.KBUILD_TARGET_ARCH)&quot;" Message="!(loc.WrongPlatformArch)" />
84
85 <Launch Condition="Privileged" Message="!(loc.NeedAdmin)" />
86
87<?if $(env.VBOX_WITH_CRT_PACKING) = "no" ?>
88 <!-- Check if we have the required MS CRT(s) installed when we're not shipping those. -->
89 <Launch Condition="Installed OR (VBOX_MSCRT_INSTALLED)" Message="!(loc.NeedMSCRT)" />
90<?endif?>
91 <!-- Check if the current INSTALLDIR is valid or not, or if VBox already is installed.
92 Thight might be handed-in via command line (MSI properties) or through a customized merge module. See @bugref{10616} -->
93 <Launch Condition="Installed OR (VBox_Target_Dir_Is_Valid=&quot;1&quot;)" Message="!(loc.InvalidTargetDir)" />
94
95 <!-- Detect old innotek installation -->
96 <!-- Force a manual uninstall of an already installed innotek VirtualBox version first -->
97 <Property Id="VBOXINNOTEK">
98 <RegistrySearch Id="RegSearchInnotekVersion" Root="HKLM" Key="SOFTWARE\Innotek\VirtualBox" Name="Version" Type="raw" Bitness="$(var.Property_Bitness)" />
99 </Property>
100 <Launch Condition="NOT VBOXINNOTEK" Message="!(loc.InnotekFound)" />
101
102
103 <!-- *************************** Upgrade packages only ******************************* -->
104 <!-- Minimum and Maximum specify the range of versions we are supposed to update with this upgrade.
105 IncludeMaximum and IncludeMinimum specify whether the bound value is actually included in the range or not
106 (IncludeMaximum = yes meaning to find versions below or equal to the version specified in Maximum while
107 IncludeMaximum = no only finds those below the Maximum).
108 OnlyDetect tells the installer not to remove the previous product. This is useful as long as we
109 only change files in the package -->
110
111 <Upgrade Id="C4BAD770-BFE8-4D2C-A592-693028A7215B"> <!-- Upgrade of Sun xVM VirtualBox >= v1.6.0 -->
112
113 <!-- Detect and uninstall if the same version (as this version) of VirtualBox already is installed.
114 Useful for debugging / testboxes -->
115 <UpgradeVersion Property="SAMEVERSIONDETECTED" Minimum="$(var.Property_Version)" IncludeMinimum="yes"
116 Maximum="$(var.Property_Version)" IncludeMaximum="yes"
117 OnlyDetect="no" />
118
119 <!-- Detect and uninstall if a newer version (than this version) of VirtualBox already is installed.
120 @todo Should make a dialog appear asking user to confirm downgrade -->
121 <UpgradeVersion Property="NEWERVERSIONDETECTED" Minimum="$(var.Property_Version)" IncludeMinimum="no"
122 Maximum="9.9.99" IncludeMaximum="yes"
123 OnlyDetect="no" />
124
125 <!-- Detect if an older version (than this version) of VirtualBox already is installed. -->
126 <UpgradeVersion Property="PREVIOUSVERSIONDETECTED" Minimum="1.0.0.0" Maximum="$(var.Property_Version)" IncludeMaximum="no" />
127
128 </Upgrade>
129
130 <!-- The product's icon table -->
131 <Icon Id="IconVirtualBox" SourceFile="$(env.VBOX_WINDOWS_ICON_FILE)" />
132
133 <!-- The media/binary IDs -->
134 <!--
135 The effects of CompressionLevel options:
136 default/mszip, high: 32.54s
137 -rw-rw-rw- 1 bird 0 53 591 221 2016-09-25 03:56 common.cab
138 -rw-rw-rw- 1 bird 0 41 560 082 2016-09-25 03:56 VirtualBox-5.1.51-r110887_en_US.msi
139 high, high: 46.76s
140 -rw-rw-rw- 1 bird 0 53 591 221 2016-09-25 03:49 common.cab
141 -rw-rw-rw- 1 bird 0 34 056 210 2016-09-25 03:49 VirtualBox-5.1.51-r110887_en_US.msi
142 medium, medium: 29.95s
143 -rw-rw-rw- 1 bird 0 56 293 089 2016-09-25 03:53 common.cab
144 -rw-rw-rw- 1 bird 0 35 498 002 2016-09-25 03:54 VirtualBox-5.1.51-r110887_en_US.msi
145 low, low: 25.41s
146 -rw-rw-rw- 1 bird 0 57 616 155 2016-09-25 03:52 common.cab
147 -rw-rw-rw- 1 bird 0 37 181 458 2016-09-25 03:52 VirtualBox-5.1.51-r110887_en_US.msi
148 mszip/default, mszip/default: 16.13s
149 -rw-rw-rw- 1 bird 0 58 751 954 2016-09-25 03:49 common.cab
150 -rw-rw-rw- 1 bird 0 41 560 082 2016-09-25 03:50 VirtualBox-5.1.51-r110887_en_US.msi
151 none, none: 2.37s
152 -rw-rw-rw- 1 bird 0 92 470 301 2016-09-25 03:47 common.cab
153 -rw-rw-rw- 1 bird 0 135 874 578 2016-09-25 03:47 VirtualBox-5.1.51-r110887_en_US.msi
154
155 We use the -defaultcompressionlevel command line option to control this.
156 -->
157 <Media Id="1" Cabinet="product.cab" EmbedCab="yes" />
158<?if $(env.VBOX_WITH_MSM_INSTALL) = "no" ?>
159 <?if $(env.VBOX_WITH_COMBINED_PACKAGE) = "yes" ?>
160 <Media Id="2" Cabinet="common.cab" EmbedCab="no" />
161 <?endif?>
162<?endif?>
163 <Binary Id="VBoxInstallHelper" SourceFile="$(env.PATH_OUT)\bin\VBoxInstallHelper.dll" />
164
165 <!-- Figure out the initial (original) installation directory.
166 Note: For ARM64 this also will be ProgramFiles64Folder. See https://learn.microsoft.com/en-us/windows/arm/faq -->
167<?if $(env.KBUILD_TARGET_ARCH) = "amd64" or $(env.KBUILD_TARGET_ARCH) = "arm64" ?>
168 <CustomAction Id="ca_OriginalTargetDir" Execute="firstSequence" Property="INSTALLDIR" Value="[ProgramFiles64Folder]\$(env.VBOX_VENDOR_SHORT)\VirtualBox" />
169<?else?>
170 <CustomAction Id="ca_OriginalTargetDir" Execute="firstSequence" Property="INSTALLDIR" Value="[ProgramFilesFolder]\$(env.VBOX_VENDOR_SHORT)\VirtualBox" />
171<?endif?>
172
173 <!-- Figure out where a previous installation was, if any. -->
174 <Property Id="EXISTINGINSTALLDIR" Secure="yes">
175 <RegistrySearch Id="RegistryGetInstallPath" Root="HKLM" Key="$(var.Property_RegKey)" Name="InstallDir" Type="raw" Bitness="$(var.Property_Bitness)" />
176 </Property>
177 <CustomAction Id="ca_DefaultTargetDir" Execute="firstSequence" Property="INSTALLDIR" Value="[EXISTINGINSTALLDIR]" />
178
179 <CustomAction Id="ca_UninstallTAPInstances" DllEntry="UninstallTAPInstances" Execute="deferred" Return="check" Impersonate="no" BinaryRef="VBoxInstallHelper" />
180 <CustomAction Id="ca_UninstallVBoxDrv" DllEntry="UninstallVBoxDrv" Execute="deferred" Return="ignore" Impersonate="no" BinaryRef="VBoxInstallHelper" />
181
182 <Property Id="VBOXDEPENDENCY" Secure="yes">
183 <DirectorySearch Id="VBoxInstallDir" Path="[EXISTINGINSTALLDIR]">
184 <FileSearch Name="dependency.dep" />
185 </DirectorySearch>
186 </Property>
187
188<?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
189 <Property Id="EXISTING_PYTHON_API_FOLDER" Secure="yes">
190 <RegistrySearch Id="RegistryGetPythonApiInstallPath" Root="HKLM" Key="$(var.Property_RegKey)" Name="PythonApiInstallDir" Type="raw" Bitness="$(var.Property_Bitness)" />
191 </Property>
192<?endif?>
193
194 <!--
195 install upgrade uninstall
196 VBOXDEPENDENCY 0 1/0 1/0
197 UPGRADINGPRODUCTCODE 0 1 0
198 final 0 1 0
199 not final 1 0 1
200 -->
201
202 <Launch Condition="NOT (VBOXDEPENDENCY AND UPGRADINGPRODUCTCODE)" Message="!(loc.UsedByOtherApp)" />
203
204 <!-- Detect old Sun installation -->
205 <!-- Force a manual uninstall of an already installed Sun VirtualBox version first -->
206 <!--<Property Id="VBOXSUN">
207 <RegistrySearch Id="RegSearchSunVersion" Root="HKLM" Key="SOFTWARE\Sun\VirtualBox" Name="Version" Type="raw" Bitness="$(var.Property_Bitness)"/>
208 </Property>
209 <Condition Message="!(loc.SunFound)">
210 NOT VBOXSUN
211 </Condition>-->
212
213 <!-- Note: Only if we include FE/Qt, we offer to start VirtualBox at the end of a successful installation. -->
214<?if $(env.VBOX_WITH_QTGUI) = "yes" ?>
215 <!-- Note: Make sure to set the CWD (via 'Directory' attribute) to not run off a possibly temporary directory or some such (see @bugref{10203}). -->
216 <CustomAction Id="ca_StartVBox" Directory="INSTALLDIR" ExeCommand="[INSTALLDIR]VirtualBox.exe" Return="asyncNoWait" Impersonate="yes" />
217<?endif?>
218 <!-- General custom action for starting an application or opening a file using the system's default open handler. Ignores result.
219 The "WixShellExecTarget" property must be set beforehand as the actual execution parameter.
220
221 Note! Manually using a custom action w/ ExecCommand + "rundll32 [...]" will result in big delays on Windows/ARM,
222 probably due to the x86 emulation layer and/or shimming in-between. So we need to this built-in action (part of wixutil)
223 instead.
224
225 Currently being used for displaying the MSI log file in the fatal error dialog. -->
226 <CustomAction Id="ca_ShellExecIgnore" BinaryRef="Wix4UtilCA_$(sys.BUILDARCHSHORT)" DllEntry="WixShellExec" Execute="immediate" Return="ignore" />
227
228 <CustomAction Id="ca_CheckSerial" DllEntry="CheckSerial" Impersonate="no" BinaryRef="VBoxInstallHelper" />
229
230 <CustomAction Id="ca_InstallBranding" DllEntry="InstallBranding" Execute="deferred" Return="check" Impersonate="no" BinaryRef="VBoxInstallHelper" />
231 <CustomAction Id="ca_InstallBrandingArgs" Property="ca_InstallBranding" Value="[INSTALLDIR]" Execute="immediate" />
232
233 <CustomAction Id="ca_UninstallBranding" DllEntry="UninstallBranding" Execute="deferred" Return="check" Impersonate="no" BinaryRef="VBoxInstallHelper" />
234 <CustomAction Id="ca_UninstallBrandingArgs" Property="ca_UninstallBranding" Value="[INSTALLDIR]" Execute="immediate" />
235
236 <?include VBoxMergeAppCA.wxi ?>
237<?if $(env.VBOX_WITH_MSM_INSTALL) = "no" ?>
238 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
239 <?include VBoxMergeCOM32On64CA.wxi ?>
240 <?endif?>
241 <?if $(env.VBOX_WITH_NETADP) = "yes" ?>
242 <?include VBoxMergeNetLwfCA.wxi ?>
243 <?include VBoxMergeNetAdp6CA.wxi ?>
244 <?endif?>
245 <?if $(env.VBOX_WITH_USB) = "yes" ?>
246 <?include VBoxMergeUSBCA.wxi ?>
247 <?endif?>
248 <?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
249 <?include VBoxMergePythonCA.wxi ?>
250 <?endif?>
251<?endif?>
252
253 <!-- TARGETDIR -->
254
255 <!-- Note: Feature IDs *must not* be renamed to use any prefixes or such,
256 otherwise this will break manual selection using the ADDLOCAL= syntax
257 when using the command line / scripts (see VBox manual). -->
258 <Feature Id="VBoxApplication" Title="VirtualBox Application" Level="1" Description="!(loc.VB_App)" ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand" AllowAdvertise="no" AllowAbsent="no">
259
260<?if $(env.VBOX_WITH_QTGUI) = "yes" ?>
261 <!-- Components which are handled only by this installer itself -->
262 <ComponentRef Id="cp_StartMenuVBox" />
263 <ComponentRef Id="cp_DesktopShortcut" />
264<?endif?>
265 <!-- Components for removing empty folders after cleaning traces -->
266 <ComponentRef Id="cp_INSTALLDIR" />
267 <ComponentRef Id="cp_SDK" />
268
269 <!-- Components handled either by the installer itself or
270 the merge module -->
271<?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
272 <MergeRef Id="msm_VBoxApp" />
273 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
274 <MergeRef Id="msm_VBoxCOM32On64" />
275 <?endif?>
276<?else?>
277 <!-- Make sure to reference the permissions component, which takes care of setting
278 the required ACLs for our files / folders. -->
279 <ComponentRef Id="cp_Permissions" />
280 <?if $(env.VBOX_WITH_DOCS_PACKING) = "yes" ?>
281 <ComponentRef Id="cp_Docs" />
282 <?endif?>
283 <?if $(env.VBOX_WITH_QTGUI) = "yes" ?>
284 <ComponentRef Id="cp_NLS" />
285 <?endif?>
286 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
287 <ComponentRef Id="cp_MainCOM_x86" />
288 <?endif?>
289 <ComponentRef Id="cp_MainCOM" />
290 <?if $(env.VBOX_WITH_MIDL_PROXY_STUB) = "yes" ?>
291 <ComponentRef Id="cp_ProxyStub" />
292 <?endif?>
293 <?if $(env.VBOX_WITH_DTRACE) = "yes" ?>
294 <ComponentRef Id="cp_dir_DTrace_lib_arch" />
295 <ComponentRef Id="cp_dir_DTrace_testcase_arch" />
296 <?endif?>
297 <?if $(env.VBOX_WITH_UNATTENDED_TEMPLATES) = "yes" ?>
298 <ComponentRef Id="cp_UnattendedTemplates" />
299 <?endif?>
300 <ComponentRef Id="cp_MainBinaries" />
301 <?if $(env.VBOX_WITH_QTGUI) = "yes" and $(env.VBOX_WITH_ORACLE_QT) = "yes" ?>
302 <ComponentRef Id="cp_QtPlatforms" />
303 <ComponentRef Id="cp_QtSqldrivers" />
304 <ComponentRef Id="cp_QtStyles" />
305 <?endif?>
306 <?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
307 <ComponentRef Id="cp_VBoxPyInst" />
308 <ComponentRef Id="cp_VBoxPySetup" />
309 <ComponentRef Id="cp_VBoxPyMod" />
310 <ComponentRef Id="cp_VBoxPyDel" />
311 <?endif?>
312 <?if $(env.VBOX_WITH_VBOXSDL) = "yes" ?>
313 <ComponentRef Id="cp_VBoxSDLBinaries" />
314 <?endif?>
315 <?if $(env.VBOX_WITH_WEBSERVICES) = "yes" ?>
316 <ComponentRef Id="cp_VBoxWebService" />
317 <?endif?>
318 <ComponentRef Id="cp_VBoxCAPI" />
319 <?if $(env.VBOX_SIGNING_MODE) != none ?>
320 <ComponentRef Id="cp_VBoxSupCat_W10" />
321 <?endif?>
322 <ComponentRef Id="cp_VBoxSup" />
323<?endif?>
324
325<?if $(env.VBOX_WITH_USB) = "yes" ?>
326 <Feature Id="VBoxUSB" Title="VirtualBox USB Support" Level="1" Description="!(loc.VB_USBDriver)" ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand" AllowAdvertise="no">
327 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
328 <MergeRef Id="msm_VBoxUSB" />
329 <?else?>
330 <?if $(env.VBOX_SIGNING_MODE) != none ?>
331 <ComponentRef Id="cp_USBFilterDriverCat_W10" />
332 <?endif?>
333 <ComponentRef Id="cp_USBFilterDriver" />
334 <?if $(env.VBOX_SIGNING_MODE) != none ?>
335 <ComponentRef Id="cp_USBDeviceDriverCat_W10" />
336 <?endif?>
337 <ComponentRef Id="cp_USBDeviceDriver" />
338 <?endif?>
339 </Feature>
340<?endif?>
341
342<?if $(env.VBOX_WITH_NETFLT) = "yes" ?>
343 <Feature Id="VBoxNetwork" Title="VirtualBox Networking" Level="1" Description="!(loc.VB_Network)" ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand" AllowAdvertise="no">
344 <Feature Id="VBoxNetworkFlt" Title="VirtualBox Bridged Networking" Level="1" Description="!(loc.VB_NetLwfDriver)" ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand" AllowAdvertise="no">
345 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
346 <MergeRef Id="msm_VBoxNetworkLwf" />
347 <?else?>
348 <?if $(env.VBOX_SIGNING_MODE) != none ?>
349 <ComponentRef Id="cp_NetLwfDriverCat_W10" />
350 <?endif?>
351 <ComponentRef Id="cp_NetLwfDriver" />
352 <?endif?>
353 </Feature>
354 <Feature Id="VBoxNetworkAdp" Title="VirtualBox Host-Only Networking" Level="1" Description="!(loc.VB_NetAdp6Driver)" ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand" AllowAdvertise="no">
355 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
356 <MergeRef Id="msm_VBoxNetworkAdp6" />
357 <?else?>
358 <?if $(env.VBOX_SIGNING_MODE) != none ?>
359 <ComponentRef Id="cp_NetAdp6DriverCat_W10" />
360 <?endif?>
361 <ComponentRef Id="cp_NetAdp6Driver" />
362 <?endif?>
363 </Feature>
364 </Feature>
365<?endif?>
366
367<?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
368 <Feature Id="VBoxPython" Title="VirtualBox Python Support" Level="1" Description="!(loc.VB_Python)" ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand" AllowAdvertise="no">
369 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
370 <MergeRef Id="msm_VBoxPython" />
371 <?else?>
372 <ComponentRef Id="cp_VBoxPythonBinding" />
373 <?endif?>
374 </Feature>
375<?endif?>
376 </Feature>
377
378 <!-- Include user interface definition -->
379 <?include UserInterface.wxi ?>
380
381 <InstallExecuteSequence>
382
383 <!--
384 To debug the action sequences, do: "msiexec /i <VBox.msi> /lar <Logfile>"
385
386 InstallUISequence (client side) is:
387 AppSearch
388 LaunchConditions
389 ValidateProductID
390 CostInitialize
391 FileCost
392 CostFinalize
393 ExecuteAction -> will pass control over to "InstallExecuteSequence"
394
395 The first six actions above will be repeated but skipped on the server
396 side if already run on the client side.
397
398 InstallExecuteSequence (server side) is:
399 <First six action from InstallUISequence>
400 .
401 InstallInitialize
402 .
403 InstallFinalize
404
405 The actions between InstallInitialize and InstallFinalize will be gone through twice:
406 - The first time the installer creates an installation script containing all actions in the right
407 sequence which need to get executed in a batch later. At this point the launch conditions for
408 custom actions must be met already!
409 - The second time the generated installation script will be run as-is.
410
411 Also, the InstallUISequence and InstallExecuteSequence tables run in different sessions which
412 need public properties (that is, UPPERCASE properties).
413 -->
414
415 <!-- AppSearch must be done before "RemoveExistingProducts" and before "FindRelatedProducts" -->
416 <AppSearch Sequence="1"></AppSearch>
417 <LaunchConditions After="AppSearch" />
418
419 <!-- First uninstall any installed VBox version, then install this version. -->
420 <RemoveExistingProducts After="InstallValidate" Condition="PREVIOUSVERSIONDETECTED OR NEWERVERSIONDETECTED OR SAMEVERSIONDETECTED" />
421
422 <Custom Action="ca_OriginalTargetDir" After="FileCost" Condition="(NOT INSTALLDIR)" />
423 <Custom Action="ca_DefaultTargetDir" Before="FileCost" Condition="NOT INSTALLDIR AND EXISTINGINSTALLDIR" />
424
425 <!-- Check + unininstall old TAP instances - we don't need them anymore -->
426 <Custom Action="ca_UninstallTAPInstances" Before="InstallFiles" Condition="1" />
427
428 <!-- Check + uninstall old VBoxDrv service - it was renamed to VBoxSup. -->
429 <Custom Action="ca_UninstallVBoxDrv" Before="InstallFiles" Condition="1" />
430
431 <Custom Action="ca_InstallBrandingArgs" Before="ca_InstallBranding" Condition="NOT REMOVE" />
432 <Custom Action="ca_InstallBranding" Before="InstallFinalize" Condition="NOT REMOVE" />
433
434 <!-- Uninstall branding on complete uninstall, not on update -->
435 <Custom Action="ca_UninstallBrandingArgs" Before="ca_UninstallBranding" Condition="(NOT UPGRADINGPRODUCTCODE) AND (REMOVE=&quot;ALL&quot;)" />
436 <Custom Action="ca_UninstallBranding" Before="InstallFinalize" Condition="(NOT UPGRADINGPRODUCTCODE) AND (REMOVE=&quot;ALL&quot;)" />
437
438<?if $(env.VBOX_WITH_MSM_INSTALL) = "no" ?>
439 <?include VBoxMergeAppSeq.wxi ?>
440 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
441 <?include VBoxMergeCOM32On64Seq.wxi ?>
442 <?endif?>
443 <?if $(env.VBOX_WITH_NETADP) = "yes" ?>
444 <?include VBoxMergeNetLwfSeq.wxi ?>
445 <?include VBoxMergeNetAdp6Seq.wxi ?>
446 <?endif?>
447 <?if $(env.VBOX_WITH_USB) = "yes" ?>
448 <?include VBoxMergeUSBSeq.wxi ?>
449 <?endif?>
450 <?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
451 <?include VBoxMergePythonSeq.wxi ?>
452 <?endif?>
453<?endif?>
454
455 </InstallExecuteSequence>
456
457 <Directory Id="$(var.Property_ProgramFiles)" Name="PFiles">
458 <Directory Id="VENDOR" Name="$(env.VBOX_VENDOR_SHORT)">
459 <Directory Id="INSTALLDIR" Name="VirtualBox">
460 <!-- Components for removing empty folder after cleaning traces -->
461 <Component Id="cp_INSTALLDIR" Guid="374723AF-5990-4552-A1B0-82C72EFA360F">
462 <RemoveFolder Id="INSTALLDIR" On="uninstall" />
463 </Component>
464<?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
465 <Merge Id="msm_VBoxApp" Language="0" SourceFile="$(var.Property_VBoxMergeApp)" DiskId="1">
466 <ConfigurationData Name="argRegisterExtensions" Value="[VBOX_REGISTERFILEEXTENSIONS]" />
467 </Merge>
468 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
469 <Merge Id="msm_VBoxCOM32On64" Language="0" SourceFile="$(var.Property_VBoxMergeCOM32On64)" DiskId="1" />
470 <?endif?>
471<?else?>
472 <Directory Id="msm_VBoxApplicationFolder" FileSource=".">
473 <?include VBoxMergeApp.wxi ?>
474 <?if $(env.VBOX_WITH_32_ON_64_MAIN_API) = "yes" ?>
475 <?include VBoxMergeCOM32On64.wxi ?>
476 <?endif?>
477 </Directory>
478<?endif?>
479 <Directory Id="dir_Drivers" Name="drivers">
480<?if $(env.VBOX_WITH_USB) = "yes" ?>
481 <Directory Id="dir_USB" Name="USB">
482 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
483 <Merge Id="msm_VBoxUSB" Language="0" SourceFile="$(var.Property_VBoxMergeUSB)" DiskId="1" />
484 <?else?>
485 <Directory Id="msm_VBoxUSBFolder" FileSource=".">
486 <?include VBoxMergeUSB.wxi ?>
487 </Directory>
488 <?endif?>
489 </Directory>
490<?endif?>
491 <Directory Id="dir_Network" Name="network">
492<?if $(env.VBOX_WITH_NETADP) = "yes" ?>
493 <Directory Id="dir_NetLwf" Name="netlwf">
494 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
495 <Merge Id="msm_VBoxNetworkLwf" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeNetworkLwf)" DiskId="1">
496 <ConfigurationData Name="passedNetworkType" Value="[NETWORKTYPE]" />
497 </Merge>
498 <?else?>
499 <Directory Id="msm_VBoxNetworkLwfFolder" FileSource=".">
500 <?include VBoxMergeNetLwf.wxi ?>
501 </Directory>
502 <?endif?>
503 </Directory>
504<?endif?>
505<?if $(env.VBOX_WITH_NETADP) = "yes" ?>
506 <Directory Id="dir_NetAdp6" Name="netadp6">
507 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
508 <Merge Id="msm_VBoxNetworkAdp6" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeNetworkAdp6)" DiskId="1">
509 <ConfigurationData Name="passedNetworkType" Value="[NETWORKTYPE]" />
510 </Merge>
511 <?else?>
512 <Directory Id="msm_VBoxNetworkAdp6Folder" FileSource=".">
513 <?include VBoxMergeNetAdp6.wxi ?>
514 </Directory>
515 <?endif?>
516 </Directory>
517<?endif?>
518 </Directory>
519 </Directory>
520 <Directory Id="dir_SDK" Name="sdk">
521<?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
522 <Directory Id="dir_SDKInstaller" Name="installer"> <!-- Note: For < VBox 7.1 this folder was called 'install'. -->
523 <Directory Id="dir_SDKInstallerPython" Name="python">
524 <?if $(env.VBOX_WITH_MSM_INSTALL) = "yes" ?>
525 <Merge Id="msm_VBoxPython" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergePython)" DiskId="1" />
526 <?else?>
527 <Directory Id="msm_VBoxPythonFolder" FileSource=".">
528 <?include VBoxMergePython.wxi ?>
529 </Directory>
530 <?endif?>
531 </Directory>
532 </Directory>
533<?endif?>
534 <!-- Component for removing empty folder after cleaning traces -->
535 <Component Id="cp_SDK" Guid="ACA59290-B2D6-4E96-B164-C45F70A90219">
536 <RemoveFolder Id="dir_SDK" On="uninstall" />
537 </Component>
538 </Directory>
539
540 </Directory> <!-- INSTALLDIR -->
541 </Directory> <!-- $(env.VBOX_VENDOR_SHORT) -->
542 </Directory> <!-- Program Files -->
543
544<?if $(env.VBOX_WITH_QTGUI) = "yes" ?>
545 <!-- Start menu entries -->
546 <Directory Id="ProgramMenuFolder">
547 <Directory Id="StartMenuFolder">
548 <Directory Id="dir_StartMenuVBox" Name="$(env.VBOX_PRODUCT)">
549 <Component Id="cp_StartMenuVBox" Guid="C2DC321A-CE63-40EE-8A98-724DF8BD12FB" Condition="VBOX_INSTALLSTARTMENUENTRIES" Bitness="$(var.Property_Bitness)">
550 <Shortcut Id="sc_StartMenuVBox" Directory="dir_StartMenuVBox" Name="$(env.VBOX_PRODUCT)" Description="$(env.VBOX_PRODUCT)" Target="[INSTALLDIR]VirtualBox.exe" WorkingDirectory="INSTALLDIR" />
551 <RegistryValue Root="HKCU" Key="$(var.Property_RegKeyInstall)" Type="string" Value="installed" KeyPath="yes" />
552 <?include $(env.PATH_TARGET)\Shortcuts_StartMenu.wxi ?>
553 <RemoveFolder Id="rmf_ShortcutStartMenu" On="uninstall" />
554 </Component>
555 </Directory>
556 </Directory>
557 </Directory>
558
559 <!-- Desktop shortcut -->
560 <Directory Id="DesktopFolder" Name="Desktop">
561 <Component Id="cp_DesktopShortcut" Guid="668F8A1A-F5CE-48B3-BB1A-3042EE27B279" Condition="VBOX_INSTALLDESKTOPSHORTCUT" Bitness="$(var.Property_Bitness)">
562 <Shortcut Id="sc_DesktopVBox" Directory="DesktopFolder" Name="$(env.VBOX_PRODUCT)" Description="$(env.VBOX_PRODUCT)" Target="[INSTALLDIR]VirtualBox.exe" WorkingDirectory="INSTALLDIR" />
563 <RegistryValue Root="HKCU" Key="$(var.Property_RegKeyInstall)" Type="string" Value="installed" KeyPath="yes" />
564 <RemoveFolder Id="rmf_ShortcutDesktop" On="uninstall" />
565 </Component>
566 </Directory>
567<?endif?> <!-- $(env.VBOX_WITH_QTGUI) = "yes" -->
568
569</Package>
570</Wix>
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette