From 8c6f9e5116dc6f46e166d8a32f9a9b905ea8634c Mon Sep 17 00:00:00 2001 From: Cameron Cawley Date: Tue, 13 Nov 2018 18:48:54 +0000 Subject: WIN32: Retrieve the version information for the resource script from base/internal_version.h --- base/internal_version.h | 10 +++++++--- base/internal_version.h.in | 10 +++++++--- base/version.cpp | 12 ++++++------ 3 files changed, 20 insertions(+), 12 deletions(-) (limited to 'base') diff --git a/base/internal_version.h b/base/internal_version.h index 5a4b8ad986..80f839f0e4 100644 --- a/base/internal_version.h +++ b/base/internal_version.h @@ -1,5 +1,5 @@ -#ifndef INCLUDED_FROM_BASE_VERSION_CPP -#error This file may only be included by base/version.cpp +#if !defined(INCLUDED_FROM_BASE_VERSION_CPP) && !defined(RC_INVOKED) +#error This file may only be included by base/version.cpp or dists/scummvm.rc #endif // Reads revision number from file @@ -16,4 +16,8 @@ #define SCUMMVM_REVISION #endif -#define SCUMMVM_VERSION "2.1.0git" SCUMMVM_REVISION +#define SCUMMVM_VERSION "2.1.0git" + +#define SCUMMVM_VER_MAJOR 2 +#define SCUMMVM_VER_MINOR 1 +#define SCUMMVM_VER_PATCH 0 diff --git a/base/internal_version.h.in b/base/internal_version.h.in index e2b46f54ce..01a62cd2d0 100644 --- a/base/internal_version.h.in +++ b/base/internal_version.h.in @@ -1,5 +1,5 @@ -#ifndef INCLUDED_FROM_BASE_VERSION_CPP -#error This file may only be included by base/version.cpp +#if !defined(INCLUDED_FROM_BASE_VERSION_CPP) && !defined(RC_INVOKED) +#error This file may only be included by base/version.cpp or dists/scummvm.rc #endif // Reads revision number from file @@ -16,4 +16,8 @@ #define SCUMMVM_REVISION #endif -#define SCUMMVM_VERSION "@VERSION@" SCUMMVM_REVISION +#define SCUMMVM_VERSION "@VERSION@" + +#define SCUMMVM_VER_MAJOR @VER_MAJOR@ +#define SCUMMVM_VER_MINOR @VER_MINOR@ +#define SCUMMVM_VER_PATCH @VER_PATCH@ diff --git a/base/version.cpp b/base/version.cpp index 43795294ba..1b9cfe4628 100644 --- a/base/version.cpp +++ b/base/version.cpp @@ -55,18 +55,18 @@ * I don't know VC enough to be sure). And of course it must be robust enough * to properly work in exports (i.e. release tar balls etc.). */ -const char *gScummVMVersion = SCUMMVM_VERSION; +const char *gScummVMVersion = SCUMMVM_VERSION SCUMMVM_REVISION; #ifdef __amigaos4__ -static const char *version_cookie __attribute__((used)) = "$VER: ScummVM " SCUMMVM_VERSION " (" AMIGA_DATE ")"; +static const char *version_cookie __attribute__((used)) = "$VER: ScummVM " SCUMMVM_VERSION SCUMMVM_REVISION " (" AMIGA_DATE ")"; #endif #ifdef __PLAYSTATION2__ const char *gScummVMBuildDate = "Git Master"; /* ScummVM Git Master */ -const char *gScummVMVersionDate = SCUMMVM_VERSION " - PlayStation2"; -const char *gScummVMFullVersion = "ScummVM " SCUMMVM_VERSION " - PlayStation2"; +const char *gScummVMVersionDate = SCUMMVM_VERSION SCUMMVM_REVISION " - PlayStation2"; +const char *gScummVMFullVersion = "ScummVM " SCUMMVM_VERSION SCUMMVM_REVISION " - PlayStation2"; #else const char *gScummVMBuildDate = __DATE__ " " __TIME__; -const char *gScummVMVersionDate = SCUMMVM_VERSION " (" __DATE__ " " __TIME__ ")"; -const char *gScummVMFullVersion = "ScummVM " SCUMMVM_VERSION " (" __DATE__ " " __TIME__ ")"; +const char *gScummVMVersionDate = SCUMMVM_VERSION SCUMMVM_REVISION " (" __DATE__ " " __TIME__ ")"; +const char *gScummVMFullVersion = "ScummVM " SCUMMVM_VERSION SCUMMVM_REVISION " (" __DATE__ " " __TIME__ ")"; #endif const char *gScummVMFeatures = "" #ifdef TAINTED_BUILD -- cgit v1.2.3