[PC-BSD Commits] r17760 - pcbsd/current/src-qt4/pc-installgui
svn at pcbsd.org
svn at pcbsd.org
Mon Jul 16 08:05:15 PDT 2012
Author: kris
Date: 2012-07-16 15:05:15 +0000 (Mon, 16 Jul 2012)
New Revision: 17760
Modified:
pcbsd/current/src-qt4/pc-installgui/installer.cpp
pcbsd/current/src-qt4/pc-installgui/installer.h
Log:
Get the system arch type during installation
Modified: pcbsd/current/src-qt4/pc-installgui/installer.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-installgui/installer.cpp 2012-07-16 14:52:39 UTC (rev 17759)
+++ pcbsd/current/src-qt4/pc-installgui/installer.cpp 2012-07-16 15:05:15 UTC (rev 17760)
@@ -32,6 +32,8 @@
keyModels = Scripts::Backend::keyModels();
keyLayouts = Scripts::Backend::keyLayouts();
+ // Set the arch name
+ setArch();
// Start on the first screen
installStackWidget->setCurrentIndex(0);
@@ -48,6 +50,20 @@
return false;
}
+void Installer::setArch()
+{
+ QProcess m;
+ m.start(QString("uname"), QStringList() << "-m");
+ while(m.state() == QProcess::Starting || m.state() == QProcess::Running) {
+ m.waitForFinished(200);
+ QCoreApplication::processEvents();
+ }
+
+ // Get output
+ Arch = m.readLine().simplified();
+ qDebug() << Arch;
+}
+
void Installer::slotCheckHardware()
{
pcHardware = new dialogCheckHardware();
Modified: pcbsd/current/src-qt4/pc-installgui/installer.h
===================================================================
--- pcbsd/current/src-qt4/pc-installgui/installer.h 2012-07-16 14:52:39 UTC (rev 17759)
+++ pcbsd/current/src-qt4/pc-installgui/installer.h 2012-07-16 15:05:15 UTC (rev 17760)
@@ -68,6 +68,7 @@
private:
+ void setArch();
void startInstall(); // Function which begins the install process
void installFailed(); // Function which does post-install failure stuff
@@ -118,6 +119,7 @@
QList<QStringList> listComponents; // QStringList for our available components
QStringList languages;
QStringList updatePartitions;
+ QString Arch;
QProcess *installProc;
bool installFoundCounter;
bool installFoundMetaCounter;
More information about the Commits
mailing list