From 113fbb0fdb5ea2d9b901dda5aa5b2f780afc9618 Mon Sep 17 00:00:00 2001 From: Misa Date: Thu, 2 Feb 2023 13:08:40 -0800 Subject: [PATCH] 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. --- desktop_version/src/main.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/desktop_version/src/main.cpp b/desktop_version/src/main.cpp index 79a51723..5739bb23 100644 --- a/desktop_version/src/main.cpp +++ b/desktop_version/src/main.cpp @@ -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);