VirtualBox

Changeset 108038 in vbox


Ignore:
Timestamp:
Feb 3, 2025 5:41:45 PM (3 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167311
Message:

Windows/Installer: Also check the host's architecture when starting the .msi installer directly (i.e. w/o VBoxStub), to prevent installing on incompatible host architectures. Needs NLS updates. bugref:10849

Location:
trunk/src/VBox/Installer/win
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/win/InstallHelper/VBoxInstallHelper.cpp

    r107995 r108038  
    15811581
    15821582/**
    1583  * Returns the platform architecture as a string.
     1583 * Returns the host's platform architecture as a string.
    15841584 *
    15851585 * Sets public property VBOX_PLATFORM_ARCH to "x86", "amd64" or "arm64" on success.
    15861586 * Called from the MSI installer as custom action.
     1587 *
     1588 * We need this in order to distinguish the installer's build
     1589 * architecture from the current host architecture. Also,
     1590 * this deliberately is kept as a public property, so that it
     1591 * can be overriden for testing purposes.
    15871592 *
    15881593 * @returns UINT as Windows error code.
     
    15901595 * @param   hModule             Windows installer module handle.
    15911596 *
    1592  * @note    We don't use WIX' util.QueryNativeMachine, as it's apparently on available on Windows 10 >= 1709.
     1597 * @note    We don't use WIX' util.QueryNativeMachine, as it's apparently not available on Windows 10 >= 1709.
    15931598 */
    15941599UINT __stdcall GetPlatformArchitecture(MSIHANDLE hModule)
     
    15961601    const char *pszArch;
    15971602
    1598     /* Only add supported platforms here. */
     1603    /* Only add supported platforms here.
     1604     * Also, keep the string the same as kBuild's targets for easier comparrsion. */
    15991605    uint32_t const uNativeArch = RTSystemGetNativeArch();
    16001606    switch (uNativeArch)
     
    16121618        rc = VERR_NOT_SUPPORTED;
    16131619
    1614    logStringF(hModule, "GetPlatformArchitecture: Detected '%s' (%Rrc)", pszArch ? pszArch : "<Unknown>", rc);
     1620    if (RT_SUCCESS(rc))
     1621        logStringF(hModule, "GetPlatformArchitecture: Detected host architecture '%s'", pszArch);
     1622    else
     1623        logStringF(hModule, "GetPlatformArchitecture: Error detecting host architecture: %Rrc", rc);
    16151624
    16161625    return RT_SUCCESS(rc) ? ERROR_SUCCESS : ERROR_INSTALL_PLATFORM_UNSUPPORTED;
  • trunk/src/VBox/Installer/win/NLS/de_DE.wxl

    r107380 r108038  
    7171    <String Id="Only32Bit" Value="Diese Applikation läuft nur auf 32-bit Windows-Systemen. Bitte installieren Sie die 64-bit Version von [ProductName]!" />
    7272    <String Id="Only64Bit" Value="Diese Applikation läuft nur auf 64-bit Windows-Systemen. Bitte installieren Sie die 32-bit Version von [ProductName]!" />
     73        <String Id="WrongPlatformArch" Value="Diese Version von [ProductName] wurde für eine andere Plattform-Architektur entwickelt und kann daher nicht installiert werden. Bitte die passende Version für [ProductName] installieren!" />
    7374    <String Id="SunFound" Value="Eine alte Sun Version von VirtualBox wurde auf diesem Computer gefunden. Bitte deinstallieren Sie diese Version zuerst. Danach können Sie [ProductName] installieren!" />
    7475    <String Id="InnotekFound" Value="Eine alte innotek Version von VirtualBox wurde auf diesem Computer gefunden. Bitte deinstallieren Sie diese Version zuerst. Danach können Sie [ProductName] installieren!" />
  • trunk/src/VBox/Installer/win/NLS/en_US.wxl

    r107380 r108038  
    7070    <String Id="Only32Bit" Value="This application only runs on 32-bit Windows systems. Please install the 64-bit version of [ProductName]!" />
    7171    <String Id="Only64Bit" Value="This application only runs on 64-bit Windows systems. Please install the 32-bit version of [ProductName]!" />
    72     <String Id="SunFound" Value="An old Sun VirtualBox installation has been found on this machine. Please uninstall this package first and then install [ProductName]!" />
     72        <String Id="WrongPlatformArch" Value="This version of [ProductName] was developed for a different platform architecture and therefore cannot be installed. Please install a matching version of [ProductName]!" />
     73        <String Id="SunFound" Value="An old Sun VirtualBox installation has been found on this machine. Please uninstall this package first and then install [ProductName]!" />
    7374    <String Id="InnotekFound" Value="An old innotek VirtualBox installation has been found on this machine. Please uninstall this package first and then install [ProductName]!" />
    7475    <String Id="InvalidTargetDir" Value="Invalid installation directory specified! Please use another installation directory to install [ProductName]. Refer to the [ProductName] manual for more information." />
  • trunk/src/VBox/Installer/win/NLS/fa_IR.wxl

    r107380 r108038  
    6464    <String Id="Only32Bit" Value="این برنامه فقط روی ویندوز 32 بیتی اِجرا میشود. لطفا نسخه 64 بیتی [ProductName] را نصب کنید!" />
    6565    <String Id="Only64Bit" Value="این برنامه فقط روی ویندوز 64 بیتی اِجرا میشود. لطفا نسخه 32 بیتی [ProductName] را نصب کنید!" />
     66        <String Id="WrongPlatformArch" Value="This version of [ProductName] was developed for a different platform architecture and therefore cannot be installed. Please install a matching version of [ProductName]!" />
    6667    <String Id="SunFound" Value="یک نصب قدیمی ویرچوال باکس روی این رایانه یافت شد. لطفا اول این بسته را حذف سپس [ProductName] را نصب کنید!" />
    6768    <String Id="InnotekFound" Value="یک نسخه قدیمی نصب ویرچوال باکس در این ماشین یافت شد. لطفا اول این بسته را حذف و سپس [ProductName] را نصب کنید!" />
  • trunk/src/VBox/Installer/win/NLS/fr_FR.wxl

    r107380 r108038  
    7171    <String Id="Only32Bit" Value="Cette application ne marche que sur des systèmes Windows 32-bit. Veuillez installer la version 64-bit de [ProductName]!" />
    7272    <String Id="Only64Bit" Value="Cette application ne marche que sur des systèmes Windows 64-bit. Veuillez installer la version 32-bit de [ProductName]!" />
    73     <String Id="InnotekFound" Value="Vous avez une ancienne installation de innotek VirtualBox sur cette machine. Il vous faudra la désinstaller avant de pouvoir installer [ProductName]." />
     73        <String Id="WrongPlatformArch" Value="This version of [ProductName] was developed for a different platform architecture and therefore cannot be installed. Please install a matching version of [ProductName]!" />
     74        <String Id="InnotekFound" Value="Vous avez une ancienne installation de innotek VirtualBox sur cette machine. Il vous faudra la désinstaller avant de pouvoir installer [ProductName]." />
    7475    <String Id="InvalidTargetDir" Value="Invalid installation directory specified! Please use another installation directory to install [ProductName]. Refer to the [ProductName] manual for more information." />
    7576
  • trunk/src/VBox/Installer/win/NLS/it_IT.wxl

    r107380 r108038  
    6464    <String Id="Only32Bit" Value="Questa applicazione può essere eseguita solo su sistemi Windows a 32 bit. Installa la versione a 64 bit di [ProductName]!" />
    6565    <String Id="Only64Bit" Value="Questa applicazione può essere eseguita solo su sistemi Windows a 64 bit. Installa la versione a 32 bit di [ProductName]!" />
    66     <String Id="SunFound" Value="Una vecchia installazione di Sun VirtualBox è stata trovata su questa macchina. Disinstalla prima questo pacchetto e poi installa [ProductName]!" />
     66        <String Id="WrongPlatformArch" Value="This version of [ProductName] was developed for a different platform architecture and therefore cannot be installed. Please install a matching version of [ProductName]!" />
     67        <String Id="SunFound" Value="Una vecchia installazione di Sun VirtualBox è stata trovata su questa macchina. Disinstalla prima questo pacchetto e poi installa [ProductName]!" />
    6768    <String Id="InnotekFound" Value="Una vecchia installazione di innotek VirtualBox è stata trovata su questa macchina. Disinstalla prima questo pacchetto e poi installa [ProductName]!" />
    6869    <String Id="InvalidTargetDir" Value="Invalid installation directory specified! Please use another installation directory to install [ProductName]. Refer to the [ProductName] manual for more information." />
  • trunk/src/VBox/Installer/win/NLS/ru_RU.wxl

    r107380 r108038  
    7171    <String Id="Only32Bit" Value="This application only runs on 32-bit Windows systems. Please install the 64-bit version of [ProductName]!" />
    7272    <String Id="Only64Bit" Value="This application only runs on 64-bit Windows systems. Please install the 32-bit version of [ProductName]!" />
    73     <String Id="SunFound" Value="An old Sun VirtualBox installation has been found on this machine. Please uninstall this package first and then install [ProductName]!" />
     73        <String Id="WrongPlatformArch" Value="This version of [ProductName] was developed for a different platform architecture and therefore cannot be installed. Please install a matching version of [ProductName]!" />
     74        <String Id="SunFound" Value="An old Sun VirtualBox installation has been found on this machine. Please uninstall this package first and then install [ProductName]!" />
    7475    <String Id="InnotekFound" Value="An old innotek VirtualBox installation has been found on this machine. Please uninstall this package first and then install [ProductName]!" />
    7576    <String Id="InvalidTargetDir" Value="Invalid installation directory specified! Please use another installation directory to install [ProductName]. Refer to the [ProductName] manual for more information." />
  • trunk/src/VBox/Installer/win/NLS/tr_TR.wxl

    r107380 r108038  
    7171    <String Id="Only32Bit" Value="Bu uygulama yalnızca 32-bit Windows sistemlerinde çalışır. Lütfen [ProductName] 64-bit sürümünü yükleyin!" />
    7272    <String Id="Only64Bit" Value="Bu uygulama yalnızca 64-bit Windows sistemlerinde çalışır. Lütfen [ProductName] 32-bit sürümünü yükleyin!" />
    73     <String Id="SunFound" Value="Bu makinede eski bir Sun VirtualBox kurulumu bulundu. Lütfen önce bu paketi kaldırın ve sonra [ProductName] yükleyin!" />
     73        <String Id="WrongPlatformArch" Value="This version of [ProductName] was developed for a different platform architecture and therefore cannot be installed. Please install a matching version of [ProductName]!" />
     74        <String Id="SunFound" Value="Bu makinede eski bir Sun VirtualBox kurulumu bulundu. Lütfen önce bu paketi kaldırın ve sonra [ProductName] yükleyin!" />
    7475    <String Id="InnotekFound" Value="Bu makinede eski bir innotek VirtualBox kurulumu bulundu. Lütfen önce bu paketi kaldırın ve sonra [ProductName] yükleyin!" />
    7576    <String Id="InvalidTargetDir" Value="Invalid installation directory specified! Please use another installation directory to install [ProductName]. Refer to the [ProductName] manual for more information." />
  • trunk/src/VBox/Installer/win/NLS/zh_CN.wxl

    r107380 r108038  
    7171<String Id="Only32Bit" Value="此应用程序只能运行在 32 位 Windows 系统。 请安装 [ProductName] 的 64 位版本!" />
    7272<String Id="Only64Bit" Value="此应用程序只能运行在 64 位 Windows 系统。 请安装 [ProductName] 的 32 位版本!" />
     73<String Id="WrongPlatformArch" Value="This version of [ProductName] was developed for a different platform architecture and therefore cannot be installed. Please install a matching version of [ProductName]!" />
    7374<String Id="SunFound" Value="在此计算机发现旧的 Sun VirtualBox 安装。 请先卸载此组件然后安装 [ProductName]!" />
    7475<String Id="InnotekFound" Value="在此计算机发现旧的 innotek VirtualBox 安装。 请先卸载此组件然后安装 [ProductName]!" />
  • trunk/src/VBox/Installer/win/NLS/zh_TW.wxl

    r107380 r108038  
    7171    <String Id="Only32Bit" Value="此應用程式只能執行在 32 位元的 Windows 系統。 請安裝 [ProductName] 的 64 位元版本!" />
    7272    <String Id="Only64Bit" Value="此應用程式只能執行在 64 位元的 Windows 系統。 請安裝 [ProductName] 的 32 位元版本!" />
    73     <String Id="SunFound" Value="在此電腦發現舊的 Sun VirtualBox 安裝。 請先解除安裝此套件然後安裝 [ProductName]!" />
     73        <String Id="WrongPlatformArch" Value="This version of [ProductName] was developed for a different platform architecture and therefore cannot be installed. Please install a matching version of [ProductName]!" />
     74        <String Id="SunFound" Value="在此電腦發現舊的 Sun VirtualBox 安裝。 請先解除安裝此套件然後安裝 [ProductName]!" />
    7475    <String Id="InnotekFound" Value="在此電腦發現舊的 innotek VirtualBox 安裝。 請先解除安裝此套件然後安裝 [ProductName]!" />
    7576    <String Id="InvalidTargetDir" Value="Invalid installation directory specified! Please use another installation directory to install [ProductName]. Refer to the [ProductName] manual for more information." />
  • trunk/src/VBox/Installer/win/UserInterface.wxi

    r107941 r108038  
    11781178        <InstallUISequence>
    11791179
     1180            <Custom Action="ca_GetPlatformArchitecture" After="AppSearch"/>
    11801181<?if $(env.VBOX_WITH_CRT_PACKING) = "no" ?>
    11811182            <Custom Action="ca_IsMSCRTInstalled" After="AppSearch" />
  • trunk/src/VBox/Installer/win/VBoxMergeAppCA.wxi

    r107996 r108038  
    3939    <CustomAction Id="ca_VBoxSupDrvUninstArgModel" Property="VBoxDrvUninstModel" Value="VBoxSup*" Execute="immediate" />
    4040
     41    <CustomAction Id="ca_GetPlatformArchitecture" DllEntry="GetPlatformArchitecture" Execute="immediate" Return="check" Impersonate="no" BinaryRef="VBoxInstallHelper" />
    4142<?if $(env.VBOX_WITH_CRT_PACKING) = "no" ?>
    4243    <CustomAction Id="ca_IsMSCRTInstalled" DllEntry="IsMSCRTInstalled" Execute="immediate" Return="ignore" Impersonate="no" BinaryRef="VBoxInstallHelper" />
  • trunk/src/VBox/Installer/win/VBoxMergeAppSeq.wxi

    r107996 r108038  
    4242            Condition="NOT (UPGRADINGPRODUCTCODE) AND (Installed) AND (REMOVE=&quot;ALL&quot;)" />
    4343
     44    <Custom Action="ca_GetPlatformArchitecture" Before="LaunchConditions"/>
    4445<?if $(env.VBOX_WITH_CRT_PACKING) = "no" ?>
    4546    <Custom Action="ca_IsMSCRTInstalled" Before="LaunchConditions"/>
  • trunk/src/VBox/Installer/win/VirtualBox.wxs

    r107993 r108038  
    7272    <?include PublicProperties.wxi ?>
    7373
    74     <!-- Make doubly sure we're on 64-bit windows NT.
    75          Note! This is normally checked by  -->
     74    <!-- Only 64-bit Windows hosts are supported (x86_64 and ARM64).
     75         This is normally checked by VBoxStub, but we need to do this check here as well,
     76         in case the .msi gets started directly. -->
    7677    <Launch Condition="VersionNT64" Message="!(loc.Only64Bit)" />
     78
     79    <!-- Compare the current host's platform architecture with the installer's architecture (at build time). -->
     80    <Launch Condition="VBOX_PLATFORM_ARCH=&quot;$(env.KBUILD_TARGET_ARCH)&quot;" Message="!(loc.WrongPlatformArch)" />
    7781
    7882    <Launch Condition="Privileged" Message="!(loc.NeedAdmin)" />
Note: See TracChangeset for help on using the changeset viewer.

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