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

View file

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

View file

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