mirror of https://github.com/OpenTTD/OpenTTD
(svn r17416) -Codechange: move the build date/time 'determination' to rev.cpp as that's the file most likely to be regularly recompiled
parent
e540385038
commit
a1f49db54d
|
@ -292,7 +292,7 @@ static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep)
|
||||||
output += seprintf(output, last,
|
output += seprintf(output, last,
|
||||||
"*** OpenTTD Crash Report ***\r\n"
|
"*** OpenTTD Crash Report ***\r\n"
|
||||||
"Date: %d-%.2d-%.2d %.2d:%.2d:%.2d\r\n"
|
"Date: %d-%.2d-%.2d %.2d:%.2d:%.2d\r\n"
|
||||||
"Build: %s (%d) built on " __DATE__ " " __TIME__ "\r\n",
|
"Build: %s (%d) built on %s\r\n",
|
||||||
time.wYear,
|
time.wYear,
|
||||||
time.wMonth,
|
time.wMonth,
|
||||||
time.wDay,
|
time.wDay,
|
||||||
|
@ -300,7 +300,8 @@ static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep)
|
||||||
time.wMinute,
|
time.wMinute,
|
||||||
time.wSecond,
|
time.wSecond,
|
||||||
_openttd_revision,
|
_openttd_revision,
|
||||||
_openttd_revision_modified
|
_openttd_revision_modified,
|
||||||
|
_openttd_build_date
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -437,7 +438,8 @@ static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep)
|
||||||
MINIDUMP_EXCEPTION_INFORMATION mdei;
|
MINIDUMP_EXCEPTION_INFORMATION mdei;
|
||||||
MINIDUMP_USER_STREAM userstream;
|
MINIDUMP_USER_STREAM userstream;
|
||||||
MINIDUMP_USER_STREAM_INFORMATION musi;
|
MINIDUMP_USER_STREAM_INFORMATION musi;
|
||||||
char msg[] = "****** Built on " __DATE__ " " __TIME__ ". ******";
|
char msg[64];
|
||||||
|
seprintf(msg, lastof(msg), "****** Built on %s. ******", _openttd_build_date);
|
||||||
|
|
||||||
userstream.Type = LastReservedStream + 1;
|
userstream.Type = LastReservedStream + 1;
|
||||||
userstream.Buffer = msg;
|
userstream.Buffer = msg;
|
||||||
|
|
|
@ -29,6 +29,14 @@
|
||||||
*/
|
*/
|
||||||
const char _openttd_revision[] = "!!VERSION!!";
|
const char _openttd_revision[] = "!!VERSION!!";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The text version of OpenTTD's build date.
|
||||||
|
* Updating the build date in this file is the safest as it generally gets
|
||||||
|
* updated for each revision in contrary to most other files that only see
|
||||||
|
* updates when they are actually changed themselves.
|
||||||
|
*/
|
||||||
|
const char _openttd_build_date[] = __DATE__ " " __TIME__;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Let us know if current build was modified. This detection
|
* Let us know if current build was modified. This detection
|
||||||
* works even in the case when revision string is overriden by
|
* works even in the case when revision string is overriden by
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#define REV_H
|
#define REV_H
|
||||||
|
|
||||||
extern const char _openttd_revision[];
|
extern const char _openttd_revision[];
|
||||||
|
extern const char _openttd_build_date[];
|
||||||
extern const byte _openttd_revision_modified;
|
extern const byte _openttd_revision_modified;
|
||||||
extern const uint32 _openttd_newgrf_version;
|
extern const uint32 _openttd_newgrf_version;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue