diff --git a/CMakeLists.txt b/CMakeLists.txt index bcd101e1e165acef8f3930eae0fc32df73191ba1..0c11924c4a41da17f5a198248937b666de2b4b84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,16 @@ cmake_minimum_required (VERSION 3.5 FATAL_ERROR) -project(konversation) +# Release Service version, managed by release script +set (RELEASE_SERVICE_VERSION_MAJOR "20") +set (RELEASE_SERVICE_VERSION_MINOR "11") +set (RELEASE_SERVICE_VERSION_MICRO "70") +set (RELEASE_SERVICE_COMPACT_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}${RELEASE_SERVICE_VERSION_MINOR}${RELEASE_SERVICE_VERSION_MICRO}") + +# Bump KONVERSATION_BASE_VERSION once new features are added +set(KONVERSATION_BASE_VERSION "1.8") +set(KONVERSATION_VERSION "${KONVERSATION_BASE_VERSION}.${RELEASE_SERVICE_COMPACT_VERSION}") + +project(konversation VERSION ${KONVERSATION_VERSION}) set (QT_MIN_VERSION "5.12.0") set(KF5_MIN_VERSION "5.71.0") @@ -13,6 +23,7 @@ include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings NO_POLICY_SCOPE) include(ECMInstallIcons) +include(ECMSetupVersion) include(FeatureSummary) find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core Network Widgets) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 680053e26ece86d01e6b48304f1747ad44d3d703..94ffd2d3a0bb8dacca5a573ec4ab227af7e1534f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -225,6 +225,11 @@ ecm_qt_declare_logging_category(konversation_SRCS EXPORT KONVERSATION ) +ecm_setup_version(${KONVERSATION_VERSION} + VARIABLE_PREFIX KONVI + VERSION_HEADER version.h +) + # Sets the icon on Windows and OSX file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/../data/images/icons/*apps-konversation.png") ecm_add_app_icon(konversation_SRCS ICONS ${ICONS_SRCS}) diff --git a/src/commit.h b/src/commit.h deleted file mode 100644 index 964bbd1b653cb5523e0667821e2ee0f3579507e7..0000000000000000000000000000000000000000 --- a/src/commit.h +++ /dev/null @@ -1,4 +0,0 @@ -// This COMMIT number is added to version string to be used as "patch level" -#ifndef COMMIT -#define COMMIT 5115 -#endif diff --git a/src/irc/inputfilter.cpp b/src/irc/inputfilter.cpp index d1a3fc460889ad72892d909e21f56b17e0b86433..c87a8d6bfe5ebb8f16a848cce2d3eecc9eacbfb4 100644 --- a/src/irc/inputfilter.cpp +++ b/src/irc/inputfilter.cpp @@ -12,7 +12,6 @@ #include "replycodes.h" #include "application.h" #include "version.h" -#include "commit.h" #include "query.h" #include "channel.h" #include "statuspanel.h" @@ -290,8 +289,8 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma else { // Do not internationalize the below version string - reply = QStringLiteral("Konversation %1 Build %2 Copyright 2002-2020 by the Konversation team") - .arg(QStringLiteral(KONVI_VERSION), QString::number(COMMIT)); + reply = QStringLiteral("Konversation %1 Copyright 2002-2020 by the Konversation team") + .arg(QStringLiteral(KONVI_VERSION_STRING)); } if (!reply.isEmpty()) diff --git a/src/main.cpp b/src/main.cpp index 79631e398203f923a370973ebd42a6d77155f50c..d2559cedcecc1bdaeea13c9c16a74de5c8493dcf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7,7 +7,6 @@ #include "application.h" #include "version.h" -#include "commit.h" #include #include @@ -18,8 +17,6 @@ #include #include -#define HACKSTR(x) #x -#define STRHACK(x) HACKSTR(x) int main(int argc, char* argv[]) { @@ -43,7 +40,7 @@ int main(int argc, char* argv[]) KAboutData aboutData(QStringLiteral("konversation"), i18n("Konversation"), - QStringLiteral(KONVI_VERSION " #" STRHACK(COMMIT)), + QStringLiteral(KONVI_VERSION_STRING), i18n("A user-friendly IRC client"), KAboutLicense::GPL, i18n("Copyright 2002-%1 by the Konversation team", QStringLiteral("2020")), diff --git a/src/version.h b/src/version.h deleted file mode 100644 index 9f09572d684504aaa83784a05d54f74109bdcef8..0000000000000000000000000000000000000000 --- a/src/version.h +++ /dev/null @@ -1,3 +0,0 @@ -#ifndef KONVI_VERSION -#define KONVI_VERSION "1.7-master" -#endif