From 954f1aa4f80a9e0c5d38a89619b07097793609af Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 19 Apr 2022 17:27:04 +0200 Subject: [PATCH] Added the build date to to main menu for alpha and dev builds. --- CMakeLists.txt | 5 +++++ es-app/src/guis/GuiMenu.cpp | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index bfbaa76d5..829563ed6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -309,6 +309,11 @@ if(APPLE AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.14) add_compile_definitions(LEGACY_MACOS) endif() +# If it's an alpha or dev build, then display the build date in the main menu. +if(ES_VERSION MATCHES alpha OR ES_VERSION MATCHES dev) + add_compile_definitions(MENU_BUILD_DATE) +endif() + # GLM library options. add_compile_definitions(GLM_FORCE_CXX17) add_compile_definitions(GLM_FORCE_XYZW_ONLY) diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index c2c402393..e526957c3 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -1384,7 +1384,14 @@ void GuiMenu::addVersionInfo() { mVersion.setFont(Font::get(FONT_SIZE_SMALL)); mVersion.setColor(0x5E5E5EFF); + +#if defined(MENU_BUILD_DATE) + mVersion.setText("EMULATIONSTATION-DE V" + Utils::String::toUpper(PROGRAM_VERSION_STRING) + + " (Built " + __DATE__ + ")"); +#else mVersion.setText("EMULATIONSTATION-DE V" + Utils::String::toUpper(PROGRAM_VERSION_STRING)); +#endif + mVersion.setHorizontalAlignment(ALIGN_CENTER); addChild(&mVersion); }