Add a release version string to rev.cpp

This commit is contained in:
Jonathan G Rennison
2021-09-06 17:49:08 +01:00
parent fda17d25de
commit a0cb27b73c
4 changed files with 29 additions and 8 deletions

View File

@@ -140,15 +140,17 @@ char *CrashLog::LogOpenTTDVersion(char *buffer, const char *last) const
{
return buffer + seprintf(buffer, last,
"OpenTTD version:\n"
" Version: %s (%d)\n"
" NewGRF ver: %08x\n"
" Bits: %d\n"
" Endian: %s\n"
" Dedicated: %s\n"
" Build date: %s\n"
" Defines: %s\n\n",
" Version: %s (%d)\n"
" Release ver: %s\n"
" NewGRF ver: %08x\n"
" Bits: %d\n"
" Endian: %s\n"
" Dedicated: %s\n"
" Build date: %s\n"
" Defines: %s\n\n",
_openttd_revision,
_openttd_revision_modified,
_openttd_release_version,
_openttd_newgrf_version,
#ifdef _SQ64
64,

View File

@@ -37,6 +37,8 @@ bool IsReleasedVersion()
*/
const char _openttd_revision[] = "${REV_VERSION}";
const char _openttd_release_version[] = "${REV_RELEASE}";
/**
* The text version of OpenTTD's build date.
* Updating the build date in this file is the safest as it generally gets

View File

@@ -11,6 +11,7 @@
#define REV_H
extern const char _openttd_revision[];
extern const char _openttd_release_version[];
extern const char _openttd_build_date[];
extern const char _openttd_revision_hash[];
extern const char _openttd_revision_year[];