From 507fcc3376935f096b311ae30eaacfd975a80447 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 11 Jul 2017 09:03:42 +0200 Subject: [PATCH] fix homedir version - was ~/.netradiant/1.1.5 (1.MAJOR.MINOR) instead of ~/.netradiant/1.5.0 (MAJOR.MINOR.0) --- CMakeLists.txt | 2 ++ Makefile | 12 +++++++----- include/version.h | 3 +++ radiant/main.cpp | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6abed33c..1dbdb887 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,7 @@ set(NetRadiant_VERSION "${NetRadiant_VERSION_MAJOR}.${NetRadiant_VERSION_MINOR}. file(WRITE "${PROJECT_BINARY_DIR}/RADIANT_MAJOR" ${NetRadiant_VERSION_MAJOR}) file(WRITE "${PROJECT_BINARY_DIR}/RADIANT_MINOR" ${NetRadiant_VERSION_MINOR}) +file(WRITE "${PROJECT_BINARY_DIR}/RADIANT_PATCH" ${NetRadiant_VERSION_PATCH}) set(RADIANT_ABOUTMSG "Custom build" CACHE STRING "About message") @@ -68,6 +69,7 @@ set(GTK_NS "GTK2" CACHE STRING "GTK variable prefix") add_definitions(-DRADIANT_VERSION="${NetRadiant_VERSION}") add_definitions(-DRADIANT_MAJOR_VERSION="${NetRadiant_VERSION_MAJOR}") add_definitions(-DRADIANT_MINOR_VERSION="${NetRadiant_VERSION_MINOR}") +add_definitions(-DRADIANT_PATCH_VERSION="${NetRadiant_VERSION_PATCH}") add_definitions(-DRADIANT_ABOUTMSG="${NetRadiant_ABOUT}") diff --git a/Makefile b/Makefile index 1ead7257..fddd0049 100644 --- a/Makefile +++ b/Makefile @@ -241,10 +241,11 @@ endif endif # VERSION! -RADIANT_VERSION_NUMBER = 1.5.0 +RADIANT_MAJOR_VERSION = 1 +RADIANT_MINOR_VERSION = 5 +RADIANT_PATCH_VERSION = 0 +RADIANT_VERSION_NUMBER = $(RADIANT_MAJOR_VERSION).$(RADIANT_MINOR_VERSION).$(RADIANT_PATCH_VERSION) RADIANT_VERSION = $(RADIANT_VERSION_NUMBER)n -RADIANT_MAJOR_VERSION = 5 -RADIANT_MINOR_VERSION = 0 Q3MAP_VERSION = 2.5.17n # Executable extension @@ -256,7 +257,7 @@ ifneq ($(GIT_VERSION),) Q3MAP_VERSION := $(Q3MAP_VERSION)-git-$(GIT_VERSION) endif -CPPFLAGS += -DRADIANT_VERSION="\"$(RADIANT_VERSION)\"" -DRADIANT_MAJOR_VERSION="\"$(RADIANT_MAJOR_VERSION)\"" -DRADIANT_MINOR_VERSION="\"$(RADIANT_MINOR_VERSION)\"" -DRADIANT_ABOUTMSG="\"$(RADIANT_ABOUTMSG)\"" -DQ3MAP_VERSION="\"$(Q3MAP_VERSION)\"" -DRADIANT_EXECUTABLE="\"$(RADIANT_EXECUTABLE)\"" +CPPFLAGS += -DRADIANT_VERSION="\"$(RADIANT_VERSION)\"" -DRADIANT_MAJOR_VERSION="\"$(RADIANT_MAJOR_VERSION)\"" -DRADIANT_MINOR_VERSION="\"$(RADIANT_MINOR_VERSION)\"" -DRADIANT_PATCH_VERSION="\"$(RADIANT_PATCH_VERSION)\"" -DRADIANT_ABOUTMSG="\"$(RADIANT_ABOUTMSG)\"" -DQ3MAP_VERSION="\"$(Q3MAP_VERSION)\"" -DRADIANT_EXECUTABLE="\"$(RADIANT_EXECUTABLE)\"" .PHONY: all all: \ @@ -1058,8 +1059,9 @@ install-data: binaries $(MKDIR) $(INSTALLDIR)/games $(FIND) $(INSTALLDIR_BASE)/ -name .svn -exec $(RM_R) {} \; -prune DOWNLOAD_GAMEPACKS="$(DOWNLOAD_GAMEPACKS)" GIT="$(GIT)" SVN="$(SVN)" WGET="$(WGET)" RM_R="$(RM_R)" MV="$(MV)" UNZIPPER="$(UNZIPPER)" ECHO="$(ECHO)" SH="$(SH)" CP="$(CP)" CP_R="$(CP_R)" $(SH) install-gamepacks.sh "$(INSTALLDIR)" - $(ECHO) $(RADIANT_MINOR_VERSION) > $(INSTALLDIR)/RADIANT_MINOR $(ECHO) $(RADIANT_MAJOR_VERSION) > $(INSTALLDIR)/RADIANT_MAJOR + $(ECHO) $(RADIANT_MINOR_VERSION) > $(INSTALLDIR)/RADIANT_MINOR + $(ECHO) $(RADIANT_PATCH_VERSION) > $(INSTALLDIR)/RADIANT_PATCH $(CP_R) setup/data/tools/* $(INSTALLDIR)/ $(MKDIR) $(INSTALLDIR)/docs $(CP_R) docs/* $(INSTALLDIR)/docs/ diff --git a/include/version.h b/include/version.h index 47134512..3df8773e 100644 --- a/include/version.h +++ b/include/version.h @@ -8,3 +8,6 @@ #ifndef RADIANT_MINOR_VERSION #error no RADIANT_MINOR_VERSION defined #endif +#ifndef RADIANT_PATCH_VERSION +#error no RADIANT_PATCH_VERSION defined +#endif diff --git a/radiant/main.cpp b/radiant/main.cpp index c0486710..97fc2745 100644 --- a/radiant/main.cpp +++ b/radiant/main.cpp @@ -329,7 +329,7 @@ void paths_init(){ { StringOutputStream path( 256 ); - path << home << "1." << RADIANT_MAJOR_VERSION "." << RADIANT_MINOR_VERSION << '/'; + path << home << RADIANT_MAJOR_VERSION "." RADIANT_MINOR_VERSION "." RADIANT_PATCH_VERSION "/"; g_strSettingsPath = path.c_str(); } -- 2.39.2