VirtualBox

Changeset 7611 in vbox for trunk


Ignore:
Timestamp:
Mar 27, 2008 11:06:44 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
29111
Message:

Main/FE/Qt: Use "GUI/Qt3" or "gui" session type to start Qt3 GUI and "GUI/Qt4" to start Qt4 GUI (supercedes r29094 and r29096).

Location:
trunk/src/VBox
Files:
3 edited

Legend:

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

    r7594 r7611  
    929929#endif
    930930
    931 #if defined (Q_WS_MAC) /* Avoid Lanuch Services confusing this with the selector by using a helper app. */
    932     env += "\nVBOXGUIPATH=../Resources/VirtualBoxVM.app/Contents/MacOS/VirtualBoxVM";
    933 #elif defined (Q_WS_WIN)
    934     env += "\nVBOXGUIPATH=VirtualBox.exe";
    935 #else
    936     env += "\nVBOXGUIPATH=VirtualBox";
    937 #endif
    938 
    939     CProgress progress = vbox.OpenRemoteSession (session, id, "gui", env);
     931    CProgress progress = vbox.OpenRemoteSession (session, id, "GUI/Qt3", env);
    940932    if (!vbox.isOk())
    941933    {
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp

    r7594 r7611  
    543543
    544544    mVMCtxtMenu = new QMenu (this);
    545     mVMCtxtMenu->addAction (vmConfigAction); 
     545    mVMCtxtMenu->addAction (vmConfigAction);
    546546    mVMCtxtMenu->addAction (vmDeleteAction);
    547547    mVMCtxtMenu->addSeparator();
     
    933933#endif
    934934
    935 #if defined (Q_WS_MAC) /* Avoid Lanuch Services confusing this with the selector by using a helper app. */
    936     env += "\nVBOXGUIPATH=../Resources/VirtualBoxVM.app/Contents/MacOS/VirtualBoxVM4";
    937 #elif defined (Q_WS_WIN)
    938     env += "\nVBOXGUIPATH=VirtualBox4.exe";
    939 #else
    940     env += "\nVBOXGUIPATH=VirtualBox4";
    941 #endif
    942 
    943     CProgress progress = vbox.OpenRemoteSession (session, id, "gui", env);
     935    CProgress progress = vbox.OpenRemoteSession (session, id, "GUI/Qt4", env);
    944936    if (!vbox.isOk())
    945937    {
  • trunk/src/VBox/Main/MachineImpl.cpp

    r7596 r7611  
    16301630    if (id.isEmpty() || aBus == StorageBus_Null)
    16311631        return E_INVALIDARG;
    1632  
     1632
    16331633    AutoCaller autoCaller (this);
    16341634    CheckComRCReturnRC (autoCaller.rc());
     
    18001800    if (aBus == StorageBus_Null)
    18011801        return E_INVALIDARG;
    1802  
     1802
    18031803    AutoCaller autoCaller (this);
    18041804    CheckComRCReturnRC (autoCaller.rc());
     
    31593159
    31603160    Bstr type (aType);
    3161     if (type == "gui")
    3162     {
    3163         char *VirtualBox_exe = (char *) RTMemAlloc (sz);
    3164         size_t cchActual;
    3165         vrc = RTEnvGetEx (env, "VBOXGUIPATH", VirtualBox_exe, sz, &cchActual);
    3166         AssertRCBreak (vrc, RTStrFree (VirtualBox_exe));
     3161    if (type == "gui" || type == "GUI/Qt3")
     3162    {
     3163#ifdef RT_OS_DARWIN /* Avoid Lanuch Services confusing this with the selector by using a helper app. */
     3164        const char VirtualBox_exe[] = "../Resources/VirtualBoxVM.app/Contents/MacOS/VirtualBoxVM";
     3165#else
     3166        const char VirtualBox_exe[] = "VirtualBox" HOSTSUFF_EXE;
     3167#endif
     3168        Assert (sz >= sizeof (VirtualBox_exe));
    31673169        strcpy (cmd, VirtualBox_exe);
    31683170
     
    31753177#endif
    31763178        vrc = RTProcCreate (path, args, env, 0, &pid);
    3177         RTStrFree (VirtualBox_exe);
     3179    }
     3180    else
     3181    if (type == "GUI/Qt4")
     3182    {
     3183#ifdef RT_OS_DARWIN /* Avoid Lanuch Services confusing this with the selector by using a helper app. */
     3184        const char VirtualBox_exe[] = "../Resources/VirtualBoxVM.app/Contents/MacOS/VirtualBoxVM4";
     3185#else
     3186        const char VirtualBox_exe[] = "VirtualBox4" HOSTSUFF_EXE;
     3187#endif
     3188        Assert (sz >= sizeof (VirtualBox_exe));
     3189        strcpy (cmd, VirtualBox_exe);
     3190
     3191        Utf8Str idStr = mData->mUuid.toString();
     3192#ifdef RT_OS_WINDOWS /** @todo drop this once the RTProcCreate bug has been fixed */
     3193        const char * args[] = {path, "-startvm", idStr, 0 };
     3194#else
     3195        Utf8Str name = mUserData->mName;
     3196        const char * args[] = {path, "-comment", name, "-startvm", idStr, 0 };
     3197#endif
     3198        vrc = RTProcCreate (path, args, env, 0, &pid);
    31783199    }
    31793200    else
     
    71427163    if (mIPCSem < 0 && error == ENOSYS)
    71437164    {
    7144         setError(E_FAIL, 
     7165        setError(E_FAIL,
    71457166                tr ("Cannot create IPC semaphore. Most likely your host kernel lacks "
    71467167                     "support for SysV IPC. Check the host kernel configuration for "
Note: See TracChangeset for help on using the changeset viewer.

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