[PC-BSD Commits] r2293 - pcbsd/trunk/PCInstall
svn at pcbsd.org
svn at pcbsd.org
Mon Jul 7 11:08:34 PDT 2008
Author: kris
Date: 2008-07-07 11:08:34 -0700 (Mon, 07 Jul 2008)
New Revision: 2293
Modified:
pcbsd/trunk/PCInstall/pcinstall.cpp
pcbsd/trunk/PCInstall/pcinstall.h
Log:
Added support to PCInstall for installing from a DVD instead of 2 or 3 CD's.
Modified: pcbsd/trunk/PCInstall/pcinstall.cpp
===================================================================
--- pcbsd/trunk/PCInstall/pcinstall.cpp 2008-07-07 17:41:51 UTC (rev 2292)
+++ pcbsd/trunk/PCInstall/pcinstall.cpp 2008-07-07 18:08:34 UTC (rev 2293)
@@ -27,6 +27,9 @@
// Set the variable to regenerate the custom slices
regenCustomSlices = 1;
+ // Default us to cd instead of DVD
+ usingDVDmedia = 0;
+
// Setup Translations
nextButton()->setText(tr("Next"));
backButton()->setText(tr("Back"));
@@ -1297,17 +1300,20 @@
{
if(MountCD->normalExit() && MountCD->exitStatus() == 0 )
{
+ // Check if we are using a DVD or a CD
+ QFile testDVD("/tmp/PCBSD-DVD");
+ if ( testDVD.exists() )
+ {
+ usingDVDmedia = 1;
+ } else {
+ usingDVDmedia = 0;
+ }
+
+ // Now start the install / update
if ( radioFreshInstall->isChecked() )
{
- // If we are using pre-configured RAID
- if (usingRAIDMirror == 1)
- {
- MountPartSlot();
- return;
- } else {
- // Start normal install
- startFreshInstall();
- }
+ // Start normal install
+ startFreshInstall();
} else {
startUpdateProcess();
}
@@ -1315,7 +1321,7 @@
} else {
- switch( QMessageBox::warning( this, tr("CD Mount Error"), tr("Error: Could not load the install CD. Please check that the CD is in the drive.\n Press OK to try again, or Cancel to reboot the system."), tr("OK"), tr("Cancel"), 0, 0, 1 ) ) {
+ switch( QMessageBox::warning( this, tr("CD Mount Error"), tr("Error: Could not load the install disc. Please check that the CD/DVD is in the drive.\n Press OK to try again, or Cancel to reboot the system."), tr("OK"), tr("Cancel"), 0, 0, 1 ) ) {
case 0: // The user clicked the OK again button or pressed Enter
startMountCD();
break;
@@ -1543,7 +1549,13 @@
tr("An error occured while extracting the system image! Please check the install CD, or try selecting 'Safe Mode' \nwhen the installation CD begins booting. The system will now reboot.") );
exit(1);
} else {
- slotStartMountCD2();
+ if ( usingDVDmedia == 0 )
+ {
+ slotStartMountCD2();
+ } else {
+ // Looks like we have a DVD, lets install from it now
+ slotInstallCD2();
+ }
}
}
@@ -3214,8 +3226,14 @@
// Check if we need to proceede to CD3 now and load the optional stuff
if ( installComponents == 1 )
{
- // Run the slot to install the components
- slotStartMountCD3();
+ if ( usingDVDmedia == 0 )
+ {
+ // Run the slot to install the components
+ slotStartMountCD3();
+ } else {
+ // Looks like we have a DVD, lets install from it now
+ slotRunInstallComponents();
+ }
} else {
// If no extra components, then lets finish up the install
if ( radioFreshInstall->isChecked() )
@@ -3303,8 +3321,23 @@
void PCInstall::slotFinishedMountCD3()
{
- // We are ready to install the optional components now
- slotRunInstallComponents();
+ // If the CD mounted successfully
+ if(findCD3proc->normalExit() && findCD3proc->exitStatus() == 0 )
+ {
+ // We are ready to install the optional components now
+ slotRunInstallComponents();
+ } else {
+
+ switch( QMessageBox::warning( this, tr("CD Mount Error"), tr("Error: Could not locate CD #3. Please check that the CD is in the drive. Press OK to try again, or Cancel to abort install."), tr("OK"), tr("Cancel"), 0, 0, 1 ) ) {
+ case 0: // The user clicked the OK again button or pressed Enter
+ slotStartMountCD3();
+ break;
+ case 1: // The user clicked the Quit or pressed Escape
+ exit(5);
+ return;
+ break;
+ }
+ }
}
Modified: pcbsd/trunk/PCInstall/pcinstall.h
===================================================================
--- pcbsd/trunk/PCInstall/pcinstall.h 2008-07-07 17:41:51 UTC (rev 2292)
+++ pcbsd/trunk/PCInstall/pcinstall.h 2008-07-07 18:08:34 UTC (rev 2293)
@@ -154,6 +154,7 @@
QString ComponentName[100];
QString ComponentDescr[100];
int ComponentSelected[100];
+ int usingDVDmedia;
Q3Process *InstallComponentsProc;
int installComponents;
int regenCustomSlices;
More information about the Commits
mailing list