From 81b449908e5af7c0873345f85edd5c634ecbce24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 6 Mar 2016 19:05:27 +0100 Subject: [PATCH] Add support for patch versions (2.0.x) (cherry picked from commit 706d576f7b24ec62effd59f66f1d7c47c813056b) --- core/typedefs.h | 4 ++++ methods.py | 2 ++ version.py | 3 --- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/typedefs.h b/core/typedefs.h index 50476446920..6f9bb589588 100644 --- a/core/typedefs.h +++ b/core/typedefs.h @@ -41,7 +41,11 @@ #define _MKSTR(m_x) _STR(m_x) #endif // have to include version.h for this to work, include it in the .cpp not the .h +#ifdef VERSION_PATCH +#define VERSION_MKSTRING _MKSTR(VERSION_MAJOR)"." _MKSTR(VERSION_MINOR)"." _MKSTR(VERSION_PATCH)"." _MKSTR(VERSION_STATUS)"." _MKSTR(VERSION_REVISION) +#else #define VERSION_MKSTRING _MKSTR(VERSION_MAJOR)"." _MKSTR(VERSION_MINOR)"." _MKSTR(VERSION_STATUS)"." _MKSTR(VERSION_REVISION) +#endif // VERSION_PATCH #define VERSION_FULL_NAME _MKSTR(VERSION_NAME)" v" VERSION_MKSTRING diff --git a/methods.py b/methods.py index e3cf51be844..39230b6e2f2 100755 --- a/methods.py +++ b/methods.py @@ -1096,6 +1096,8 @@ def update_version(): f.write("#define VERSION_NAME "+str(version.name)+"\n") f.write("#define VERSION_MAJOR "+str(version.major)+"\n") f.write("#define VERSION_MINOR "+str(version.minor)+"\n") + if (hasattr(version, 'patch')): + f.write("#define VERSION_PATCH "+str(version.patch)+"\n") f.write("#define VERSION_REVISION "+str(rev)+"\n") f.write("#define VERSION_STATUS "+str(version.status)+"\n") import datetime diff --git a/version.py b/version.py index 86e28ec51d7..ccab5ff8900 100644 --- a/version.py +++ b/version.py @@ -3,6 +3,3 @@ name="Godot Engine" major=2 minor=0 status="stable" - - -