1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-26 06:28:30 +02:00

Add build type to -version

This adds the build type in brackets in `-version` output after e.g.
"VVVVVV v2.4". The build type is MAKEANDPLAY, NO_CUSTOM_LEVELS, or
NO_EDITOR (which are not necessarily mutually exclusive).

This is appended on to the end of the first line so as to not break
Ved's existing `-version` check which only checks if the beginning of
STDOUT is "VVVVVV" followed by any version number.
This commit is contained in:
Misa 2023-02-02 13:08:40 -08:00
parent 6665f4f8f6
commit 113fbb0fdb

View File

@ -397,7 +397,18 @@ int main(int argc, char *argv[])
if (ARG("-version"))
{
/* Just print the version and exit. No vlogging. */
puts("VVVVVV " RELEASE_VERSION);
puts(
"VVVVVV " RELEASE_VERSION
#ifdef MAKEANDPLAY
" [M&P]"
#endif
#ifdef NO_CUSTOM_LEVELS
" [no custom levels]"
#endif
#ifdef NO_EDITOR
" [no editor]"
#endif
);
#ifdef INTERIM_VERSION_EXISTS
puts(COMMIT_DATE);
puts(INTERIM_COMMIT);