From 11b907ebf45f5a0707c2748b8f7413b2910976a8 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Sun, 24 Apr 2011 12:34:57 -0400 Subject: CREATE_PROJECT: Update revision number support (fixes bug #3280881) Replace existing environment variable based revision number support by a file-based method - Generate a special header file in the build output folder with the current revision number - Include the new header file from internal_version.h when a specific define is set - Update create_project to define SCUMMVM_INTERNAL_REVISION as needed and add the build output folder to the include path - Remove support for git-svn clones in the revision script (not useful anymore after the switch to git) --- base/internal_revision.h.in | 6 ++++++ base/internal_version.h | 6 ++++++ base/internal_version.h.in | 6 ++++++ 3 files changed, 18 insertions(+) create mode 100644 base/internal_revision.h.in (limited to 'base') diff --git a/base/internal_revision.h.in b/base/internal_revision.h.in new file mode 100644 index 0000000000..63f58a4b77 --- /dev/null +++ b/base/internal_revision.h.in @@ -0,0 +1,6 @@ +#ifndef SCUMMVM_INTERNAL_REVISION_H +#define SCUMMVM_INTERNAL_REVISION_H + +#define SCUMMVM_REVISION "@REVISION@" + +#endif diff --git a/base/internal_version.h b/base/internal_version.h index fc7b5350f5..36cdcdeb39 100644 --- a/base/internal_version.h +++ b/base/internal_version.h @@ -2,6 +2,12 @@ #error This file may only be included by base/version.cpp #endif +// Reads revision number from file +// (this is used when building with Visual Studio) +#ifdef SCUMMVM_INTERNAL_REVISION +#include "internal_revision.h" +#endif + #ifdef RELEASE_BUILD #undef SCUMMVM_REVISION #endif diff --git a/base/internal_version.h.in b/base/internal_version.h.in index 5eb3c904ee..e2b46f54ce 100644 --- a/base/internal_version.h.in +++ b/base/internal_version.h.in @@ -2,6 +2,12 @@ #error This file may only be included by base/version.cpp #endif +// Reads revision number from file +// (this is used when building with Visual Studio) +#ifdef SCUMMVM_INTERNAL_REVISION +#include "internal_revision.h" +#endif + #ifdef RELEASE_BUILD #undef SCUMMVM_REVISION #endif -- cgit v1.2.3