VirtualBox

Changeset 73192 in vbox


Ignore:
Timestamp:
Jul 17, 2018 8:24:51 PM (7 years ago)
Author:
vboxsync
Message:

Fe/Qt: Don't look for the --startvm and --separate option in the non-VM runner process, just initialize IPRT without trying to initalize SUPLIB.

File:
1 edited

Legend:

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

    r73191 r73192  
    606606}
    607607
    608 #if !defined(VBOX_WITH_HARDENING) || defined(VBOX_GUI_WITH_SHARED_LIBRARY) && !defined(VBOX_RUNTIME_UI)
     608#if !defined(VBOX_WITH_HARDENING) || (defined(VBOX_GUI_WITH_SHARED_LIBRARY) && !defined(VBOX_RUNTIME_UI))
    609609
    610610int main(int argc, char **argv, char **envp)
     
    616616# endif /* VBOX_WS_X11 */
    617617
    618     /* Initialize VBox Runtime.
    619      * Initialize the SUPLib as well only if we are really about to start a VM.
     618    /*
     619     * Initialize VBox Runtime.
     620     */
     621# if !defined(VBOX_GUI_WITH_SHARED_LIBRARY) || defined(VBOX_RUNTIME_UI)
     622    /* Initialize the SUPLib as well only if we are really about to start a VM.
    620623     * Don't do this if we are only starting the selector window or a separate VM process. */
    621624    bool fStartVM = false;
     
    628631        if (   !::strcmp(argv[i], "--startvm")
    629632            || !::strcmp(argv[i], "-startvm"))
    630         {
    631633            fStartVM = true;
    632         }
    633634        else if (   !::strcmp(argv[i], "--separate")
    634635                 || !::strcmp(argv[i], "-separate"))
    635         {
    636636            fSeparateProcess = true;
    637         }
    638637    }
    639638
    640639    uint32_t fFlags = fStartVM && !fSeparateProcess ? RTR3INIT_FLAGS_SUPLIB : 0;
    641 
     640#else
     641    uint32_t fFlags = 0;
     642#endif
    642643    int rc = RTR3InitExe(argc, &argv, fFlags);
    643644
     
    652653# ifdef Q_OS_SOLARIS
    653654        a.setStyle("fusion");
    654 # endif /* Q_OS_SOLARIS */
     655# endif
    655656
    656657        /* Prepare the error-message: */
     
    664665# ifdef RT_OS_LINUX
    665666                strText += g_QStrHintLinuxNoDriver;
    666 # else /* RT_OS_LINUX */
     667# else
    667668                strText += g_QStrHintOtherNoDriver;
    668 # endif /* !RT_OS_LINUX */
     669# endif
    669670                break;
    670671# ifdef RT_OS_LINUX
     
    672673                strText += g_QStrHintLinuxNoMemory;
    673674                break;
    674 # endif /* RT_OS_LINUX */
     675# endif
    675676            case VERR_VM_DRIVER_NOT_ACCESSIBLE:
    676677                strText += QApplication::tr("Kernel driver not accessible");
     
    679680# ifdef RT_OS_LINUX
    680681                strText += g_QStrHintLinuxWrongDriverVersion;
    681 # else /* RT_OS_LINUX */
     682# else
    682683                strText += g_QStrHintOtherWrongDriverVersion;
    683 # endif /* !RT_OS_LINUX */
     684# endif
    684685                break;
    685686            default:
     
    697698    }
    698699
    699     /* Actual main function: */
     700    /*
     701     * Call actual main function:
     702     */
    700703    return TrustedMain(argc, argv, envp);
    701704}
    702705
    703 #endif
     706#endif /* !VBOX_WITH_HARDENING || (VBOX_GUI_WITH_SHARED_LIBRARY && !VBOX_RUNTIME_UI) */
    704707
    705708#ifdef VBOX_WITH_HARDENING
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