xca/lib/version.cpp
Christian Hohnstaedt 66a85497b7 Improve development version calculation as 4th digit
The plus sign was not compatible with the WIX toolset.
The 4th digist is the number of commits since the last release.

For a tagged release it is not 00, but empty.
2020-04-01 22:56:53 +02:00

31 lines
584 B
C++

/* vi: set sw=4 ts=4:
*
* Copyright (C) 2018 Christian Hohnstaedt.
*
* All rights reserved.
* Compiles much faster than MW_help.cpp
* and needs to get recompiled every time
*/
#ifndef QMAKE
#include "local.h"
#endif
#ifndef NO_COMMITHASH
#include "commithash.h"
#else
#define COMMITHASH ""
#endif
#define VERSION PACKAGE_VERSION VERSION_ITERATION
const char *version_str(bool html)
{
if (!COMMITHASH[0])
return html ? "<b>" VERSION "</b>" : VERSION;
return html ?
"<b>" VERSION "-dev</b><br/>commit: <b>" COMMITHASH "</b>" :
VERSION "-dev\ncommit: " COMMITHASH;
}