diff --git a/src/citron/main.cpp b/src/citron/main.cpp index 17f9bd1c2..a8411ab43 100644 --- a/src/citron/main.cpp +++ b/src/citron/main.cpp @@ -164,7 +164,9 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual #include "citron/play_time_manager.h" #include "citron/startup_checks.h" #include "citron/uisettings.h" +#ifdef _WIN32 #include "citron/updater/updater_dialog.h" +#endif #include "citron/updater/updater_service.h" #include "citron/util/clickable_label.h" #include "citron/util/performance_overlay.h" @@ -5562,6 +5564,7 @@ int main(int argc, char* argv[]) { } void GMainWindow::OnCheckForUpdates() { +#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 std::string update_url = "http://releases.citron-emu.org/api/check"; @@ -5571,6 +5574,10 @@ void GMainWindow::OnCheckForUpdates() { updater_dialog->setAttribute(Qt::WA_DeleteOnClose); updater_dialog->show(); updater_dialog->CheckForUpdates(update_url); +#else + QMessageBox::information(this, tr("Updates"), + tr("The update dialog is only available on Windows in this build.")); +#endif } void GMainWindow::CheckForUpdatesAutomatically() { diff --git a/src/citron/updater/updater_dialog.cpp b/src/citron/updater/updater_dialog.cpp index 59290522e..f8c3ecc5f 100644 --- a/src/citron/updater/updater_dialog.cpp +++ b/src/citron/updater/updater_dialog.cpp @@ -1,3 +1,4 @@ +#ifdef _WIN32 // SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -350,4 +351,6 @@ QString UpdaterDialog::GetUpdateMessage(Updater::UpdaterService::UpdateResult re } } -#include "updater_dialog.moc" \ No newline at end of file +#include "updater_dialog.moc" + +#endif // _WIN32 diff --git a/src/citron/updater/updater_dialog.h b/src/citron/updater/updater_dialog.h index c22d269df..ec87be138 100644 --- a/src/citron/updater/updater_dialog.h +++ b/src/citron/updater/updater_dialog.h @@ -3,6 +3,8 @@ #pragma once +#ifdef _WIN32 + #include #include #include @@ -83,4 +85,6 @@ private: qint64 total_download_size = 0; qint64 downloaded_bytes = 0; QTimer* progress_timer; -}; \ No newline at end of file +}; + +#endif // _WIN32 \ No newline at end of file diff --git a/src/citron/updater/updater_service.cpp b/src/citron/updater/updater_service.cpp index e9c8ff59a..ef075e794 100644 --- a/src/citron/updater/updater_service.cpp +++ b/src/citron/updater/updater_service.cpp @@ -594,12 +594,19 @@ bool UpdaterService::ExtractArchive(const std::filesystem::path& archive_path, c return !cancel_requested.load(); #else +#ifdef _WIN32 // Windows fallback: use system 7zip or PowerShell return ExtractArchiveWindows(archive_path, extract_path); +#else + LOG_ERROR(Frontend, "Archive extraction requires libarchive on this platform."); + (void)archive_path; + (void)extract_path; + return false; +#endif #endif } -#ifndef CITRON_ENABLE_LIBARCHIVE +#if defined(_WIN32) && !defined(CITRON_ENABLE_LIBARCHIVE) bool UpdaterService::ExtractArchiveWindows(const std::filesystem::path& archive_path, const std::filesystem::path& extract_path) { // Create extraction directory EnsureDirectoryExists(extract_path); @@ -921,5 +928,6 @@ bool UpdaterService::ApplyStagedUpdate(const std::filesystem::path& app_director } } // namespace Updater - -#include "updater_service.moc" \ No newline at end of file +#ifdef _WIN32 +#include "updater_service.moc" +#endif \ No newline at end of file diff --git a/src/citron/updater/updater_service.h b/src/citron/updater/updater_service.h index b1a405269..07c0cdda9 100644 --- a/src/citron/updater/updater_service.h +++ b/src/citron/updater/updater_service.h @@ -86,7 +86,7 @@ private: // File operations bool ExtractArchive(const std::filesystem::path& archive_path, const std::filesystem::path& extract_path); -#ifndef CITRON_ENABLE_LIBARCHIVE +#if defined(_WIN32) && !defined(CITRON_ENABLE_LIBARCHIVE) bool ExtractArchiveWindows(const std::filesystem::path& archive_path, const std::filesystem::path& extract_path); #endif bool InstallUpdate(const std::filesystem::path& update_path); diff --git a/src/video_core/vulkan_common/vulkan.h b/src/video_core/vulkan_common/vulkan.h index 62aa13291..667cb80ed 100644 --- a/src/video_core/vulkan_common/vulkan.h +++ b/src/video_core/vulkan_common/vulkan.h @@ -24,3 +24,8 @@ #undef False #undef None #undef True +#undef Success +#undef KeyPress +#undef KeyRelease +#undef FocusIn +#undef FocusOut