refs #217, Project class providing information for compile configuration

* changed .pro / .pri as required
* Used info from project class in network_vatlib
* Checks / info in GUI/core (e.g. console)
* const * versions of systemNameAndVersion / simulators, as mentioned in https://dev.vatsim-germany.org/issues/217#note-4
This commit is contained in:
Klaus Basan
2014-04-28 19:03:18 +02:00
parent 4314f0f600
commit 36dbcc6b57
8 changed files with 245 additions and 20 deletions

66
src/blackmisc/project.h Normal file
View File

@@ -0,0 +1,66 @@
#ifndef BLACKMISC_CPROJECT_H
#define BLACKMISC_CPROJECT_H
#include <QString>
namespace BlackMisc
{
/*!
* \brief Metadata about the project
*/
class CProject
{
public:
//! with BlackCore?
static bool isCompiledWithBlackCore();
//! with BlackSound?
static bool isCompiledWithBlackSound();
//! with FSX support?
static bool isCompiledWithFsxSupport();
//! with XPlane support?
static bool isCompiledWithXPlaneSupport();
//! with any simulator libraries
static bool isCompiledWithFlightSimulatorSupport();
//! with GUI?
static bool isCompiledWithGui();
//! Compiled with as info string
static const QString &compiledInfo();
//! Simulator String info
static const QString &simulators();
//! Simulator String info
static const char *simulatorsChar();
//! Version info
static const QString &version();
//! System's name and version
static const QString &systemNameAndVersion();
//! System's name and version
static const char *systemNameAndVersionChar();
//! Version major
static int versionMajor();
//! Version minor
static int versionMinor();
private:
//! Constructor
CProject() {}
//! Split version
static int getMajorMinor(int index);
};
}
#endif // guard