#include <QApplication>
#include "build-metadata.hpp"

char const * const BuildMetadata::VERSION = "0.20.0";
char const * const BuildMetadata::REVISION = "0.20.0-dirty";
char const * const BuildMetadata::PRODUCT = "Merkaartor";

char const * const BuildMetadata::SHARE_DIR = "/usr/share/merkaartor";
char const * const BuildMetadata::LIB_DIR = "/usr/lib/merkaartor";

QString BuildMetadata::GetShareDir() {
#if defined(Q_OS_WIN)
    return QCoreApplication::applicationDirPath() + "/../" + SHARE_DIR;
#else
    return SHARE_DIR;
#endif
}

QString BuildMetadata::GetLibDir() {
#if defined(Q_OS_WIN)
    return QCoreApplication::applicationDirPath() + "/../" + LIB_DIR;
#else
    return LIB_DIR;
#endif
}

const int BuildMetadata::VERSION_MAJOR = 0;
const int BuildMetadata::VERSION_MINOR = 20;
const int BuildMetadata::VERSION_PATCH = 0;
const int BuildMetadata::VERSION_BUILD = +0;
