[PC-BSD Commits] r8209 - pcbsd/current/src-qt4/pc-sysinstaller

svn at pcbsd.org svn at pcbsd.org
Tue Dec 14 09:30:57 PST 2010


Author: kris
Date: 2010-12-14 09:30:57 -0800 (Tue, 14 Dec 2010)
New Revision: 8209

Modified:
   pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp
   pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h
Log:

Fixed up system installer, don't display components page if no components are even on the install
media, and not doing network install. Also if using boot-cd only, only provide option to install
from network.



Modified: pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp	2010-12-14 16:34:29 UTC (rev 8208)
+++ pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp	2010-12-14 17:30:57 UTC (rev 8209)
@@ -110,15 +110,22 @@
     	hasPkgsOnMedia = true;
 
     // See if this media has a freebsd release on it
-    if ( QFile::exists("/tmp/no-fbsd-release") )
+    if ( QFile::exists("/tmp/no-fbsd-release") ) {
+	hasFreeBSDOnMedia = false;
 	radioInstallFreeBSD->setEnabled(false);
+    } else {
+	hasFreeBSDOnMedia = true;
+    }
 	
-
     // Do check for install pkgs on boot media
-    if ( QFile::exists("/tmp/no-install-pkgs") )
+    if ( QFile::exists("/tmp/no-install-pkgs") ) {
+        radioDVDUSBInstall->setChecked(false);
+        radioDVDUSBInstall->setEnabled(false);
+        radioNetworkInstall->setChecked(true);
     	hasInstallOnMedia = false;
-    else
+    } else {
     	hasInstallOnMedia = true;
+    }
 
     // Is this a LIVE disk?
     if ( QFile::exists("/usr/pcbsd-live") )
@@ -327,7 +334,7 @@
    }
 
 
-   // If the chosen disk is too small or partition is invalid, don't continue
+   // If the user data isnt correct 
    if ( stackWidget->currentIndex() == 4 && ! checkUserAccountInfo() )
       return;
 
@@ -336,8 +343,9 @@
         (stackWidget->currentIndex() == 4 && ! hasPkgsOnMedia && ! radioNetworkInstall->isChecked() ) ) {
        QString ss = labels.at(4)->styleSheet();
        labels.at(4)->setStyleSheet("color: rgb(255, 255, 255);");
-       labels.at(6)->setStyleSheet(ss);
-       setCurrentIndex(6);
+       labels.at(7)->setStyleSheet(ss);
+       startConfigGen(); 
+       setCurrentIndex(7);
        return;
    }
 
@@ -404,10 +412,10 @@
 
    // If this install medium doesn't contain package information
 
-   if ( (stackWidget->currentIndex() == 6 && ! availPackageData ) || \
-        (stackWidget->currentIndex() == 6 && ! hasPkgsOnMedia && ! radioNetworkInstall->isChecked() ) ) {
-       QString ss = labels.at(6)->styleSheet();
-       labels.at(6)->setStyleSheet("color: rgb(255, 255, 255);");
+   if ( (stackWidget->currentIndex() == 7 && ! availPackageData ) || \
+        (stackWidget->currentIndex() == 7 && ! hasPkgsOnMedia && ! radioNetworkInstall->isChecked() ) ) {
+       QString ss = labels.at(7)->styleSheet();
+       labels.at(7)->setStyleSheet("color: rgb(255, 255, 255);");
        labels.at(4)->setStyleSheet(ss);
        setCurrentIndex(4);
        return;
@@ -520,8 +528,14 @@
   if ( radioDVDUSBInstall->isChecked())
   {
     stackedWidgetNetOptions->setCurrentIndex(1);
+    if ( ! hasFreeBSDOnMedia ) {
+      radioInstallPCBSD->setChecked(true);
+      radioInstallFreeBSD->setChecked(false);
+      radioInstallFreeBSD->setEnabled(false);
+    }
   } else {
     stackedWidgetNetOptions->setCurrentIndex(0);
+    radioInstallFreeBSD->setEnabled(true);
   }
 }
 

Modified: pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h	2010-12-14 16:34:29 UTC (rev 8208)
+++ pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h	2010-12-14 17:30:57 UTC (rev 8209)
@@ -203,6 +203,7 @@
     bool isLiveMode;
     bool hasPkgsOnMedia;
     bool hasInstallOnMedia;
+    bool hasFreeBSDOnMedia;
     QList<QStringList> listDeskPkgs; // QStringList for our available desktop pkgs
 
     // Help Stuff



More information about the Commits mailing list