VirtualBox

Ignore:
Timestamp:
Nov 22, 2024 2:22:42 AM (3 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
166066
Message:

FE/Qt,VBoxManage,VBoxHeadless: Refuse to run in WoW64 to prevent mixing up amd64 and arm64 builds in the out directory. jiraref:VBP-1466

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/main.cpp

    r106350 r107100  
    4949
    5050/* Other VBox includes: */
     51#include <iprt/arch.h>
    5152#include <iprt/buildconfig.h>
    5253#include <iprt/stream.h>
     54#include <iprt/system.h>
    5355#include <VBox/err.h>
    5456#include <VBox/version.h>
     
    554556#endif /* VBOX_WS_NIX */
    555557
     558        /* Make sure we're not running inside an emulator (these days,
     559         * running amd64 code in an emulator on arm64). */
     560        uint32_t const uNativeArch = RTSystemGetNativeArch();
     561        if (uNativeArch != RT_ARCH_VAL && uNativeArch != 0)
     562        {
     563            QString strMsg = QApplication::tr("This VirtualBox application was built for a different CPU architecture (<b>%1</b>) than the host (<b>%2</b>). Please reinstall.")
     564                                              .arg(RTArchValToString(RT_ARCH_VAL))
     565                                              .arg(RTArchValToString(uNativeArch));
     566            QMessageBox::critical(0, QApplication::tr("Mismatching CPU Architecture"),
     567                                  strMsg, QMessageBox::Abort, QMessageBox::NoButton);
     568            break;
     569        }
     570
    556571        /* Create modal-window manager: */
    557572        UIModalWindowManager::create();
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