fix: Linux compiling

Made it so that the updater stuff is windows only.

Signed-off-by: Boss.sfc <boss.sfc@citron-emu.org>
This commit is contained in:
Boss.sfc
2025-09-14 18:46:18 +07:00
parent 94119302ec
commit a3c4f0614a
6 changed files with 33 additions and 6 deletions

View File

@@ -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"
#ifdef _WIN32
#include "updater_service.moc"
#endif