[PC-BSD Commits] r7423 - pcbsd/current/SysInstaller
svn at pcbsd.org
svn at pcbsd.org
Mon Aug 23 12:11:08 PDT 2010
Author: kris
Date: 2010-08-23 12:11:07 -0700 (Mon, 23 Aug 2010)
New Revision: 7423
Modified:
pcbsd/current/SysInstaller/SysInstaller.pro
pcbsd/current/SysInstaller/backend.cpp
pcbsd/current/SysInstaller/backend.h
pcbsd/current/SysInstaller/main.cpp
pcbsd/current/SysInstaller/sysinstaller.cpp
pcbsd/current/SysInstaller/sysinstaller.h
pcbsd/current/SysInstaller/sysinstaller.ui
Log:
Started adding framework for selecting the package meta set we wish to install, like KDE / Gnome / XFCE4 to the GUI installer
Modified: pcbsd/current/SysInstaller/SysInstaller.pro
===================================================================
--- pcbsd/current/SysInstaller/SysInstaller.pro 2010-08-23 16:41:14 UTC (rev 7422)
+++ pcbsd/current/SysInstaller/SysInstaller.pro 2010-08-23 19:11:07 UTC (rev 7423)
@@ -4,8 +4,8 @@
QT += network \
xml \
dbus
-TARGET = SysInstaller
-DESTDIR=/usr/PCBSD/SysInstaller/bin
+TARGET = pc-sysinstaller
+DESTDIR=/usr/local/bin
TEMPLATE = app
SOURCES += main.cpp \
sys-componentwidget.cpp \
@@ -87,8 +87,8 @@
i18n/SysInstaller_zh_TW.ts \
i18n/SysInstaller_zu.ts
-dotrans.path=/usr/PCBSD/SysInstaller/i18n/
-dotrans.extra=cd i18n && lrelease-qt4 *.ts && cp *.qm /usr/PCBSD/SysInstaller/i18n/
+dotrans.path=/usr/local/share/pcbsd/i18n/
+dotrans.extra=cd i18n && lrelease-qt4 *.ts && cp *.qm /usr/local/share/pcbsd/i18n/
INSTALLS += dotrans
Modified: pcbsd/current/SysInstaller/backend.cpp
===================================================================
--- pcbsd/current/SysInstaller/backend.cpp 2010-08-23 16:41:14 UTC (rev 7422)
+++ pcbsd/current/SysInstaller/backend.cpp 2010-08-23 19:11:07 UTC (rev 7423)
@@ -287,6 +287,13 @@
kbp.waitForFinished();
}
+// Function which checks for our GUI package schema data, and sets found if its located
+QStringList Backend::getPackageData(bool &found)
+{
+ found=false;
+ return QStringList();
+}
+
QList<QStringList> Backend::availComponents()
{
QList<QStringList> components;
Modified: pcbsd/current/SysInstaller/backend.h
===================================================================
--- pcbsd/current/SysInstaller/backend.h 2010-08-23 16:41:14 UTC (rev 7422)
+++ pcbsd/current/SysInstaller/backend.h 2010-08-23 19:11:07 UTC (rev 7423)
@@ -58,6 +58,7 @@
static int systemMemory();
static int deleteMBRPart(QString Slice, QString &output);
static int addMBRPart(QString Disk, int size, QString &output);
+ static QStringList getPackageData(bool &found);
//static QList<QStringList> slices();
};
Modified: pcbsd/current/SysInstaller/main.cpp
===================================================================
--- pcbsd/current/SysInstaller/main.cpp 2010-08-23 16:41:14 UTC (rev 7422)
+++ pcbsd/current/SysInstaller/main.cpp 2010-08-23 19:11:07 UTC (rev 7423)
@@ -20,9 +20,9 @@
// Check what directory our app is in
QString appDir;
- if ( QFile::exists("/usr/PCBSD/SysInstaller/bin/SysInstaller") )
+ if ( QFile::exists("/usr/local/bin/pc-sysinstaller") )
{
- appDir = "/usr/PCBSD/SysInstaller";
+ appDir = "/usr/local/share/pcbsd";
} else {
appDir = QCoreApplication::applicationDirPath();
}
Modified: pcbsd/current/SysInstaller/sysinstaller.cpp
===================================================================
--- pcbsd/current/SysInstaller/sysinstaller.cpp 2010-08-23 16:41:14 UTC (rev 7422)
+++ pcbsd/current/SysInstaller/sysinstaller.cpp 2010-08-23 19:11:07 UTC (rev 7423)
@@ -33,7 +33,7 @@
steps.append(Step(tr("System"), path + "install.png", tr("Select installation type") ) );
steps.append(Step(tr("Disk"), path + "slices.png", tr("Disk setup") ) );
steps.append(Step(tr("Users"), path + "add_user.png", tr("User Creation") ) );
- steps.append(Step(tr("Time"), path + "timezone.png", tr("Date & Time") ) );
+ steps.append(Step(tr("Desktop"), path + "install.png", tr("Desktop") ) );
steps.append(Step(tr("Components"), path + "components.png", tr("Optional components") ) );
steps.append(Step(tr("Summary"), path + "systemsettings.png", tr("Pre-Install Summary") ) );
steps.append(Step(tr("Installation"), path + "pcbsd.png", tr("Installation Progress") ) );
@@ -86,7 +86,6 @@
void SysInstaller::initAnteInstall()
{
-
// load languages
comboLanguage->clear();
languages = Scripts::Backend::languages();
@@ -97,6 +96,9 @@
}
connect(comboLanguage, SIGNAL(currentIndexChanged(QString)), this, SLOT(slotChangeLanguage()));
+ // Load any package scheme data
+ Scripts::Backend::getPackageData(availPackageData);
+
// Load up the keyboard information
connectKeyboardSlots();
@@ -288,6 +290,15 @@
if ( stackWidget->currentIndex() == 4 && ! checkUserAccountInfo() )
return;
+ // If this install medium doesn't contain package information
+ if ( stackWidget->currentIndex() == 4 && ! availPackageData ) {
+ QString ss = labels.at(4)->styleSheet();
+ labels.at(4)->setStyleSheet("color: rgb(255, 255, 255);");
+ labels.at(6)->setStyleSheet(ss);
+ setCurrentIndex(6);
+ return;
+ }
+
// Check if we are doing FreeBSD install and hide a checkbox
if ( stackWidget->currentIndex() == 3 \
&& radioInstallFreeBSD->isChecked() \
@@ -353,6 +364,16 @@
return;
}
+ // If this install medium doesn't contain package information
+
+ if ( stackWidget->currentIndex() == 6 && ! availPackageData ) {
+ QString ss = labels.at(6)->styleSheet();
+ labels.at(6)->setStyleSheet("color: rgb(255, 255, 255);");
+ labels.at(4)->setStyleSheet(ss);
+ setCurrentIndex(4);
+ return;
+ }
+
proceed(false);
}
@@ -414,8 +435,6 @@
// Installing FreeBSD
// Hide the language prune option
- checkPruneLangs->setChecked(false);
- checkPruneLangs->setHidden(true);
refreshComponents();
// Populate our shell selection
@@ -426,7 +445,6 @@
} else {
// Installing PC-BSD
- checkPruneLangs->setHidden(false);
refreshComponents();
// Populate our shell selection
@@ -614,10 +632,6 @@
tmpList << "localizeLang=" + lang;
}
- // Seeif we need to prune other l10n files
- if (checkPruneLangs->isChecked() && ! radioRestore->isChecked() )
- tmpList << "localizePrune=yes";
-
// If we are doing an upgrade, put disk info for selected drive
if ( radioUpgrade->isChecked() )
{
Modified: pcbsd/current/SysInstaller/sysinstaller.h
===================================================================
--- pcbsd/current/SysInstaller/sysinstaller.h 2010-08-23 16:41:14 UTC (rev 7422)
+++ pcbsd/current/SysInstaller/sysinstaller.h 2010-08-23 19:11:07 UTC (rev 7423)
@@ -177,6 +177,7 @@
bool installFoundCounter;
bool installFoundFetchOutput;
QString fetchDownloadFile;
+ bool availPackageData;
};
Modified: pcbsd/current/SysInstaller/sysinstaller.ui
===================================================================
--- pcbsd/current/SysInstaller/sysinstaller.ui 2010-08-23 16:41:14 UTC (rev 7422)
+++ pcbsd/current/SysInstaller/sysinstaller.ui 2010-08-23 19:11:07 UTC (rev 7423)
@@ -996,7 +996,7 @@
</palette>
</property>
<property name="currentIndex">
- <number>3</number>
+ <number>0</number>
</property>
<widget class="QWidget" name="aiStep0">
<property name="palette">
@@ -1703,6 +1703,100 @@
</spacer>
</item>
<item row="3" column="0" colspan="3">
+ <layout class="QHBoxLayout" name="horizontalLayout_12">
+ <item>
+ <spacer name="horizontalSpacer_42">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>88</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_4">
+ <property name="font">
+ <font>
+ <pointsize>10</pointsize>
+ <weight>50</weight>
+ <bold>false</bold>
+ </font>
+ </property>
+ <property name="title">
+ <string/>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_11">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_10">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Local TimeZone</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QComboBox" name="comboBoxTimezone"/>
+ </item>
+ <item row="2" column="0">
+ <widget class="QCheckBox" name="checkTimeSync">
+ <property name="font">
+ <font/>
+ </property>
+ <property name="text">
+ <string>Automatic synchronization with Internet Time Servers (NTP)</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <spacer name="verticalSpacer_8">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>80</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_43">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>68</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="4" column="0" colspan="3">
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<widget class="QLabel" name="label_2">
@@ -8670,63 +8764,6 @@
</property>
</spacer>
</item>
- <item row="1" column="1">
- <widget class="QGroupBox" name="groupBox_4">
- <property name="font">
- <font>
- <pointsize>10</pointsize>
- </font>
- </property>
- <property name="title">
- <string>Timezone Settings</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_11">
- <item row="0" column="0">
- <widget class="QLabel" name="label_10">
- <property name="text">
- <string>Local TimeZone</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QComboBox" name="comboBoxTimezone"/>
- </item>
- <item row="2" column="0">
- <widget class="QCheckBox" name="checkTimeSync">
- <property name="font">
- <font/>
- </property>
- <property name="text">
- <string>Automatic synchronization with Internet Time Servers (NTP)</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QCheckBox" name="checkPruneLangs">
- <property name="text">
- <string>Remove all other language support files</string>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <spacer name="verticalSpacer_8">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>80</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- </item>
<item row="2" column="1">
<spacer name="verticalSpacer_11">
<property name="orientation">
@@ -8740,6 +8777,13 @@
</property>
</spacer>
</item>
+ <item row="1" column="1">
+ <widget class="QGroupBox" name="groupBox_7">
+ <property name="title">
+ <string>Package Set Configuration</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
<widget class="QWidget" name="aiStep6">
@@ -9451,8 +9495,6 @@
<tabstop>listKbVariants</tabstop>
<tabstop>radioInstall</tabstop>
<tabstop>lineKbTest</tabstop>
- <tabstop>comboBoxTimezone</tabstop>
- <tabstop>checkTimeSync</tabstop>
<tabstop>listAvailComponents</tabstop>
<tabstop>pushComAdd</tabstop>
<tabstop>pushComDel</tabstop>
More information about the Commits
mailing list