(Android) Some customizations for the Lite release

This commit is contained in:
Leon Styhre 2023-12-25 23:23:39 +01:00
parent 99c5be8a39
commit 88778e47a5
3 changed files with 40 additions and 12 deletions

View file

@ -1718,12 +1718,23 @@ void GuiMenu::openUtilities()
ComponentListRow row;
#if defined(ANDROID_LITE_RELEASE)
auto orphanedDataCleanup =
std::make_shared<TextComponent>("ORPHANED DATA CLEANUP (FULL VERSION ONLY)",
Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary);
orphanedDataCleanup->setOpacity(DISABLED_OPACITY);
row.addElement(orphanedDataCleanup, true);
auto orphanedDataCleanupArrow = mMenu.makeArrow();
orphanedDataCleanupArrow->setOpacity(DISABLED_OPACITY);
row.addElement(orphanedDataCleanupArrow, false);
#else
row.addElement(std::make_shared<TextComponent>("ORPHANED DATA CLEANUP",
Font::get(FONT_SIZE_MEDIUM), mMenuColorPrimary),
true);
row.addElement(mMenu.makeArrow(), false);
row.makeAcceptInputHandler(std::bind(
[this] { mWindow->pushGui(new GuiOrphanedDataCleanup([&]() { close(true); })); }));
#endif
s->addRow(row);
row.elements.clear();
@ -1897,11 +1908,17 @@ void GuiMenu::addVersionInfo()
mVersion.setFont(Font::get(FONT_SIZE_SMALL));
mVersion.setColor(mMenuColorTertiary);
#if defined(IS_PRERELEASE)
mVersion.setText("ES-DE V" + Utils::String::toUpper(PROGRAM_VERSION_STRING) + " (Built " +
__DATE__ + ")");
#if defined(ANDROID_LITE_RELEASE)
const std::string applicationName {"ES-DE LITE"};
#else
mVersion.setText("ES-DE V" + Utils::String::toUpper(PROGRAM_VERSION_STRING));
const std::string applicationName {"ES-DE"};
#endif
#if defined(IS_PRERELEASE)
mVersion.setText(applicationName + " V" + Utils::String::toUpper(PROGRAM_VERSION_STRING) +
" (Built " + __DATE__ + ")");
#else
mVersion.setText(applicationName + " V" + Utils::String::toUpper(PROGRAM_VERSION_STRING));
#endif
mVersion.setHorizontalAlignment(ALIGN_CENTER);

View file

@ -630,14 +630,21 @@ int main(int argc, char* argv[])
// Start the logger.
Log::init();
Log::open();
LOG(LogInfo) << "ES-DE v" << PROGRAM_VERSION_STRING << " (r" << PROGRAM_RELEASE_NUMBER
<< "), built " << PROGRAM_BUILT_STRING;
if (portableMode) {
LOG(LogInfo) << "Running in portable mode";
Settings::getInstance()->setBool("PortableMode", true);
}
else {
Settings::getInstance()->setBool("PortableMode", false);
{
#if defined(ANDROID_LITE_RELEASE)
const std::string applicationName {"ES-DE Lite"};
#else
const std::string applicationName {"ES-DE"};
#endif
LOG(LogInfo) << applicationName << " v" << PROGRAM_VERSION_STRING << " (r"
<< PROGRAM_RELEASE_NUMBER << "), built " << PROGRAM_BUILT_STRING;
if (portableMode) {
LOG(LogInfo) << "Running in portable mode";
Settings::getInstance()->setBool("PortableMode", true);
}
else {
Settings::getInstance()->setBool("PortableMode", false);
}
}
// Always close the log on exit.

View file

@ -866,6 +866,10 @@ void Window::stopMediaViewer()
void Window::startPDFViewer(FileData* game)
{
if (mPDFViewer) {
#if defined(ANDROID_LITE_RELEASE)
queueInfoPopup("PDF VIEWER ONLY AVAILABLE IN FULL VERSION", 6000);
return;
#endif
if (mPDFViewer->startPDFViewer(game)) {
setAllowTextScrolling(false);
setAllowFileAnimation(false);