Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Add a new PCBSDVERSION #define, which will be set to the current PC-BSD
Browse files Browse the repository at this point in the history
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
Kris Moore committed Mar 11, 2014
1 parent 2aba8c5 commit 695798b
Show file tree
Hide file tree
Showing 5 changed files with 193 additions and 115 deletions.
9 changes: 7 additions & 2 deletions src-qt4/about-gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
***************************************************************************/
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "../config.h"

#include <QProcess>
#include <QStringList>
Expand Down Expand Up @@ -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);
Expand Down
184 changes: 119 additions & 65 deletions src-qt4/about-gui/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand All @@ -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">
Expand Down Expand Up @@ -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">
Expand Down Expand Up @@ -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">
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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">
Expand Down Expand Up @@ -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"/>
Expand Down
4 changes: 4 additions & 0 deletions src-qt4/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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")
2 changes: 2 additions & 0 deletions src-qt4/pc-installgui/installer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading

2 comments on commit 695798b

@yurkis
Copy link
Contributor

@yurkis yurkis commented on 695798b Mar 11, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

@pcbsd-commit-bot pcbsd-commit-bot commented on 695798b Mar 11, 2014 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.