diff --git a/CMakeLists.txt b/CMakeLists.txt index 1cdee8f..67d2535 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,86 +1,95 @@ -project(klines) - cmake_minimum_required (VERSION 3.5 FATAL_ERROR) + +set (RELEASE_SERVICE_VERSION_MAJOR "20") +set (RELEASE_SERVICE_VERSION_MINOR "03") +set (RELEASE_SERVICE_VERSION_MICRO "70") +set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}") +set (RELEASE_SERVICE_COMPACT_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}${RELEASE_SERVICE_VERSION_MINOR}${RELEASE_SERVICE_VERSION_MICRO}") + +project(klines VERSION "1.6.${RELEASE_SERVICE_COMPACT_VERSION}") + set (QT_MIN_VERSION "5.9.0") set (KF5_MIN_VERSION "5.46.0") find_package(ECM ${KF5_MIN_VERSION} REQUIRED CONFIG) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets) find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS CoreAddons Config Crash WidgetsAddons Config DBusAddons I18n ConfigWidgets XmlGui DocTools ) find_package(KF5KDEGames 4.9.0 REQUIRED) include(FeatureSummary) include(ECMAddAppIcon) include(ECMInstallIcons) include(KDEInstallDirs) +include(ECMSetupVersion) include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) include(KDECMakeSettings) include(ECMQtDeclareLoggingCategory) if (EXISTS "${CMAKE_SOURCE_DIR}/.git") add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000) add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000) endif() add_subdirectory(themes) add_subdirectory(doc) ########### next target ############### set(klines_SRCS mwidget.cpp klines.cpp main.cpp scene.cpp renderer.cpp ballitem.cpp previewitem.cpp animator.cpp ) +ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX KLINES VERSION_HEADER klines_version.h) ecm_qt_declare_logging_category(klines_SRCS HEADER klines_debug.h IDENTIFIER KLINES_LOG CATEGORY_NAME org.kde.kdegames.klines) qt5_add_resources(klines_SRCS klines.qrc) kconfig_add_kcfg_files(klines_SRCS prefs.kcfgc) file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/*-apps-klines.png") ecm_add_app_icon(klines_SRCS ICONS ${ICONS_SRCS}) add_executable(klines ${klines_SRCS}) target_link_libraries(klines KF5KDEGames KF5::Crash KF5::DBusAddons KF5::XmlGui ) install(TARGETS klines ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) ########### install files ############### install(PROGRAMS org.kde.klines.desktop DESTINATION ${KDE_INSTALL_APPDIR}) install(FILES klines.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR}) install(FILES org.kde.klines.appdata.xml DESTINATION ${CMAKE_INSTALL_METAINFODIR}) ecm_install_icons(ICONS 16-apps-klines.png 22-apps-klines.png 32-apps-klines.png 48-apps-klines.png 64-apps-klines.png 128-apps-klines.png DESTINATION ${KDE_INSTALL_ICONDIR} THEME hicolor ) install( FILES klines.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR} ) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/main.cpp b/main.cpp index dec2860..5fd18fc 100644 --- a/main.cpp +++ b/main.cpp @@ -1,67 +1,68 @@ /*************************************************************************** begin : Fri May 19 2000 copyright : (C) 2000 by Roman Merzlyakov email : roman@sbrf.barrt.ru copyright : (C) 2000 by Roman Razilov email : Roman.Razilov@gmx.de ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ /* * Roman Razilov 2000-05-19 debug dummmy * Roman Razilov 2000-05-21 qimgio */ #include #include #include #include #include #include #include #include "klines.h" +#include "klines_version.h" static const char description[] = I18N_NOOP("Kolor Lines - a little game about balls and how to get rid of them"); int main( int argc, char **argv ) { QApplication app(argc, argv); Kdelibs4ConfigMigrator migrate(QStringLiteral("klines")); migrate.setConfigFiles(QStringList() << QStringLiteral("klinesrc")); migrate.setUiFiles(QStringList() << QStringLiteral("klinesui.rc")); migrate.migrate(); KLocalizedString::setApplicationDomain("klines"); - KAboutData aboutData(QStringLiteral("klines"), i18n("Kolor Lines"), QStringLiteral("1.6"), + KAboutData aboutData(QStringLiteral("klines"), i18n("Kolor Lines"), QStringLiteral(KLINES_VERSION_STRING), i18n(description), KAboutLicense::GPL, i18n("(c) 2000-2015 The KLines Authors"), QString(), QStringLiteral("https://kde.org/applications/games/org.kde.klines")); aboutData.addAuthor(i18n("Roman Merzlyakov"), i18n("Original author"), QStringLiteral("roman@sbrf.barrt.ru")); aboutData.addAuthor(i18n("Roman Razilov"), i18n("Rewrite and Extension"), QStringLiteral("Roman.Razilov@gmx.de")); aboutData.addAuthor(i18n("Dmitry Suzdalev"), i18n("Rewrite to use QGraphicsView. Current maintainer"), QStringLiteral("dimsuz@gmail.com")); aboutData.addCredit(i18n("Eugene Trounev"), i18n("New SVG artwork for KDE4 version of the game"), QStringLiteral("eugene.trounev@gmail.com")); app.setWindowIcon(QIcon::fromTheme(QStringLiteral("klines"))); KAboutData::setApplicationData(aboutData); KCrash::initialize(); QCommandLineParser parser; aboutData.setupCommandLine(&parser); parser.process(app); aboutData.processCommandLine(&parser); KDBusService service; if (app.isSessionRestored()) kRestoreMainWindows(); else { KLinesMainWindow *window = new KLinesMainWindow; window->show(); } return app.exec(); }