Tweak the version number system, and why not step it up a notch?

This commit is contained in:
Mark Watkins 2016-03-03 23:26:08 +10:00
parent 4e90213536
commit c91c1af0ba
51 changed files with 54 additions and 38 deletions

View File

@ -23,22 +23,15 @@ const QString getDeveloperName()
const QString getAppName() const QString getAppName()
{ {
QString name = STR_AppName; QString name = STR_AppName;
#ifdef TEST_BUILD
name += STR_TestBuild;
#endif
return name; return name;
} }
const QString getDefaultAppRoot() const QString getDefaultAppRoot()
{ {
QString approot = STR_AppRoot; QString approot = STR_AppRoot;
#ifdef TEST_BUILD
approot += STR_TestBuild;
#endif
return approot; return approot;
} }
qint64 timezoneOffset() qint64 timezoneOffset()
{ {
static bool ok = false; static bool ok = false;

View File

@ -71,6 +71,12 @@ QString GetAppRoot()
if (HomeAppRoot.isEmpty()) { if (HomeAppRoot.isEmpty()) {
HomeAppRoot = desktopFolder + "/" + getDefaultAppRoot(); HomeAppRoot = desktopFolder + "/" + getDefaultAppRoot();
const QString testing = "-Testing";
QDir dir(HomeAppRoot+testing);
if (dir.exists()) {
HomeAppRoot += testing;
}
} }
return HomeAppRoot; return HomeAppRoot;

View File

@ -218,17 +218,7 @@ int compareVersion(QString version)
} }
QStringList patchver = parts[2].split("-"); QStringList patchver = parts[2].split("-");
short build = patchver[0].toInt(&ok);
short revision = patchver[0].toInt(&ok);
if (!ok) return -1;
if (revision > revision_number) {
return 1;
} else if (revision < revision_number) {
return -1;
}
short build = patchver[1].toInt(&ok);
if (!ok) return -1; if (!ok) return -1;
if (build > build_number) { if (build > build_number) {
@ -237,6 +227,24 @@ int compareVersion(QString version)
return -1; return -1;
} }
if ((patchver[1]=="beta") && (ReleaseStatus!="beta")) {
return 1;
} else if (patchver[1] == ReleaseStatus) {
return 0;
} else {
return -1;
}
// short revision = patchver[0].toInt(&ok);
// if (!ok) return -1;
// if (revision > revision_number) {
// return 1;
// } else if (revision < revision_number) {
// return -1;
// }
// patchver[1] = tag.. // patchver[1] = tag..
// Versions match // Versions match

View File

@ -1 +1 @@
const int build_number = 3; const int build_number = 0;

View File

@ -1,17 +1,21 @@
<html> <html>
<head><meta charset="UTF-8"></head> <head><meta charset="UTF-8"></head>
<body> <body>
<h1><image src="qrc:/docs/sheep.png" width=64 height=64>SleepyHead v0.9.8-3 Release Notes</b></h2></p> <h1><image src="qrc:/docs/sheep.png" width=64 height=64>SleepyHead v1.0.0 beta Release Notes</b></h2></p>
<h2><p>Greetings!</p></h2> <h2><p>Greetings!</p></h2>
<p><h3>It's been a long time coming, but this build brings initial support for Philips Respironics DreamStation.</h3></p> <p><h3>After four years in the making, this build brings SleepyHead into the final beta phase.</h3></p>
<p><h2><font color='red'><b>Important:</b></font> <i>This is a pre-release test build, not all features are complete or will work 100% as intended yet!</i></h2></p> <p><h3>Things are not perfect yet, but the focus from now is putting on the finishing touches.</h3></p>
<p><h2><i>Back up your data folder manually, by making a copy the SleepyHeadData folder, as attempting to roll back later may break things.</i></h2></p> <p><h3>This version brings support for the new Philips Respironics DreamStation, and older PRS1 1060P AVAPS models.</h3></p>
<p><h3><font color='red'><b>Important:</b></font> <i>Back up your data folder manually, by making a copy the SleepyHeadData folder, as attempting to roll back later may break things.</i></h3></p>
<p><b>Sleep Well, and good luck!</b></p> <p><b>Sleep Well, and good luck!</b></p>
<p><b><i>JediMark</i></b></p> <p><b><i>JediMark</i></b></p>
<br/> <br/>
<b>Changes and fixes in v0.9.8-3</b> <b>Changes and fixes in v1.0.0 beta</b>
<list> <list>
<li>Tons of other bug fixes</li>
<li>Fix dodgy PRS1 ASV pressure settings</li>
<li>Resolve duplicate RX changes issue</li>
<li>PRS1 1060P AVAPS support... (No flow waveform on these, but still pretty good) <li>PRS1 1060P AVAPS support... (No flow waveform on these, but still pretty good)
<li>Philips Respironics DreamStation support (Thanks for your assistance JediBob and PaleRider, and everyone who shared their data!) <li>Philips Respironics DreamStation support (Thanks for your assistance JediBob and PaleRider, and everyone who shared their data!)
<li>AirCurve pressure reporting glitches</li> <li>AirCurve pressure reporting glitches</li>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 KiB

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 390 B

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 815 B

After

