From 1bcabda8852d37fc85277cb577cb2f6559fb6e01 Mon Sep 17 00:00:00 2001 From: Zephyron Date: Thu, 25 Sep 2025 16:22:16 +1000 Subject: [PATCH] fix: resolve UpdaterDialog linker errors when auto updater disabled Wrap updater includes and usage in CITRON_USE_AUTO_UPDATER guards to prevent unresolved external symbol errors when the updater functionality is not enabled. Signed-off-by: Zephyron --- src/citron/main.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/citron/main.cpp b/src/citron/main.cpp index 97baf4b4e..3400d4a6e 100644 --- a/src/citron/main.cpp +++ b/src/citron/main.cpp @@ -164,10 +164,10 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual #include "citron/play_time_manager.h" #include "citron/startup_checks.h" #include "citron/uisettings.h" -#ifdef _WIN32 +#ifdef CITRON_USE_AUTO_UPDATER #include "citron/updater/updater_dialog.h" -#endif #include "citron/updater/updater_service.h" +#endif #include "citron/util/clickable_label.h" #include "citron/util/performance_overlay.h" #include "citron/util/vram_overlay.h" @@ -5579,6 +5579,7 @@ int main(int argc, char* argv[]) { } void GMainWindow::OnCheckForUpdates() { +#ifdef CITRON_USE_AUTO_UPDATER #ifdef _WIN32 // Use HTTP URL to bypass SSL issues (will be redirected to HTTPS but handled by updater) // TODO: Fix SSL libraries and revert to https://releases.citron-emu.org/api/check @@ -5593,6 +5594,10 @@ void GMainWindow::OnCheckForUpdates() { QMessageBox::information(this, tr("Updates"), tr("The update dialog is only available on Windows in this build.")); #endif +#else + QMessageBox::information(this, tr("Updates"), + tr("The automatic updater is not enabled in this build.")); +#endif } void GMainWindow::CheckForUpdatesAutomatically() {