Skip to content

Commit

Permalink
App: adopt "standard" version number(major.minor.patch)
Browse files Browse the repository at this point in the history
  • Loading branch information
HuguesDelorme committed Dec 11, 2023
1 parent 0a233f1 commit 4b92d85
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
9 changes: 9 additions & 0 deletions src/app/command_system_information.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "app_module.h"
#include "qstring_conv.h"
#include "qtwidgets_utils.h"
#include "version.h"
#include "../base/meta_enum.h"
#include "../base/filepath.h"
#include "../base/io_system.h"
Expand Down Expand Up @@ -218,6 +219,14 @@ QString CommandSystemInformation::data()
QString strSysInfo;
QTextStream ostr(&strSysInfo);

// Mayo version
ostr << '\n'
<< "Mayo: v" << strVersion
<< " commit:" << strVersionCommitId
<< " revnum:" << versionRevisionNumber
<< " " << QT_POINTER_SIZE * 8 << "bit"
<< '\n';

// OS version
ostr << '\n' << "OS: " << QSysInfo::prettyProductName()
<< " [" << QSysInfo::kernelType() << " version " << QSysInfo::kernelVersion() << "]" << '\n'
Expand Down
5 changes: 4 additions & 1 deletion src/app/dialog_about.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ DialogAbout::DialogAbout(QWidget* parent)
tr("%1 By %2").arg(QApplication::applicationName(), QApplication::organizationName())
);

m_ui->label_Version->setText(m_ui->label_Version->text().arg(strVersion).arg(QT_POINTER_SIZE * 8));
const QString strVersionFull =
QString("%1 commit:%2 revnum:%3")
.arg(strVersion).arg(strVersionCommitId).arg(versionRevisionNumber);
m_ui->label_Version->setText(m_ui->label_Version->text().arg(strVersionFull).arg(QT_POINTER_SIZE * 8));
m_ui->label_BuildDateTime->setText(m_ui->label_BuildDateTime->text().arg(__DATE__, __TIME__));
m_ui->label_Qt->setText(m_ui->label_Qt->text().arg(QT_VERSION_STR));
m_ui->label_Occ->setText(m_ui->label_Occ->text().arg(OCC_VERSION_COMPLETE));
Expand Down
4 changes: 2 additions & 2 deletions version.pri
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ defined(HAVE_GIT, var) {
MAYO_VERSION_MAJ = 0
MAYO_VERSION_MIN = 8
MAYO_VERSION_PAT = 0
VERSION = $${MAYO_VERSION_MAJ}.$${MAYO_VERSION_MIN}.$${MAYO_VERSION_PAT}.$${MAYO_VERSION_REVNUM}
MAYO_VERSION = $${VERSION}-$$MAYO_VERSION_COMMIT
VERSION = $${MAYO_VERSION_MAJ}.$${MAYO_VERSION_MIN}.$${MAYO_VERSION_PAT}
MAYO_VERSION = $${VERSION}

equals(QT_ARCH, i386) {
VERSION_TARGET_ARCH = x86
Expand Down

0 comments on commit 4b92d85

Please sign in to comment.