Width:  |  Height:  |  Size: 936 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -230,8 +230,10 @@ int main(int argc, char *argv[])
if (!havefolder && !force_data_dir) { if (!havefolder && !force_data_dir) {
if (QMessageBox::question(nullptr, STR_MessageBox_Question, if (QMessageBox::question(nullptr, STR_MessageBox_Question,
QObject::tr("No SleepyHead data folder was found.")+"\n\n"+QObject::tr("Would you like SleepyHead to use the default location for storing its data?")+"\n\n"+ QObject::tr("Would you like SleepyHead to use this location for storing its data?")+"\n\n"+
QDir::toNativeSeparators(GetAppRoot()), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes) { QDir::toNativeSeparators(GetAppRoot())+"\n\n"+
QObject::tr("If you are upgrading, don't panic, you just need to make sure this is pointed at your old SleepyHead data folder.")+"\n\n"+
QObject::tr("(If you have no idea what to do here, just click yes.)"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes) {
settings.setValue("Settings/AppRoot", GetAppRoot()); settings.setValue("Settings/AppRoot", GetAppRoot());
change_data_dir = false; change_data_dir = false;
} }

View File

@ -143,7 +143,7 @@ MainWindow::MainWindow(QWidget *parent) :
connect(logger, SIGNAL(outputLog(QString)), this, SLOT(logMessage(QString))); connect(logger, SIGNAL(outputLog(QString)), this, SLOT(logMessage(QString)));
} }
QString version = VersionString + "-" + QString(GIT_REVISION) + "-" + getGraphicsEngine(); QString version = FullVersionString +"-" +QString(GIT_REVISION) +"-" +getGraphicsEngine();
#ifndef TEST_BUILD #ifndef TEST_BUILD
ui->warningLabel->hide(); ui->warningLabel->hide();
@ -1397,7 +1397,7 @@ void MainWindow::on_action_About_triggered()
tr("Graphics Engine: %1").arg(getGraphicsEngine())+ tr("Graphics Engine: %1").arg(getGraphicsEngine())+
"<br/>" + "<br/>" +
(tr("Data Folder Location: <a href=\"file://%1\">%2</a>").arg(GetAppRoot()).arg(QDir::toNativeSeparators(GetAppRoot())) + (tr("Data Folder Location: <a href=\"file://%1\">%2</a>").arg(GetAppRoot()).arg(QDir::toNativeSeparators(GetAppRoot())) +
"<hr/>"+tr("Copyright") + " &copy;2011-2014 Mark Watkins (jedimark) <br/> \n" + "<hr/>"+tr("Copyright") + " &copy;2011-2016 Mark Watkins (jedimark) <br/> \n" +
tr("This software is released under the GNU Public License v3.0<br/>") + tr("This software is released under the GNU Public License v3.0<br/>") +
"<hr>" "<hr>"

View File

@ -129,7 +129,7 @@ QString NewProfile::getIntroHTML()
"<p><b><font size=+1>" + tr("Use of this software is entirely at your own risk.") + "<p><b><font size=+1>" + tr("Use of this software is entirely at your own risk.") +
"</font></b></p>" "</font></b></p>"
"<p><i>" + tr("SleepyHead is copyright &copy;2011-2014 Mark Watkins") + "<i></p>" "<p><i>" + tr("SleepyHead is copyright &copy;2011-2016 Mark Watkins") + "<i></p>"
"</div>" "</div>"
"</body>" "</body>"
"</html>"; "</html>";

View File

@ -1 +1 @@
3 0

View File

@ -66,7 +66,7 @@ exists(../.git):{
} }
#Comment out for official builds #Comment out for official builds
DEFINES += TEST_BUILD DEFINES += BETA_BUILD
unix:!macx:!haiku { unix:!macx:!haiku {

View File

@ -639,7 +639,7 @@ QString htmlFooter(bool showinfo=true)
if (showinfo) { if (showinfo) {
html += "<hr/><div align=center><font size='-1'><i>"; html += "<hr/><div align=center><font size='-1'><i>";
html += QString(QObject::tr("This report was generated by a pre-release version of SleepyHead (%1), <b>and has not been approved in any way for compliance or medical diagnostic purposes</b>.")). html += QString(QObject::tr("This report was generated by SleepyHead (%1), <b>and has not been approved in any way for compliance or medical diagnostic purposes</b>.")).
arg(FullVersionString) + "<br/><br/>" + arg(FullVersionString) + "<br/><br/>" +
QObject::tr("SleepyHead is free open-source software available from http://sourceforge.net/projects/SleepyHead"); QObject::tr("SleepyHead is free open-source software available from http://sourceforge.net/projects/SleepyHead");
html += "</i></font></div>"; html += "</i></font></div>";

View File

@ -15,18 +15,21 @@
#include <qglobal.h> #include <qglobal.h>
#include "build_number.h" #include "build_number.h"
const int major_version = 0; // incompatible API changes const int major_version = 1; // incompatible API changes
const int minor_version = 9; // new features that don't break things const int minor_version = 0; // new features that don't break things
const int revision_number = 8; // bugfixes, revisions const int revision_number = 0; // bugfixes, revisions
#ifdef TEST_BUILD #ifdef TEST_BUILD
const QString ReleaseStatus = "testing"; const QString ReleaseStatus = "testing";
#else #elif BETA_BUILD
const QString ReleaseStatus = "beta"; const QString ReleaseStatus = "beta";
#else
const QString ReleaseStatus = "";
#endif #endif
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; const QString VersionString = QString().sprintf("%i.%i.%i", major_version, minor_version, build_number); // )+VersionStatus+QString().sprintf("%i",
const QString FullVersionString = VersionString+"-"+ReleaseStatus;
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
const QString PlatformString = "MacOSX"; const QString PlatformString = "MacOSX";