From 9f968d248131928d069028788998e875bbf1a884 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Tue, 20 Feb 2024 21:37:30 +0100 Subject: [PATCH] Reading the version directly from the VERSION file --- es-app/src/guis/GuiMenu.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index 65eb1da6b..43fe3e63a 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -2098,13 +2098,20 @@ void GuiMenu::addVersionInfo() #if defined(ANDROID_LITE_RELEASE) const std::string applicationName {"ES-DE LITE"}; #else - const std::string applicationName {"ES-DE"}; + const std::string applicationName {"RetroDECK"}; #endif #if defined(IS_PRERELEASE) mVersion.setText(applicationName + " V" + Utils::String::toUpper(PROGRAM_VERSION_STRING) + " (Built " + __DATE__ + ")"); #else + std::ifstream file("/app/retrodeck/version"); + std::string version; + std::getline(file, version); + file.close(); + #undef PROGRAM_VERSION_STRING + #define PROGRAM_VERSION_STRING version.c_str() + std::cout << PROGRAM_VERSION_STRING << std::endl; mVersion.setText(applicationName + " V" + Utils::String::toUpper(PROGRAM_VERSION_STRING)); #endif