Changeset 105833 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 22, 2024 8:15:17 PM (3 months ago)
- 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
r105584 r105833 742 742 } 743 743 744 bool UIWizardNewVM::isGuestOSTypeSupported(const QString &strGuestOSTypeId) const 745 { 746 if (strGuestOSTypeId.isEmpty()) 747 return true; 748 return gpGlobalSession->guestOSTypeManager().isGuestOSTypeIDSupported(strGuestOSTypeId); 749 } 750 744 751 void UIWizardNewVM::setDetectedWindowsImageNamesAndIndices(const QVector<QString> &names, const QVector<ulong> &ids) 745 752 { … … 801 808 if (!isUnattendedInstallSupported()) 802 809 return false; 810 if (!isGuestOSTypeSupported(detectedOSTypeId())) 811 return false; 803 812 return true; 804 813 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h
r105584 r105833 158 158 bool emptyDiskRecommended() const; 159 159 void setEmptyDiskRecommended(bool fEmptyDiskRecommended); 160 161 bool isGuestOSTypeSupported(const QString &strGuestOSTypeId) const; 160 162 161 163 void setDetectedWindowsImageNamesAndIndices(const QVector<QString> &names, const QVector<ulong> &ids); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMExpertPage.cpp
r105521 r105833 474 474 } 475 475 UIWizardNewVM *pWizard = wizardWindow<UIWizardNewVM>(); 476 if (pWizard && pWizard->installGuestAdditions() && m_pGAInstallationISOContainer) 477 m_pGAInstallationISOContainer->mark(); 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 } 478 483 if (isUnattendedEnabled()) 479 484 m_pAdditionalOptionsContainer->mark(); … … 631 636 } 632 637 } 633 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; 634 641 if (pWizard->diskSource() == SelectedDiskSource_Existing && gpMediumEnumerator->medium(m_pDiskSelector->id()).isNull()) 635 642 { … … 990 997 return; 991 998 } 992 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 } 993 1008 m_pSkipUnattendedCheckBox->setEnabled(UIWizardNewVMNameOSTypeCommon::checkISOFile(m_pNameAndSystemEditor)); 994 1009 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePage.cpp
r105642 r105833 353 353 bool UIWizardNewVMNameOSTypeCommon::guessOSTypeDetectedOSTypeString(UINameAndSystemEditor *pNameAndSystemEditor, QString strDetectedOSType) 354 354 { 355 if (!gpGlobalSession->guestOSTypeManager().isGuestOSTypeIDSupported(strDetectedOSType)) 356 return false; 355 357 AssertReturn(pNameAndSystemEditor, false); 356 358 if (!strDetectedOSType.isEmpty()) … … 520 522 if (m_pNameAndSystemEditor->name().isEmpty()) 521 523 return false; 524 UIWizardNewVM *pWizard = wizardWindow<UIWizardNewVM>(); 525 if (pWizard) 526 { 527 if (!pWizard->isGuestOSTypeSupported(pWizard->detectedOSTypeId())) 528 return false; 529 } 522 530 return UIWizardNewVMNameOSTypeCommon::checkISOFile(m_pNameAndSystemEditor); 523 531 } … … 590 598 * - Unattended cannot determine OS type from the ISO, 591 599 * - 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, 592 601 * - User has disabled unattended explicitly, 593 602 * - Unattended install will kick off. … … 607 616 .arg(UIWizardNewVM::tr("This OS type cannot be installed unattendedly. " 608 617 "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.")); 609 623 else if (pWizard->skipUnattendedInstall()) 610 624 strMessage = UIWizardNewVM::tr("You have selected to skip unattended guest OS install, " … … 767 781 UIWizardNewVM::tr("Invalid file path or unreadable file"), 768 782 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 } 769 789 } 770 790 } … … 784 804 return; 785 805 } 786 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 } 787 815 m_pSkipUnattendedCheckBox->setEnabled(UIWizardNewVMNameOSTypeCommon::checkISOFile(m_pNameAndSystemEditor)); 788 816 }
Note:
See TracChangeset
for help on using the changeset viewer.