VirtualBox.wxs revision f89a9a89bbb6486fda960f0b97be6dc931ca5ba1
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync<?xml version='1.0' encoding='windows-1252'?>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync<!--
c5a50b49a2e48128340b661a67c80ae207288038vboxsync VirtualBox Windows Installation Script (WiX)
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync Copyright (C) 2014 Oracle Corporation
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync
1a4f596ce75683d6e0b330ac39510b2e177f3b43vboxsync This file is part of VirtualBox Open Source Edition (OSE), as
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync available from http://www.virtualbox.org. This file is free software;
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync you can redistribute it and/or modify it under the terms of the GNU
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync General Public License (GPL) as published by the Free Software
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync Foundation, in version 2 as it comes in the "COPYING" file of the
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync VirtualBox OSE distribution. VirtualBox OSE is distributed in the
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync-->
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync xmlns:difxapp="http://schemas.microsoft.com/wix/DifxAppExtension">
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <?include Properties.wxi ?>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <!-- The merge module file names -->
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <?define Property_VBoxMergeApp = "$(env.VBOX_WIN_INST_MERGE_APP)" ?>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <?define Property_VBoxMergeUSB = "$(env.VBOX_WIN_INST_MERGE_USB)" ?>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync<?if $(env.VBOX_WITH_NETFLT) = "yes" ?>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <?define Property_VBoxMergeNetworkFlt = "$(env.VBOX_WIN_INST_MERGE_NETFLT)" ?>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync<?endif ?>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <?define Property_VBoxMergeNetworkAdp = "$(env.VBOX_WIN_INST_MERGE_NETADP)" ?>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync<?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <?define Property_VBoxMergePython = "$(env.VBOX_WIN_INST_MERGE_PYTHON)" ?>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync<?endif ?>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <Product Id="*"
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync UpgradeCode="C4BAD770-BFE8-4D2C-A592-693028A7215B"
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync Name="$(env.VBOX_PRODUCT) $(env.VBOX_VERSION_STRING)"
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync Language="!(loc.LANG)"
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync Codepage="1252"
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync Version="$(var.Property_Version)"
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync Manufacturer="$(env.VBOX_VENDOR)">
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <Package Id="*"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Keywords="Installer"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Description="$(env.VBOX_PRODUCT) $(var.Property_VersionExt) installation package"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Comments="$(env.VBOX_PRODUCT) installation package"
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync Compressed="yes"
67927207a2d6bb545eb655ef14cdb090b1957120vboxsync Manufacturer="$(env.VBOX_VENDOR)"
1a4f596ce75683d6e0b330ac39510b2e177f3b43vboxsync InstallerVersion="200"
5c65eaa08f2ec993a19c9bef6e5463918e40e0ebvboxsync InstallPrivileges="elevated"
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync Platform="$(var.Property_Platform)"/>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <!-- Global properties -->
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <Property Id="ARPPRODUCTICON">IconVirtualBox</Property>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <Property Id="ARPURLINFOABOUT">http://www.virtualbox.org</Property>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <Property Id="ARPURLUPDATEINFO">http://www.virtualbox.org</Property>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <!-- Install the product for all users on the system -->
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <Property Id="ALLUSERS"><![CDATA[1]]></Property>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <!-- Force overwriting all files and re-create shortcuts to guarantee a working environment -->
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <Property Id='REINSTALLMODE' Value='amus'/>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <!-- VirtualBox properties -->
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <Property Id="VBOX_INSTALLDESKTOPSHORTCUT" Value="1"></Property>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <Property Id="VBOX_INSTALLQUICKLAUNCHSHORTCUT" Value="1"></Property>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <Property Id="VBOX_REGISTERFILEEXTENSIONS" Value="1"></Property>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <Property Id="VBOX_STARTVBOX" Value="1"></Property>
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync <!-- Make sure installation will not start on anything other but the NT family -->
ffa06e5b007c5b2f57341d90088189ce5f99c091vboxsync<?if $(env.BUILD_TARGET_ARCH) = "amd64" ?>
<Condition Message="!(loc.Only64Bit)">
VersionNT64
</Condition>
<?else ?>
<Condition Message="!(loc.Only32Bit)">
NOT VersionNT64
</Condition>
<Condition Message="!(loc.WrongOS)">
NOT VersionNT=500 AND NOT Version9X AND NOT VersionNT64
</Condition>
<?endif ?>
<Condition Message="!(loc.NeedAdmin)">
Privileged
</Condition>
<!-- Detect old innotek installation -->
<!-- Force a manual uninstall of an already installed innotek VirtualBox version first -->
<Property Id="VBOXINNOTEK">
<RegistrySearch Id="RegSearchInnotekVersion" Root="HKLM" Key="SOFTWARE\Innotek\VirtualBox" Name="Version" Type="raw" Win64="$(var.Property_Win64)"/>
</Property>
<Condition Message="!(loc.InnotekFound)">
NOT VBOXINNOTEK
</Condition>
<!-- *************************** Upgrade packages only ******************************* -->
<!-- Minimum and Maximum specify the range of versions we are supposed to update with this upgrade.
IncludeMaximum and IncludeMinimum specify whether the bound value is actually included in the range or not
(IncludeMaximum = yes meaning to find versions below or equal to the version specified in Maximum while
IncludeMaximum = no only finds those below the Maximum).
OnlyDetect tells the installer not to remove the previous product. This is useful as long as we
only change files in the package -->
<Upgrade Id="C4BAD770-BFE8-4D2C-A592-693028A7215B"> <!-- Upgrade of Sun xVM VirtualBox >= v1.6.0 -->
<!-- Upgrade is flagged if current-install is newer than or equal to package - TODO: should make a dialog appear asking user to confirm downgrade -->
<!-- Setting "OnlyDetect" to "no" makes the installer uninstall an already newer installed version -->
<UpgradeVersion Property="NEWERVERSIONDETECTED" Minimum="$(var.Property_Version)" OnlyDetect="no" />
<!-- Flag is set if the install will trigger an upgrade of an existing install -->
<UpgradeVersion Property="PREVIOUSVERSIONSINSTALLED" Minimum="1.0.0.0" Maximum="$(var.Property_Version)" IncludeMaximum="yes" />
</Upgrade>
<!-- The product's icon table -->
<Icon Id="IconVirtualBox" SourceFile="$(env.VBOX_WINDOWS_ICON_FILE)" />
<!-- The media/binary IDs -->
<Media Id="1" Cabinet="product.cab" EmbedCab="yes" />
<?if $(env.VBOX_WITH_COMBINED_PACKAGE) = "yes" ?>
<Media Id="2" Cabinet="common.cab" EmbedCab="no" CompressionLevel="high" />
<?endif ?>
<Binary Id="VBoxInstallHelper" SourceFile="$(env.PATH_OUT)\bin\VBoxInstallHelper.dll" />
<!-- Custom actions -->
<!-- Figure out where a previous installation was, if any -->
<?if $(env.BUILD_TARGET_ARCH) = "amd64" ?>
<CustomAction Id="ca_OriginalTargetDir" Execute="firstSequence" Property="INSTALLDIR"
Value="[ProgramFiles64Folder]\$(env.VBOX_VENDOR_SHORT)\VirtualBox" />
<Property Id="EXISTINGINSTALLDIR" Secure="yes">
<RegistrySearch Id="RegistryGetInstallPath" Root="HKLM" Key="$(var.Property_RegKey)" Name="InstallDir"
Type="raw" Win64="$(var.Property_Win64)"/>
</Property>
<CustomAction Id="ca_DefaultTargetDir" Execute="firstSequence" Property="INSTALLDIR" Value="[EXISTINGINSTALLDIR]" />
<?else ?>
<CustomAction Id="ca_OriginalTargetDir" Execute="firstSequence" Property="INSTALLDIR"
Value="[ProgramFilesFolder]\$(env.VBOX_VENDOR_SHORT)\VirtualBox" />
<Property Id="EXISTINGINSTALLDIR" Secure="yes">
<RegistrySearch Id="RegistryGetInstallPath" Root="HKLM" Key="$(var.Property_RegKey)" Name="InstallDir"
Type="raw" Win64="$(var.Property_Win64)"/>
</Property>
<CustomAction Id="ca_DefaultTargetDir" Execute="firstSequence" Property="INSTALLDIR" Value="[EXISTINGINSTALLDIR]" />
<?endif ?>
<CustomAction Id="ca_UninstallTAPInstances" BinaryKey="VBoxInstallHelper"
DllEntry="UninstallTAPInstances" Execute="deferred" Return="check" Impersonate="no"/>
<!-- Detect old Sun installation -->
<!-- Force a manual uninstall of an already installed Sun VirtualBox version first -->
<!--<Property Id="VBOXSUN">
<RegistrySearch Id="RegSearchSunVersion" Root="HKLM" Key="SOFTWARE\Sun\VirtualBox" Name="Version" Type="raw" Win64="$(var.Property_Win64)"/>
</Property>
<Condition Message="!(loc.SunFound)">
NOT VBOXSUN
</Condition>-->
<CustomAction Id="ca_StartVBox" Directory="INSTALLDIR" ExeCommand="[INSTALLDIR]\VirtualBox.exe" Return="asyncNoWait" Impersonate="yes" />
<CustomAction Id="ca_CheckSerial" BinaryKey="VBoxInstallHelper" DllEntry="CheckSerial" Impersonate="no"/>
<CustomAction Id="ca_InstallBranding" BinaryKey="VBoxInstallHelper" DllEntry="InstallBranding" Execute="deferred" Return="check" Impersonate="no"/>
<CustomAction Id="ca_InstallBrandingArgs" Property="ca_InstallBranding" Value="[INSTALLDIR]" Execute="immediate"/>
<CustomAction Id="ca_UninstallBranding" BinaryKey="VBoxInstallHelper" DllEntry="UninstallBranding" Execute="deferred" Return="check" Impersonate="no"/>
<CustomAction Id="ca_UninstallBrandingArgs" Property="ca_UninstallBranding" Value="[INSTALLDIR]" Execute="immediate"/>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.Property_ProgramFiles)" Name="PFiles">
<Directory Id="INSTALLDIR" Name="$(env.VBOX_PRODUCT)">
<Merge Id="msm_VBoxApp" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeApp)" DiskId="1" />
<Directory Id="dir_Drivers" Name="drivers">
<Directory Id="dir_USB" Name="USB">
<Merge Id="msm_VBoxUSB" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeUSB)" DiskId="1" />
</Directory>
<Directory Id="dir_Network" Name="network">
<?if $(env.VBOX_WITH_NETFLT) = "yes" ?>
<Directory Id="dir_NetFlt" Name="netflt">
<Merge Id="msm_VBoxNetworkFlt" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeNetworkFlt)" DiskId="1" />
</Directory>
<?endif ?>
<Directory Id="dir_NetAdp" Name="netadp">
<Merge Id="msm_VBoxNetworkAdp" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergeNetworkAdp)" DiskId="1" />
</Directory>
</Directory>
</Directory>
<?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
<Directory Id="dir_SDK" Name="sdk">
<Directory Id="dir_SDKInstall" Name="install">
<Merge Id="msm_VBoxPython" Language="!(loc.LANG)" SourceFile="$(var.Property_VBoxMergePython)" DiskId="1" />
</Directory>
</Directory>
<?endif ?>
<!-- Set up special directory IDs for referencing to the start menu
or the Quick Launch bar.
See: http://msdn.microsoft.com/en-us/library/aa368276.aspx
http://wix.mindcapers.com/wiki/Shortcuts_in_WiX -->
<Directory Id="ProgramMenuFolder">
<Directory Id="dir_StartMenuVBox" Name="$(env.VBOX_PRODUCT)"/>
</Directory>
<Directory Id="DesktopFolder" Name="Desktop"/>
<Directory Id="AppDataFolder" Name="AppData">
<Directory Id="dir_AppDataMicrosoft" Name="Microsoft">
<Directory Id="dir_AppDataMSIE" Name="Internet Explorer">
<Directory Id="dir_QuicklaunchFolder" Name="Quick Launch"/>
</Directory>
</Directory>
</Directory>
<!-- Shortcut(s) in start menu -->
<Component Id="cp_StartMenuVBox" Guid="C2DC321A-CE63-40EE-8A98-724DF8BD12FB" Win64="$(var.Property_Win64)">
<Shortcut Id="sc_StartMenuVBox" Directory="dir_StartMenuVBox" Name="$(env.VBOX_PRODUCT)" Description="$(env.VBOX_PRODUCT)"
Target="[INSTALLDIR]VirtualBox.exe" WorkingDirectory="INSTALLDIR"/>
<RegistryValue Root="HKCU" Key="$(var.Property_RegKeyInstall)"
Type="string" Value="installed" KeyPath="yes" />
<?include $(env.PATH_TARGET)\Shortcuts_StartMenu.wxi ?>
</Component>
<Component Id="cp_DesktopShortcut" Guid="668F8A1A-F5CE-48B3-BB1A-3042EE27B279" Win64="$(var.Property_Win64)">
<Condition>VBOX_INSTALLDESKTOPSHORTCUT</Condition>
<Shortcut Id="sc_DesktopVBox" Directory="DesktopFolder" Name="$(env.VBOX_PRODUCT)" Description="$(env.VBOX_PRODUCT)"
Target="[INSTALLDIR]VirtualBox.exe" WorkingDirectory="INSTALLDIR"/>
<RegistryValue Root="HKCU" Key="$(var.Property_RegKeyInstall)" Type="string"
Value="installed" KeyPath="yes" />
</Component>
<Component Id="cp_QuickLaunchVBox" Guid="CC19E026-938A-41CB-8E77-3F33296244B6" Win64="$(var.Property_Win64)">
<CreateFolder/>
<Condition>VBOX_INSTALLQUICKLAUNCHSHORTCUT</Condition>
<Shortcut Id="sc_QuickLaunchVBox" Directory="dir_QuicklaunchFolder" Name="$(env.VBOX_PRODUCT)" Description="$(env.VBOX_PRODUCT)"
Target="[INSTALLDIR]VirtualBox.exe" WorkingDirectory="INSTALLDIR"/>
<RegistryValue Root="HKCU" Key="$(var.Property_RegKeyInstall)"
Type="string" Value="installed" KeyPath="yes" />
</Component>
</Directory>
</Directory>
</Directory> <!-- TARGETDIR -->
<!-- Note: Feature IDs *must not* be renamed to use any prefixes or such,
otherwise this will break manual selection using the ADDLOCAL= syntax
when using the command line / scripts (see VBox manual). -->
<Feature Id="VBoxApplication" Title="VirtualBox Application" Level="1"
Description="!(loc.VB_App)"
ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand"
Absent="disallow" AllowAdvertise="no" >
<MergeRef Id="msm_VBoxApp" />
<ComponentRef Id="cp_StartMenuVBox" />
<ComponentRef Id="cp_DesktopShortcut" />
<ComponentRef Id="cp_QuickLaunchVBox" />
<Feature Id="VBoxUSB" Title="VirtualBox USB Support" Level="1"
Description="!(loc.VB_USBDriver)"
ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand"
Absent="allow" AllowAdvertise="no" >
<MergeRef Id="msm_VBoxUSB" />
</Feature>
<?if $(env.VBOX_WITH_NETFLT) = "yes" ?>
<Feature Id="VBoxNetwork" Title="VirtualBox Networking" Level="1"
Description="!(loc.VB_Network)"
ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand"
Absent="allow" AllowAdvertise="no" >
<Feature Id="VBoxNetworkFlt" Title="VirtualBox Bridged Networking" Level="1"
Description="!(loc.VB_NetFltDriver)"
ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand"
Absent="allow" AllowAdvertise="no" >
<MergeRef Id="msm_VBoxNetworkFlt" />
</Feature>
<Feature Id="VBoxNetworkAdp" Title="VirtualBox Host-Only Networking" Level="1"
Description="!(loc.VB_NetAdpDriver)"
ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand"
Absent="allow" AllowAdvertise="no" >
<MergeRef Id="msm_VBoxNetworkAdp" />
</Feature>
</Feature>
<?endif?>
<?if $(env.VBOX_WITH_PYTHON) = "yes" ?>
<Feature Id="VBoxPython" Title="VirtualBox Python 2.x Support" Level="1"
Description="!(loc.VB_Python)"
ConfigurableDirectory="INSTALLDIR" TypicalDefault="install" Display="expand"
Absent="allow" AllowAdvertise="no" >
<MergeRef Id="msm_VBoxPython" />
</Feature>
<?endif?>
</Feature>
<!-- Include user interface definition -->
<?include UserInterface.wxi ?>
<InstallExecuteSequence>
<!--
To debug the action sequences, do: "msiexec /i <VBox.msi> /lar <Logfile>"
InstallUISequence (client side) is:
AppSearch
LaunchConditions
ValidateProductID
CostInitialize
FileCost
CostFinalize
ExecuteAction -> will pass control over to "InstallExecuteSequence"
The first six actions above will be repeated but skipped on the server
side if already run on the client side.
InstallExecuteSequence (server side) is:
<First six action from InstallUISequence>
.
InstallInitialize
.
InstallFinalize
The actions between InstallInitialize and InstallFinalize will be gone through twice:
- The first time the installer creates an installation script containing all actions in the right
sequence which need to get executed in a batch later. At this point the launch conditions for
custom actions must be met already!
- The second time the generated installation script will be run as-is.
Also, the InstallUISequence and InstallExecuteSequence tables run in different sessions which
need public properties (that is, UPPERCASE properties).
-->
<!-- AppSearch must be done before "RemoveExistingProducts" and before "FindRelatedProducts" -->
<AppSearch Sequence="1"></AppSearch>
<LaunchConditions Sequence="2" />
<!-- First install the new version and then remove the old version. This is more efficient -->
<RemoveExistingProducts Sequence="3" />
<InstallValidate Sequence="4" />
<Custom Action="ca_OriginalTargetDir" After="FileCost"><![CDATA[(NOT INSTALLDIR) AND (NOT EXISTINGINSTALLDIR)]]></Custom>
<Custom Action="ca_DefaultTargetDir" Before="FileCost" ><![CDATA[NOT Installed AND (NOT INSTALLDIR) AND EXISTINGINSTALLDIR]]></Custom>
<Custom Action="ca_UninstallTAPInstances" Before="InstallFiles" >1</Custom>
<Custom Action="ca_InstallBrandingArgs" Before="ca_InstallBranding" ><![CDATA[NOT REMOVE]]></Custom>
<Custom Action="ca_InstallBranding" Before="InstallFinalize" ><![CDATA[NOT REMOVE]]></Custom>
<!-- Uninstall branding on complete uninstall, not on update -->
<Custom Action="ca_UninstallBrandingArgs" Before="ca_UninstallBranding" ><![CDATA[(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")]]></Custom>
<Custom Action="ca_UninstallBranding" Before="InstallFinalize" ><![CDATA[(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")]]></Custom>
</InstallExecuteSequence>
</Product>
</Wix>