Ticket #3639: wined3d.diff
| File wined3d.diff, 6.1 KB (added by , 15 years ago) |
|---|
-
src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h
Copyright (c) 2009 Robert Millan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
private slots: 208 208 void devicesSwitchVrdp (bool); 209 209 void devicesOpenSFDialog(); 210 210 void devicesInstallGuestAdditions(); 211 void devicesInstallWineD3D(); 211 212 212 213 void prepareFloppyMenu(); 213 214 void prepareDVDMenu(); … … private: 282 283 QAction *mDevicesSwitchVrdpAction; 283 284 QAction *mDevicesSFDialogAction; 284 285 QAction *mDevicesInstallGuestToolsAction; 286 QAction *mDevicesInstallWineD3DAction; 285 287 286 288 #ifdef VBOX_WITH_DEBUGGER_GUI 287 289 /* Debugger actions */ -
src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
VBoxConsoleWnd (VBoxConsoleWnd **aSelf, 379 379 VBoxGlobal::iconSet (":/guesttools_16px.png", 380 380 ":/guesttools_disabled_16px.png")); 381 381 382 mDevicesInstallWineD3DAction = new QAction (mRunningActions); 383 mDevicesInstallWineD3DAction->setIcon (VBoxGlobal::iconSet (":/guesttools_16px.png", 384 ":/guesttools_disabled_16px.png")); 385 382 386 #ifdef VBOX_WITH_DEBUGGER_GUI 383 387 if (vboxGlobal().isDebuggerEnabled()) 384 388 { … … VBoxConsoleWnd (VBoxConsoleWnd **aSelf, 476 480 mDevicesVRDPMenuSeparator = mDevicesMenu->addSeparator(); 477 481 478 482 mDevicesMenu->addAction (mDevicesInstallGuestToolsAction); 483 mDevicesMenu->addAction (mDevicesInstallWineD3DAction); 479 484 480 485 /* reset the "context menu" flag */ 481 486 mDevicesMountFloppyMenu->menuAction()->setData (false); … … VBoxConsoleWnd (VBoxConsoleWnd **aSelf, 635 640 connect (mDevicesSwitchVrdpAction, SIGNAL(toggled (bool)), this, SLOT(devicesSwitchVrdp (bool))); 636 641 connect (mDevicesSFDialogAction, SIGNAL(triggered()), this, SLOT(devicesOpenSFDialog())); 637 642 connect (mDevicesInstallGuestToolsAction, SIGNAL(triggered()), this, SLOT(devicesInstallGuestAdditions())); 643 connect (mDevicesInstallWineD3DAction, SIGNAL(triggered()), this, SLOT(devicesInstallWineD3D())); 638 644 639 645 640 646 connect (mDevicesMountFloppyMenu, SIGNAL(aboutToShow()), this, SLOT(prepareFloppyMenu())); … … void VBoxConsoleWnd::retranslateUi() 1710 1716 mDevicesInstallGuestToolsAction->setStatusTip ( 1711 1717 tr ("Mount the Guest Additions installation image")); 1712 1718 1719 mDevicesInstallWineD3DAction->setText (tr ("Install &WineD3D (for Direct3D)...")); 1720 mDevicesInstallWineD3DAction->setStatusTip ( 1721 tr ("Mount the WineD3D installation image. WineD3D provides Direct3D functionality on Windows guests.")); 1722 1713 1723 #ifdef VBOX_WITH_DEBUGGER_GUI 1714 1724 /* Debug actions */ 1715 1725 … … void VBoxConsoleWnd::devicesInstallGuest 2883 2893 } 2884 2894 } 2885 2895 2896 /* Based on devicesInstallGuestAdditions() */ 2897 void VBoxConsoleWnd::devicesInstallWineD3D() 2898 { 2899 #if defined (DEBUG_dmik) /* subscribe yourself here if you care for this behavior. */ 2900 QString src1 = qApp->applicationDirPath() + "/../../release/bin/wined3d.iso"; 2901 QString src2 = qApp->applicationDirPath() + "/../../release/bin/additions/wined3d.iso"; 2902 #else 2903 char szAppPrivPath [RTPATH_MAX]; 2904 int rc = RTPathAppPrivateNoArch (szAppPrivPath, sizeof (szAppPrivPath)); 2905 AssertRC (rc); 2906 2907 QString src1 = QString (szAppPrivPath) + "/wined3d.iso"; 2908 QString src2 = qApp->applicationDirPath() + "/additions/wined3d.iso"; 2909 #endif 2910 2911 /* Check the standard image locations */ 2912 if (QFile::exists (src1)) 2913 return installGuestAdditionsFrom (src1); 2914 else if (QFile::exists (src2)) 2915 return installGuestAdditionsFrom (src2); 2916 2917 /* Check for the already registered image */ 2918 CVirtualBox vbox = vboxGlobal().virtualBox(); 2919 QString name = QString ("wined3d.iso"); 2920 2921 CDVDImage2Vector vec = vbox.GetDVDImages(); 2922 for (CDVDImage2Vector::ConstIterator it = vec.begin(); 2923 it != vec.end(); ++ it) 2924 { 2925 QString path = it->GetLocation(); 2926 /* Compare the name part ignoring the file case */ 2927 QString fn = QFileInfo (path).fileName(); 2928 if (RTPathCompare (name.toUtf8().constData(), fn.toUtf8().constData()) == 0) 2929 return installGuestAdditionsFrom (path); 2930 } 2931 2932 /* Download the required image */ 2933 { 2934 QString source = QString ("http://download.savannah.nongnu.org/releases/wined3d/latest/wined3d.iso"); 2935 QString target = QDir (vboxGlobal().virtualBox().GetHomeFolder()) 2936 .absoluteFilePath (name); 2937 2938 VBoxAdditionsDownloader *dl = 2939 new VBoxAdditionsDownloader (source, target, mDevicesInstallWineD3DAction); 2940 statusBar()->addWidget (dl, 0); 2941 dl->start(); 2942 } 2943 } 2944 2886 2945 void VBoxConsoleWnd::installGuestAdditionsFrom (const QString &aSource) 2887 2946 { 2888 2947 CVirtualBox vbox = vboxGlobal().virtualBox();

