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 <zephyron@citron-emu.org>
This commit is contained in:
Zephyron
2025-09-25 16:22:16 +10:00
parent f966f84fd7
commit 1bcabda885

View File

@@ -164,10 +164,10 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual
#include "citron/play_time_manager.h" #include "citron/play_time_manager.h"
#include "citron/startup_checks.h" #include "citron/startup_checks.h"
#include "citron/uisettings.h" #include "citron/uisettings.h"
#ifdef _WIN32 #ifdef CITRON_USE_AUTO_UPDATER
#include "citron/updater/updater_dialog.h" #include "citron/updater/updater_dialog.h"
#endif
#include "citron/updater/updater_service.h" #include "citron/updater/updater_service.h"
#endif
#include "citron/util/clickable_label.h" #include "citron/util/clickable_label.h"
#include "citron/util/performance_overlay.h" #include "citron/util/performance_overlay.h"
#include "citron/util/vram_overlay.h" #include "citron/util/vram_overlay.h"
@@ -5579,6 +5579,7 @@ int main(int argc, char* argv[]) {
} }
void GMainWindow::OnCheckForUpdates() { void GMainWindow::OnCheckForUpdates() {
#ifdef CITRON_USE_AUTO_UPDATER
#ifdef _WIN32 #ifdef _WIN32
// Use HTTP URL to bypass SSL issues (will be redirected to HTTPS but handled by updater) // 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 // 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"), QMessageBox::information(this, tr("Updates"),
tr("The update dialog is only available on Windows in this build.")); tr("The update dialog is only available on Windows in this build."));
#endif #endif
#else
QMessageBox::information(this, tr("Updates"),
tr("The automatic updater is not enabled in this build."));
#endif
} }
void GMainWindow::CheckForUpdatesAutomatically() { void GMainWindow::CheckForUpdatesAutomatically() {