From b6b5dabd54bbe27479a8944d3e5e452744244edb Mon Sep 17 00:00:00 2001 From: Carter Li Date: Thu, 24 Sep 2026 14:09:41 +0800 Subject: [PATCH] Packages (Windows): disables winget again --- CHANGELOG.md | 5 +++-- CMakeLists.txt | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c8307b94..2baf077a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,10 +66,11 @@ Features: * Improved COSMIC detection (DE / WM, Linux) * The version is now read from the `COSMIC_VERSION` environment variable when it is set. * Improved accuracy and performance of process name detection in the Top module. (Top, macOS) -* Improved Packages detection on Windows (Packages, Windows) - * `winget` is now detected by default, instead of requiring a build-time opt-in, and the source agreements are accepted non-interactively on a machine that has never accepted them. Opt out by setting `packages.disabled` to `["winget"]`, or by configuring with `cmake -DPACKAGES_DISABLE_WINGET=ON`. +* Improved `winget` Packages detection on Windows (Packages, Windows) + * The source agreements are accepted non-interactively on a machine that has never accepted them, so no user interaction is required for the first run. * The count reports the packages the `winget` source knows about, which is not limited to the packages `winget` itself installed. Microsoft Store apps are no longer counted. * `winget list` takes about 1.5 seconds, so its result is cached. The cache is refreshed when a program is installed or removed, not on a timer, so only the first run after such a change is slow. + * Note that `winget` is still disabled by default. It can be enabled by setting `packages.disabled` to an empty array or by configuring with `cmake -DPACKAGES_DISABLE_WINGET=OFF`. * Improved Wallpaper detection on macOS Sonoma and later (#2559, Wallpaper, macOS) * The image path is now also extracted from the `Configuration` field of the wallpaper plist, and the `NSWorkspace` fallback is used only as a last resort. * Removed the `kvm` dependency on OpenBSD by using `sysctl` directly. (General, OpenBSD) diff --git a/CMakeLists.txt b/CMakeLists.txt index 531a48cdd..762ef455d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -161,7 +161,11 @@ string(REGEX MATCHALL "FF_PACKAGES_FLAG_[A-Z]+_BIT" PACKAGE_MANAGERS "${PACKAGE_ string(REGEX REPLACE "FF_PACKAGES_FLAG_([A-Z]+)_BIT" "\\1" PACKAGE_MANAGERS "${PACKAGE_MANAGERS}") list(SORT PACKAGE_MANAGERS) foreach(package_manager ${PACKAGE_MANAGERS}) + if(package_manager STREQUAL "WINGET") + option(PACKAGES_DISABLE_${package_manager} "Disable ${package_manager} package manager detection by default" ON) + else() option(PACKAGES_DISABLE_${package_manager} "Disable ${package_manager} package manager detection by default" OFF) + endif() endforeach() option(PACKAGES_REMOVE_DISABLED "Remove disabled package managers from the build entirely, instead of just skipping them at runtime" OFF)