diff --git a/Aquaria/AquariaCompileConfig.h b/Aquaria/AquariaCompileConfig.h index 194b230..a7b9cd6 100644 --- a/Aquaria/AquariaCompileConfig.h +++ b/Aquaria/AquariaCompileConfig.h @@ -12,6 +12,9 @@ #define AQUARIA_CUSTOM_BUILD_ID "" + // If defined, this is shown instead of "Aquaria vx.x.x ..." on the title screen. + //#define AQUARIA_OVERRIDE_VERSION_STRING "Aquaria OSE v1.000" + #endif diff --git a/Aquaria/DSQ.cpp b/Aquaria/DSQ.cpp index 0b7ca9f..838259c 100644 --- a/Aquaria/DSQ.cpp +++ b/Aquaria/DSQ.cpp @@ -844,7 +844,13 @@ void loadBitForTexPrecache() } -void DSQ::setVersionLabelText() { +void DSQ::setVersionLabelText() +{ +#ifdef AQUARIA_OVERRIDE_VERSION_STRING + versionLabel->setText(AQUARIA_OVERRIDE_VERSION_STRING); + return; +#endif + std::ostringstream os; os << "Aquaria"; diff --git a/Aquaria/Network.cpp b/Aquaria/Network.cpp index 6dba942..cbd2a84 100644 --- a/Aquaria/Network.cpp +++ b/Aquaria/Network.cpp @@ -146,6 +146,9 @@ static void init() #ifdef AQUARIA_CUSTOM_BUILD_ID os << AQUARIA_CUSTOM_BUILD_ID; #endif +#ifdef AQUARIA_OVERRIDE_VERSION_STRING + os << "|" << AQUARIA_OVERRIDE_VERSION_STRING; +#endif const char *loc = getUsedLocale(); if(*loc) diff --git a/CMakeLists.txt b/CMakeLists.txt index 624c0e9..665ae5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -222,6 +222,13 @@ if (NOT(AQUARIA_CUSTOM_BUILD_ID STREQUAL "")) ADD_DEFINITIONS("-DAQUARIA_CUSTOM_BUILD_ID=\"${AQUARIA_CUSTOM_BUILD_ID}\"") endif (NOT(AQUARIA_CUSTOM_BUILD_ID STREQUAL "")) +# Custom version string override (displayed as-is instead of "Aquaria vx.x.x ..." on the title screen +SET(AQUARIA_OVERRIDE_VERSION_STRING "" CACHE STRING + "Text to display instead of the Aquaria version ID on the title screen. (Overrides AQUARIA_CUSTOM_BUILD_ID as well)") +if (NOT(AQUARIA_OVERRIDE_VERSION_STRING STREQUAL "")) + ADD_DEFINITIONS("-AQUARIA_OVERRIDE_VERSION_STRING=\"${AQUARIA_OVERRIDE_VERSION_STRING}\"") +endif (NOT(AQUARIA_OVERRIDE_VERSION_STRING STREQUAL "")) + # Custom data directories SET(AQUARIA_DEFAULT_DATA_DIR "" CACHE STRING "Default data directory (for package maintainers only)")