Commit 4262760a authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Set and make use of RELEASE_SERVICE_VERSION variables

Also write full version of current software into game data,
should help to catch any broken variants if needed.

GIT_SILENT
parent 99200ac7
cmake_minimum_required (VERSION 3.5 FATAL_ERROR)
project(kjumpingcube)
# 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 KJUMPINGCUBE_BASE_VERSION once new features are added
set(KJUMPINGCUBE_BASE_VERSION "2.1")
set(KJUMPINGCUBE_VERSION "${KJUMPINGCUBE_BASE_VERSION}.${RELEASE_SERVICE_COMPACT_VERSION}")
project(kjumpingcube VERSION ${KJUMPINGCUBE_VERSION})
set (QT_MIN_VERSION "5.12.0")
set (KF5_MIN_VERSION "5.59.0")
......@@ -31,6 +41,7 @@ include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
include(ECMQtDeclareLoggingCategory)
include(ECMSetupVersion)
add_definitions(
-DQT_USE_QSTRINGBUILDER
......@@ -65,6 +76,11 @@ set(kjumpingcube_SRCS
ai_box.cpp
)
ecm_setup_version(${KJUMPINGCUBE_VERSION}
VARIABLE_PREFIX KJUMPINGCUBE
VERSION_HEADER kjumpingcube_version.h
)
ecm_qt_declare_logging_category(kjumpingcube_SRCS HEADER kjumpingcube_debug.h IDENTIFIER KJUMPINGCUBE_LOG CATEGORY_NAME org.kde.kjumpingcube)
qt5_add_resources(kjumpingcube_SRCS kjumpingcube.qrc)
......
......@@ -20,7 +20,7 @@
**************************************************************************** */
#include "game.h"
#include "version.h"
#include "kjumpingcube_version.h"
#include "ai_main.h"
#include "ai_box.h"
#include "kcubeboxwidget.h"
......@@ -603,7 +603,7 @@ void Game::saveGame (bool saveAs)
tempFile.open();
KConfig config (tempFile.fileName(), KConfig::SimpleConfig);
KConfigGroup main (&config, "KJumpingCube");
main.writeEntry ("Version", KJC_VERSION);
main.writeEntry ("Version", KJUMPINGCUBE_VERSION_STRING);
KConfigGroup game (&config, "Game");
saveProperties (game);
config.sync();
......
......@@ -19,9 +19,9 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**************************************************************************** */
#include "version.h"
#include "kjumpingcube.h"
#include "kjumpingcube_version.h"
#include "kjumpingcube.h"
#include <KAboutData>
#include <KCrash>
......@@ -46,7 +46,7 @@ int main(int argc, char *argv[])
KLocalizedString::setApplicationDomain("kjumpingcube");
KAboutData aboutData( QStringLiteral("kjumpingcube"), i18n("KJumpingCube"),
QStringLiteral(KJC_VERSION),
QStringLiteral(KJUMPINGCUBE_VERSION_STRING),
i18n("Tactical one or two player game"),
KAboutLicense::GPL,
i18n("(c) 1998-2000, Matthias Kiefer"));
......
#ifndef KJC_VERSION
#define KJC_VERSION "2.1"
#endif // KJC_VERSION
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment