mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 11:05:44 +08:00
committed by
Mathew Sutcliffe
parent
eea6c31e7b
commit
15b50791ef
@@ -17,4 +17,13 @@ SOURCES += *.cpp
|
|||||||
DESTDIR = $$DestRoot/lib
|
DESTDIR = $$DestRoot/lib
|
||||||
OTHER_FILES += buildconfig_gen.cpp.in
|
OTHER_FILES += buildconfig_gen.cpp.in
|
||||||
|
|
||||||
|
win32: GIT_BIN = $$system($$(SYSTEMROOT)\system32\where git 2> nul)
|
||||||
|
else: GIT_BIN = $$system(which git 2> /dev/null)
|
||||||
|
|
||||||
|
isEmpty(GIT_BIN) {
|
||||||
|
GIT_HEAD_SHA1="<unknown>"
|
||||||
|
} else {
|
||||||
|
GIT_HEAD_SHA1=$$system(git rev-parse --short HEAD)
|
||||||
|
}
|
||||||
|
|
||||||
load(common_post)
|
load(common_post)
|
||||||
|
|||||||
@@ -367,6 +367,12 @@ namespace BlackConfig
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QString &BlackConfig::CBuildConfig::buildDateAndTime()
|
||||||
|
{
|
||||||
|
static const QString buildDateAndTime( __DATE__ " " __TIME__ );
|
||||||
|
return buildDateAndTime;
|
||||||
|
}
|
||||||
|
|
||||||
bool CVersion::isNewerVersion(const QString &versionString)
|
bool CVersion::isNewerVersion(const QString &versionString)
|
||||||
{
|
{
|
||||||
if (versionString.isEmpty()) { return false; }
|
if (versionString.isEmpty()) { return false; }
|
||||||
|
|||||||
@@ -150,6 +150,12 @@ namespace BlackConfig
|
|||||||
|
|
||||||
//! Vatsim client key
|
//! Vatsim client key
|
||||||
static const QString &vatsimPrivateKey(); // defined in buildconfig_gen.cpp.in
|
static const QString &vatsimPrivateKey(); // defined in buildconfig_gen.cpp.in
|
||||||
|
|
||||||
|
//! Returns SHA-1 of git HEAD at build time
|
||||||
|
static const QString &gitHeadSha1();
|
||||||
|
|
||||||
|
//! Returns the build date and time as string
|
||||||
|
static const QString &buildDateAndTime();
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Version
|
//! Version
|
||||||
|
|||||||
@@ -144,6 +144,13 @@ const QString &BlackConfig::CBuildConfig::vatsimPrivateKey()
|
|||||||
return pk;
|
return pk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QString &BlackConfig::CBuildConfig::gitHeadSha1()
|
||||||
|
{
|
||||||
|
static const QString gitHeadSha1(\"$$GIT_HEAD_SHA1\");
|
||||||
|
Q_ASSERT(!gitHeadSha1.isEmpty());
|
||||||
|
return gitHeadSha1;
|
||||||
|
}
|
||||||
|
|
||||||
const QString &BlackConfig::CVersion::version()
|
const QString &BlackConfig::CVersion::version()
|
||||||
{
|
{
|
||||||
static const QString version(\"$$BLACK_VERSION\");
|
static const QString version(\"$$BLACK_VERSION\");
|
||||||
|
|||||||
Reference in New Issue
Block a user