mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 18:50:44 +00:00
Added ReleaseMode Incremental Build Number to versioning
This commit is contained in:
parent
24bc115a26
commit
7e7d87f143
@ -245,7 +245,6 @@ QString STR_TR_PrRelief; // Pressure Relief
|
||||
QString STR_TR_NoData;
|
||||
QString STR_TR_Bookmarks;
|
||||
QString STR_TR_SleepyHead;
|
||||
QString STR_TR_SleepyHeadVersion;
|
||||
|
||||
QString STR_TR_Mode;
|
||||
QString STR_TR_Model;
|
||||
@ -425,7 +424,6 @@ void initializeStrings()
|
||||
STR_TR_NoData = QObject::tr("No Data");
|
||||
STR_TR_Bookmarks = QObject::tr("Bookmarks");
|
||||
STR_TR_SleepyHead = QObject::tr("SleepyHead");
|
||||
STR_TR_SleepyHeadVersion = STR_TR_SleepyHead + " v" + VersionString;
|
||||
|
||||
STR_TR_Mode = QObject::tr("Mode");
|
||||
STR_TR_Model = QObject::tr("Model");
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include <QString>
|
||||
#include <QColor>
|
||||
#include <QObject>
|
||||
#include "version.h"
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(4,8,0)
|
||||
|
||||
@ -260,7 +259,6 @@ extern QString STR_TR_SensAwake;
|
||||
extern QString STR_TR_NoData;
|
||||
extern QString STR_TR_Bookmarks;
|
||||
extern QString STR_TR_SleepyHead;
|
||||
extern QString STR_TR_SleepyHeadVersion;
|
||||
|
||||
extern QString STR_TR_Mode;
|
||||
extern QString STR_TR_Model;
|
||||
|
@ -274,8 +274,7 @@ int IntellipapLoader::Open(QString path, Profile *profile)
|
||||
|
||||
for (int i = 0; i < recs; i++) {
|
||||
// convert timestamp to real epoch
|
||||
ts1 = ((m_buffer[pos] << 24) | (m_buffer[pos + 1] << 16) | (m_buffer[pos + 2] << 8) | m_buffer[pos
|
||||
+ 3]) + ep;
|
||||
ts1 = ((m_buffer[pos] << 24) | (m_buffer[pos + 1] << 16) | (m_buffer[pos + 2] << 8) | m_buffer[pos + 3]) + ep;
|
||||
|
||||
for (int j = 0; j < SessionStart.size(); j++) {
|
||||
sid = SessionStart[j];
|
||||
@ -310,6 +309,7 @@ int IntellipapLoader::Open(QString path, Profile *profile)
|
||||
}
|
||||
|
||||
if (m_buffer[pos + 0x5] > 4) { // This matches Exhale Puff.. not sure why 4
|
||||
//MW: Are the lower 2 bits something else?
|
||||
if (!sess->eventlist.contains(CPAP_ExP)) {
|
||||
sess->AddEventList(CPAP_ExP, EVL_Event);
|
||||
}
|
||||
@ -372,6 +372,8 @@ int IntellipapLoader::Open(QString path, Profile *profile)
|
||||
// delete sess;
|
||||
// continue;
|
||||
//}
|
||||
|
||||
|
||||
quint64 first = qint64(sid) * 1000L;
|
||||
quint64 last = qint64(SessionEnd[i]) * 1000L;
|
||||
|
||||
|
@ -660,6 +660,7 @@ void ResmedImport::run()
|
||||
// Claim this session
|
||||
R.sessionid = sessionid;
|
||||
|
||||
|
||||
// Save maskon time in session setting so we can use it later to avoid doubleups.
|
||||
sess->settings[RMS9_MaskOnTime] = R.maskon;
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <QCryptographicHash>
|
||||
#include <QThread>
|
||||
|
||||
#include "version.h"
|
||||
#include "machine.h"
|
||||
#include "machine_loader.h"
|
||||
#include "preferences.h"
|
||||
|
@ -24,7 +24,6 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
const quint16 filetype_summary = 0;
|
||||
const quint16 filetype_data = 1;
|
||||
|
||||
|
@ -222,13 +222,22 @@ int compareVersion(QString version)
|
||||
}
|
||||
|
||||
QStringList patchver = parts[2].split("-");
|
||||
short patch = patchver[0].toInt(&ok);
|
||||
|
||||
short revision = patchver[0].toInt(&ok);
|
||||
if (!ok) return -1;
|
||||
|
||||
// Still here.. check patch version
|
||||
if (patch > patch_number) {
|
||||
if (revision > revision_number) {
|
||||
return 1;
|
||||
} else if (patch < patch_number) {
|
||||
} else if (revision < revision_number) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
short build = patchver[1].toInt(&ok);
|
||||
if (!ok) return -1;
|
||||
|
||||
if (build > build_number) {
|
||||
return 1;
|
||||
} else if (build < build_number) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -502,8 +502,8 @@ void Daily::Link_clicked(const QUrl &url)
|
||||
} else if (code=="cpap") {
|
||||
day=PROFILE.GetDay(previous_date,MT_CPAP);
|
||||
} else if (code=="oxi") {
|
||||
day=PROFILE.GetDay(previous_date,MT_OXIMETER);
|
||||
Session *sess=day->machine->sessionlist[sid];
|
||||
//day=PROFILE.GetDay(previous_date,MT_OXIMETER);
|
||||
//Session *sess=day->machine->sessionlist[sid];
|
||||
return;
|
||||
} else if (code=="event") {
|
||||
QList<QTreeWidgetItem *> list=ui->treeWidget->findItems(schema::channel[sid].fullname(),Qt::MatchContains);
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <QFileDialog>
|
||||
#include <QSysInfo>
|
||||
|
||||
#include "version.h"
|
||||
#include "logger.h"
|
||||
#include "SleepLib/schema.h"
|
||||
#include "mainwindow.h"
|
||||
@ -60,7 +61,7 @@ void initialize()
|
||||
void release_notes()
|
||||
{
|
||||
QDialog relnotes;
|
||||
relnotes.setWindowTitle(STR_TR_SleepyHead + " " + QObject::tr("Release Notes"));
|
||||
relnotes.setWindowTitle(STR_TR_SleepyHead + " " + QObject::tr("Release Notes") +" "+FullVersionString);
|
||||
QVBoxLayout layout(&relnotes);
|
||||
QWebView web(&relnotes);
|
||||
|
||||
|
@ -35,6 +35,8 @@
|
||||
#include <QCalendarWidget>
|
||||
|
||||
#include "common_gui.h"
|
||||
#include "version.h"
|
||||
|
||||
|
||||
#include <cmath>
|
||||
|
||||
@ -148,8 +150,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
|
||||
this->setWindowTitle(STR_TR_SleepyHead + QString(" v%1 (" + tr("Profile") + ": %2)").arg(version).arg(PREF[STR_GEN_Profile].toString()));
|
||||
|
||||
qDebug() << STR_TR_SleepyHeadVersion.toLocal8Bit().data() << "built with Qt" << QT_VERSION_STR <<
|
||||
"on" << __DATE__ << __TIME__;
|
||||
qDebug() << STR_TR_SleepyHead << VersionString << "built with Qt" << QT_VERSION_STR << "on" << __DATE__ << __TIME__;
|
||||
|
||||
#ifdef BROKEN_OPENGL_BUILD
|
||||
qDebug() << "This build has been created especially for computers with older graphics hardware.\n";
|
||||
@ -345,6 +346,9 @@ MainWindow::~MainWindow()
|
||||
|
||||
void MainWindow::Notify(QString s, QString title, int ms)
|
||||
{
|
||||
if (title.isEmpty()) {
|
||||
title = "SleepyHead v" + VersionString;
|
||||
}
|
||||
if (systray) {
|
||||
// GNOME3's systray hides the last line of the displayed Qt message.
|
||||
// As a workaround, add an extra line to bump the message back
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <QNetworkReply>
|
||||
#include <QSystemTrayIcon>
|
||||
|
||||
#include "version.h"
|
||||
#include "daily.h"
|
||||
#include "overview.h"
|
||||
#include "preferencesdialog.h"
|
||||
@ -102,7 +101,7 @@ class MainWindow : public QMainWindow
|
||||
|
||||
Mac needs Growl notification system for this to work
|
||||
*/
|
||||
void Notify(QString s, QString title = "SleepyHead v" + VersionString, int ms = 5000);
|
||||
void Notify(QString s, QString title = "", int ms = 5000);
|
||||
|
||||
/*! \fn gGraphView *snapshotGraph()
|
||||
\brief Returns the current snapshotGraph object used by the report printing system */
|
||||
|
1
sleepyhead/scripts/build_number
Normal file
1
sleepyhead/scripts/build_number
Normal file
@ -0,0 +1 @@
|
||||
47
|
5
sleepyhead/scripts/inc_build.bat
Normal file
5
sleepyhead/scripts/inc_build.bat
Normal file
@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
set /p var= <build_number
|
||||
set /a var= %var%+1
|
||||
echo %var% > build_number
|
||||
echo const int build_number = %var%; > ../build_number.h
|
12
sleepyhead/scripts/inc_build.sh
Executable file
12
sleepyhead/scripts/inc_build.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
MY_PATH="`dirname \"$0\"`"
|
||||
if [ ! -f "$MY_PATH/ReleaseMode" ]
|
||||
then
|
||||
echo "Skipping build number update"
|
||||
exit;
|
||||
fi
|
||||
echo "Updating build number"
|
||||
number=`cat $MY_PATH/build_number`
|
||||
let number++
|
||||
echo "$number" > $MY_PATH/build_number
|
||||
echo "const int build_number = ""$number;" | tee $MY_PATH/../build_number.h
|
@ -88,6 +88,27 @@ win32 {
|
||||
# MingW needs this
|
||||
LIBS += -lz
|
||||
}
|
||||
CONFIG(release, debug|release) {
|
||||
# Update build number
|
||||
build_nr.commands = $$PWD/scripts/inc_build.bat
|
||||
build_nr.depends = FORCE
|
||||
QMAKE_EXTRA_TARGETS += build_nr
|
||||
PRE_TARGETDEPS += build_nr
|
||||
|
||||
HEADERS += build_number.h
|
||||
}
|
||||
}
|
||||
|
||||
unix {
|
||||
CONFIG(release, debug|release) {
|
||||
# Update build number
|
||||
build_nr.commands = $$PWD/scripts/inc_build.sh
|
||||
build_nr.depends = FORCE
|
||||
QMAKE_EXTRA_TARGETS += build_nr
|
||||
PRE_TARGETDEPS += build_nr
|
||||
|
||||
HEADERS += build_number.h
|
||||
}
|
||||
}
|
||||
|
||||
#include(..3rdparty/qextserialport/src/qextserialport.pri)
|
||||
|
@ -15,7 +15,6 @@
|
||||
#include "mainwindow.h"
|
||||
#include "statistics.h"
|
||||
|
||||
|
||||
extern MainWindow *mainwin;
|
||||
|
||||
QString formatTime(float time)
|
||||
|
@ -13,10 +13,11 @@
|
||||
#define VERSION_H
|
||||
|
||||
#include <qglobal.h>
|
||||
#include "build_number.h"
|
||||
|
||||
const int major_version = 0; // incompatible API changes
|
||||
const int minor_version = 9; // new features that don't break things
|
||||
const int patch_number = 7; // bugfixes, revisions
|
||||
const int revision_number = 7; // bugfixes, revisions
|
||||
|
||||
#ifdef TEST_BUILD
|
||||
const QString ReleaseStatus = "testing";
|
||||
@ -24,8 +25,8 @@ const QString ReleaseStatus = "testing";
|
||||
const QString ReleaseStatus = "beta";
|
||||
#endif
|
||||
|
||||
const QString VersionString = QString().sprintf("%i.%i.%i", major_version, minor_version, patch_number);
|
||||
const QString FullVersionString = QString().sprintf("%i.%i.%i", major_version, minor_version, patch_number)+"-"+ReleaseStatus;
|
||||
const QString VersionString = QString().sprintf("%i.%i.%i-%i", major_version, minor_version, revision_number, build_number);
|
||||
const QString FullVersionString = QString().sprintf("%i.%i.%i-%i", major_version, minor_version, revision_number, build_number)+"-"+ReleaseStatus;
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
const QString PlatformString = "MacOSX";
|
||||
|
Loading…
Reference in New Issue
Block a user