diff --git a/CMakeLists.txt b/CMakeLists.txt index a45ae6d0..fd77d671 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -176,6 +176,10 @@ option(ASSERTS "Enable assert()s" ON) # Development build can be enabled/disabled regardless of build type option(DEV_BUILD "Enable development build (enables some debugging tools, local setting paths, etc.)" OFF) +# Official build - changes text on the crash screen +# PLEASE DO NOT USE ON UNOFFICIAL BUILDS. Thanks. +option(OFFICIAL_BUILD "Official build (changes crash screen text)" OFF) + # Portable build - load all data from current directory option(PORTABLE "Portable build" OFF) diff --git a/src/app/signal_handlers.cpp b/src/app/signal_handlers.cpp index f685a587..a2f4e921 100644 --- a/src/app/signal_handlers.cpp +++ b/src/app/signal_handlers.cpp @@ -133,8 +133,12 @@ void CSignalHandlers::ReportError(const std::string& errorMessage) msg << "including information on what you were doing before this happened and all the information below." << std::endl; msg << "==============================" << std::endl; #if BUILD_NUMBER == 0 - // COLOBOT_VERSION_DISPLAY doesn't update if you don't run CMake after "git pull" - msg << "You seem to be running a custom compilation of version " << COLOBOT_VERSION_DISPLAY << ", but please verify that." << std::endl; + #ifdef OFFICIAL_BUILD + msg << "You are running official " << COLOBOT_VERSION_DISPLAY << " build." << std::endl; + #else + // COLOBOT_VERSION_DISPLAY doesn't update if you don't run CMake after "git pull" + msg << "You seem to be running a custom compilation of version " << COLOBOT_VERSION_DISPLAY << ", but please verify that." << std::endl; + #endif #else msg << "You are running version " << COLOBOT_VERSION_DISPLAY << " from CI build #" << BUILD_NUMBER << std::endl; #endif diff --git a/src/common/version.h.cmake b/src/common/version.h.cmake index 5749421e..ad3714b3 100644 --- a/src/common/version.h.cmake +++ b/src/common/version.h.cmake @@ -4,3 +4,4 @@ #define COLOBOT_VERSION_DISPLAY "@COLOBOT_VERSION_DISPLAY@" #define BUILD_NUMBER @BUILD_NUMBER@ +#cmakedefine OFFICIAL_BUILD