mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Reading the version directly from the VERSION file
This commit is contained in:
parent
7f0746f14f
commit
9f968d2481
|
@ -2098,13 +2098,20 @@ void GuiMenu::addVersionInfo()
|
||||||
#if defined(ANDROID_LITE_RELEASE)
|
#if defined(ANDROID_LITE_RELEASE)
|
||||||
const std::string applicationName {"ES-DE LITE"};
|
const std::string applicationName {"ES-DE LITE"};
|
||||||
#else
|
#else
|
||||||
const std::string applicationName {"ES-DE"};
|
const std::string applicationName {"RetroDECK"};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(IS_PRERELEASE)
|
#if defined(IS_PRERELEASE)
|
||||||
mVersion.setText(applicationName + " V" + Utils::String::toUpper(PROGRAM_VERSION_STRING) +
|
mVersion.setText(applicationName + " V" + Utils::String::toUpper(PROGRAM_VERSION_STRING) +
|
||||||
" (Built " + __DATE__ + ")");
|
" (Built " + __DATE__ + ")");
|
||||||
#else
|
#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));
|
mVersion.setText(applicationName + " V" + Utils::String::toUpper(PROGRAM_VERSION_STRING));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue