Changeset 105851 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Aug 23, 2024 4:31:38 PM (6 months ago)
- svn:sync-xref-src-repo-rev:
- 164570
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
r105833 r105851 742 742 } 743 743 744 bool UIWizardNewVM::isGuestOSTypeSupported(const QString &strGuestOSTypeId) const745 {746 if (strGuestOSTypeId.isEmpty())747 return true;748 return gpGlobalSession->guestOSTypeManager().isGuestOSTypeIDSupported(strGuestOSTypeId);749 }750 751 744 void UIWizardNewVM::setDetectedWindowsImageNamesAndIndices(const QVector<QString> &names, const QVector<ulong> &ids) 752 745 { … … 808 801 if (!isUnattendedInstallSupported()) 809 802 return false; 810 if (!isGuestOSTypeSupported(detectedOSTypeId()))811 return false;812 803 return true; 813 804 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h
r105833 r105851 158 158 bool emptyDiskRecommended() const; 159 159 void setEmptyDiskRecommended(bool fEmptyDiskRecommended); 160 161 bool isGuestOSTypeSupported(const QString &strGuestOSTypeId) const;162 160 163 161 void setDetectedWindowsImageNamesAndIndices(const QVector<QString> &names, const QVector<ulong> &ids); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMExpertPage.cpp
r105833 r105851 474 474 } 475 475 UIWizardNewVM *pWizard = wizardWindow<UIWizardNewVM>(); 476 if (pWizard) 477 { 478 if (!pWizard->isGuestOSTypeSupported(pWizard->detectedOSTypeId())) 479 m_pNameAndSystemEditor->markImageEditor(true, UIWizardNewVM::tr("ISO file is for an unsupported guest OS type"), ""); 480 if (pWizard->installGuestAdditions() && m_pGAInstallationISOContainer) 481 m_pGAInstallationISOContainer->mark(); 482 } 476 if (pWizard && pWizard->installGuestAdditions() && m_pGAInstallationISOContainer) 477 m_pGAInstallationISOContainer->mark(); 483 478 if (isUnattendedEnabled()) 484 479 m_pAdditionalOptionsContainer->mark(); … … 636 631 } 637 632 } 638 /* Don't allow VM creation if detect OS type id (from selected ISO) is unsupported: */ 639 if (!pWizard->isGuestOSTypeSupported(pWizard->detectedOSTypeId())) 640 fIsComplete = false; 633 641 634 if (pWizard->diskSource() == SelectedDiskSource_Existing && gpMediumEnumerator->medium(m_pDiskSelector->id()).isNull()) 642 635 { … … 997 990 return; 998 991 } 999 UIWizardNewVM *pWizard = wizardWindow<UIWizardNewVM>(); 1000 if (pWizard) 1001 { 1002 if (!pWizard->isGuestOSTypeSupported(pWizard->detectedOSTypeId())) 1003 { 1004 m_pSkipUnattendedCheckBox->setEnabled(false); 1005 return; 1006 } 1007 } 992 1008 993 m_pSkipUnattendedCheckBox->setEnabled(UIWizardNewVMNameOSTypeCommon::checkISOFile(m_pNameAndSystemEditor)); 1009 994 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePage.cpp
r105833 r105851 353 353 bool UIWizardNewVMNameOSTypeCommon::guessOSTypeDetectedOSTypeString(UINameAndSystemEditor *pNameAndSystemEditor, QString strDetectedOSType) 354 354 { 355 if (!gpGlobalSession->guestOSTypeManager().isGuestOSTypeIDSupported(strDetectedOSType))356 return false;357 355 AssertReturn(pNameAndSystemEditor, false); 358 356 if (!strDetectedOSType.isEmpty()) … … 522 520 if (m_pNameAndSystemEditor->name().isEmpty()) 523 521 return false; 524 UIWizardNewVM *pWizard = wizardWindow<UIWizardNewVM>();525 if (pWizard)526 {527 if (!pWizard->isGuestOSTypeSupported(pWizard->detectedOSTypeId()))528 return false;529 }530 522 return UIWizardNewVMNameOSTypeCommon::checkISOFile(m_pNameAndSystemEditor); 531 523 } … … 598 590 * - Unattended cannot determine OS type from the ISO, 599 591 * - Unattended can determine the OS type from the ISO but cannot install it, 600 * - Unattended detects OS type from ISO but this OS type arch. is not supported, page validation will fail,601 592 * - User has disabled unattended explicitly, 602 593 * - Unattended install will kick off. … … 616 607 .arg(UIWizardNewVM::tr("This OS type cannot be installed unattendedly. " 617 608 "The install needs to be started manually.")); 618 else if (!pWizard->isGuestOSTypeSupported(pWizard->detectedOSTypeId()))619 strMessage = UIWizardNewVM::tr("Detected OS type: %1. %2")620 .arg(strType)621 .arg(UIWizardNewVM::tr("This OS type is not supported by your host. "622 "You need to either deselect ISO image or pick another one to continue."));623 609 else if (pWizard->skipUnattendedInstall()) 624 610 strMessage = UIWizardNewVM::tr("You have selected to skip unattended guest OS install, " … … 781 767 UIWizardNewVM::tr("Invalid file path or unreadable file"), 782 768 UIWizardNewVM::tr("File path is valid")); 783 UIWizardNewVM *pWizard = wizardWindow<UIWizardNewVM>();784 if (pWizard)785 {786 if (!pWizard->isGuestOSTypeSupported(pWizard->detectedOSTypeId()))787 m_pNameAndSystemEditor->markImageEditor(true, UIWizardNewVM::tr("ISO file is for an unsupported guest OS type"), "");788 }789 769 } 790 770 } … … 804 784 return; 805 785 } 806 UIWizardNewVM *pWizard = wizardWindow<UIWizardNewVM>(); 807 if (pWizard) 808 { 809 if (!pWizard->isGuestOSTypeSupported(pWizard->detectedOSTypeId())) 810 { 811 m_pSkipUnattendedCheckBox->setEnabled(false); 812 return; 813 } 814 } 786 815 787 m_pSkipUnattendedCheckBox->setEnabled(UIWizardNewVMNameOSTypeCommon::checkISOFile(m_pNameAndSystemEditor)); 816 788 }
Note:
See TracChangeset
for help on using the changeset viewer.