Permalink
Browse files

Add a new PCBSDVERSION #define, which will be set to the current PC-BSD

specific version number we are creating. This number may differ from the
FreeBSD base version when we roll updated ISOs or quarterly package
updates. I.E. 10.0.1
  • Loading branch information...
1 parent 2aba8c5 commit 695798ba548ce0797cbc66f2d43c7e695965bd1c @kmoore134 kmoore134 committed Mar 11, 2014
@@ -23,6 +23,7 @@
***************************************************************************/
#include "mainwindow.h"
#include "ui_mainwindow.h"
+#include "../config.h"
#include <QProcess>
#include <QStringList>
@@ -85,12 +86,16 @@ MainWindow::MainWindow(QWidget *parent) :
}
// pcbsd version
- Ver = pcbsd::Utils::runShellCommand("uname -r").at(0);
- ui->VersionLabel->setText(Ver+" ("+Arch+")");
+ ui->VersionLabel->setText(PCBSDVERSION);
+
+ // Utils version
+ ui->UtilsLabel->setText(pcbsd::Utils::runShellCommand("pkg query '%v' pcbsd-utils-qt4").at(0).section("'", 1, 1));
QString PkgSet = pcbsd::Utils::getValFromPCBSDConf("PACKAGE_SET");
+ PkgSet="PRODUCTION";
if (PkgSet.toUpper().trimmed() == "EDGE")
{
+ PkgSet="EDGE";
PkgSet+=QString(" ") + tr("(unstable)");
}
ui->PkgSetLabel->setText(PkgSet);
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>293</width>
- <height>423</height>
+ <width>320</width>
+ <height>496</height>
</rect>
</property>
<property name="windowTitle">
@@ -17,8 +17,8 @@
<iconset resource="about-gui.qrc">
<normaloff>:/about.png</normaloff>:/about.png</iconset>
</property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<spacer name="horizontalSpacer_11">
@@ -67,7 +67,7 @@
</item>
</layout>
</item>
- <item>
+ <item row="1" column="0" rowspan="2" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<spacer name="horizontalSpacer_3">
@@ -121,64 +121,7 @@
</item>
</layout>
</item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_8">
- <item>
- <spacer name="horizontalSpacer_13">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QLabel" name="label_7">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- <underline>false</underline>
- </font>
- </property>
- <property name="text">
- <string>Package set:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="PkgSetLabel">
- <property name="font">
- <font>
- <weight>50</weight>
- <bold>false</bold>
- </font>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_14">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
+ <item row="5" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<spacer name="horizontalSpacer_7">
@@ -231,7 +174,7 @@
</item>
</layout>
</item>
- <item>
+ <item row="6" column="0" colspan="2">
<widget class="QStackedWidget" name="MainStack">
<property name="currentIndex">
<number>0</number>
@@ -616,7 +559,64 @@
</widget>
</widget>
</item>
- <item>
+ <item row="4" column="0" colspan="2">
+ <layout class="QHBoxLayout" name="horizontalLayout_8">
+ <item>
+ <spacer name="horizontalSpacer_13">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_7">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ <underline>false</underline>
+ </font>
+ </property>
+ <property name="text">
+ <string>Package set:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="PkgSetLabel">
+ <property name="font">
+ <font>
+ <weight>50</weight>
+ <bold>false</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_14">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="7" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<spacer name="horizontalSpacer_9">
@@ -653,6 +653,60 @@
</item>
</layout>
</item>
+ <item row="3" column="0" colspan="2">
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <spacer name="horizontalSpacer_16">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="label_9">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ <underline>false</underline>
+ </font>
+ </property>
+ <property name="text">
+ <string>Utils:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLabel" name="UtilsLabel">
+ <property name="text">
+ <string>&lt;Unknown&gt;</string>
+ </property>
+ <property name="textInteractionFlags">
+ <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <spacer name="horizontalSpacer_17">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
View
@@ -24,4 +24,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+// Set the PC-BSD specific version string for our utils
+#define PCBSDVERSION QString("10.0.1")
+
+// Set the LOCALBASE
#define PREFIX QString("/usr/local")
@@ -7,12 +7,14 @@
#include <QGraphicsPixmapItem>
#include "backend.h"
+#include "../config.h"
#include "installer.h"
#include "helpText.h"
Installer::Installer(QWidget *parent) : QMainWindow(parent)
{
setupUi(this);
+ labelVersion->setText(tr("Version:") + " " + PCBSDVERSION);
translator = new QTranslator();
haveWarnedSpace=false;
force4K = false;
Oops, something went wrong.

2 comments on commit 695798b

@yurkis
Contributor
yurkis commented on 695798b Mar 11, 2014

Kris, maybe using separate text file somewere under /usr/local/share/pcbsd/ will be best solution.
With your solution 'about' script can't show update number for example.
Another poroposal is for numbering:
10.0 Update 1 (10.0U1) -or- 10.0 Edge (10.0E). For Edge package set third number is not make sense.
For stable:
10 Update 1 (or 10-STABLE-Update1) -or- 10-STABLE-Edge

@pcbsd-commit-bot
Contributor
Please sign in to comment.