SVN: PLDLiveInstaller/trunk: PLDLiveInstaller.cpp PLDLiveInstaller.h

shadzik shadzik at pld-linux.org
Thu Jan 13 15:28:10 CET 2011


Author: shadzik
Date: Thu Jan 13 15:28:10 2011
New Revision: 12039

Modified:
   PLDLiveInstaller/trunk/PLDLiveInstaller.cpp
   PLDLiveInstaller/trunk/PLDLiveInstaller.h
Log:
- add void createPartitionTable(QString)
- TODO: add it to installation() procedure and set default partitions etc.


Modified: PLDLiveInstaller/trunk/PLDLiveInstaller.cpp
==============================================================================
--- PLDLiveInstaller/trunk/PLDLiveInstaller.cpp	(original)
+++ PLDLiveInstaller/trunk/PLDLiveInstaller.cpp	Thu Jan 13 15:28:10 2011
@@ -159,6 +159,25 @@
   dd->deleteLater();
 }
 
+void PLDLiveInstaller::createPartitionTable(QString device)
+{
+  qDebug() << "Creating default Partition Table scheme on" << device;
+  QApplication::processEvents(QEventLoop::ExcludeUserInputEvents,-1);
+  installationText->setText("<html><p align=\"left\">"
+  "Creating default partition table scheme"
+  "</p></html>");
+  QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
+  QStringList args;
+  args.append("-q -uM");
+  args.append(device);
+  args.append("< /usr/share/pldliveinstaller/default.table");
+  QProcess * sfdisk = new QProcess(this);
+  sfdisk->start("sfdisk", args);
+  sfdisk->waitForFinished();
+  updateProgressBar();
+  sfdisk->deleteLater();
+}
+
 void PLDLiveInstaller::isRootPartitionSelected(int pos)
 {
   qDebug() << "rootPart Position: " << pos;
@@ -331,7 +350,7 @@
     text->setFixedHeight(40);
     
     entireDisk = new QRadioButton;
-    entireDisk->setText("Erase and use entire disk (**IMPLEMENT ME!!**)");
+    entireDisk->setText("Erase and use entire disk (2GB swap, rest Linux)");
     entireDisk->setChecked(true);
     
     notEntireDisk = new QRadioButton;

Modified: PLDLiveInstaller/trunk/PLDLiveInstaller.h
==============================================================================
--- PLDLiveInstaller/trunk/PLDLiveInstaller.h	(original)
+++ PLDLiveInstaller/trunk/PLDLiveInstaller.h	Thu Jan 13 15:28:10 2011
@@ -74,6 +74,7 @@
     qlonglong curSizeArray[256];
     void rereadPartitionTable(QString device);
     void destroyPartitionTable(QString device);
+    void createPartitionTable(QString device);
     
 public:
     PLDLiveInstaller( QWidget * parent = 0 );


More information about the pld-cvs-commit mailing list