VirtualBox

Changeset 76622 in vbox


Ignore:
Timestamp:
Jan 3, 2019 3:41:31 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
127926
Message:

FE/Qt: Fixed creating VM shortcuts when using VBOX_GUI_WITH_SHARED_LIBRARY (VirtualBoxVM).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/platform
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/platform/UIDesktopServices.h

    r76581 r76622  
    2525#include <QUuid>
    2626
     27#ifdef VBOX_GUI_WITH_SHARED_LIBRARY
     28/** Name of the executable (image) used to start VMs. */
     29# define VBOX_GUI_VMRUNNER_IMAGE "VirtualBoxVM"
     30#endif
     31
    2732/* Qt forward declarations */
    2833class QString;
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/platform/win/UIDesktopServices_win.cpp

    r76606 r76622  
    3232    IShellLink *pShl = NULL;
    3333    IPersistFile *pPPF = NULL;
    34     QString strVBox = QDir::toNativeSeparators(QCoreApplication::applicationFilePath());
     34#ifdef VBOX_GUI_WITH_SHARED_LIBRARY
     35    QString strVBox = QDir::toNativeSeparators(QCoreApplication::applicationDirPath() + "/" + VBOX_GUI_VMRUNNER_IMAGE);
     36
     37#else
     38    QString strVBox = QDir::toNativeSeparatorsgg (QCoreApplication::applicationFilePath());
     39#endif
    3540    QFileInfo fi(strVBox);
    3641    QString strVBoxDir = QDir::toNativeSeparators(fi.absolutePath());
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/UIDesktopServices_x11.cpp

    r76606 r76622  
    3333    if (link.open(QFile::WriteOnly | QFile::Truncate))
    3434    {
     35#ifdef VBOX_GUI_WITH_SHARED_LIBRARY
     36        QString strVBox = QDir::toNativeSeparators(QCoreApplication::applicationDirPath() + "/" + VBOX_GUI_VMRUNNER_IMAGE);
     37#else
     38        QString strVBox = QDir::toNativeSeparators(QCoreApplication::applicationFilePath());
     39#endif
    3540        QTextStream out(&link);
    3641        out.setCodec("UTF-8");
     
    4247            << "Comment=Starts the VirtualBox machine " << strName << endl
    4348            << "Type=Application" << endl
    44             << "Exec=" << QCoreApplication::applicationFilePath() << " --comment \"" << strName << "\" --startvm \"" << uUuid.toString() << "\"" << endl
     49            << "Exec=" << strVBox << " --comment \"" << strName << "\" --startvm \"" << uUuid.toString() << "\"" << endl
    4550            << "Icon=virtualbox-vbox.png" << endl;
    4651        /* This would be a real file link entry, but then we could also simply
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