Files
chatterino2/src/common/Version.hpp
Nico Sonack 930351779c (#1874) Disable updates on non-Windows, Linux or macOS platforms (#1914)
* (#1874) Disable update checking for unsupported platforms

As described #1874, only Windows, macOS and GNU/Linux are officially
supplied with builds. Thus checking for updates is unnecessary if we
are e.g. on FreeBSD, OpenBSD, illumos distros and possibly other
Operating Systems.

This fixes #1874 by ifdef-ing the 3 officially supported platforms
when checking for updates. Otherwise a debug warning will be emitted
and in the settings the checkbox for beta-updates is hidden and
replaced by a message, explaining the reason for why there are no beta
updates.

* Update CHANGELOG

In accordance with #1874

* (#1874) Move platform check into checkForUpdates

As discussed in #1914

* (#1874) Move check for supported OS to a seperate function.

As requested in #1914
2020-08-24 12:02:56 +02:00

44 lines
841 B
C++

#pragma once
#include <QString>
#include <QtGlobal>
#define CHATTERINO_VERSION "2.2.0"
#if defined(Q_OS_WIN)
# define CHATTERINO_OS "win"
#elif defined(Q_OS_MACOS)
# define CHATTERINO_OS "macos"
#elif defined(Q_OS_LINUX)
# define CHATTERINO_OS "linux"
#elif defined(Q_OS_FREEBSD)
# define CHATTERINO_OS "freebsd"
#else
# define CHATTERINO_OS "unknown"
#endif
namespace chatterino {
class Version
{
public:
static const Version &instance();
const QString &version() const;
const QString &commitHash() const;
const QString &dateOfBuild() const;
const QString &fullVersion() const;
const bool &isSupportedOS() const;
private:
Version();
QString version_;
QString commitHash_;
QString dateOfBuild_;
QString fullVersion_;
bool isSupportedOS_;
};
}; // namespace chatterino