Skip to content

Add a setup guide for each package manager and link it from the status card - #5669

Merged
Gabriel Dufresne (GabrielDuf) merged 2 commits into
mainfrom
feature/package-manager-setup-guide
Nov 3, 2026
Merged

Gabriel Dufresne (GabrielDuf) merged 2 commits into
mainfrom
feature/package-manager-setup-guide

Conversation

@GabrielDuf

@GabrielDuf Gabriel Dufresne (GabrielDuf) commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

When a package manager was missing, its settings page said "{pm} was not found! You may need to install {pm}" and offered nothing else. This adds a setup guide and links it from that status card.

The Cargo example in the issue (cargo-update, cargo-binstall, MSVC link.exe) was already fixed by #5569. Those tools are no longer needed, and the guide says so.

The guide: docs/PACKAGE_MANAGERS.md

  • Covers every manager: what to install, how UniGetUI finds it (PATH on each OS, plus the extra folders it searches), what UniGetUI installs on its own, and a command to check it works.
  • Every statement was checked against the code, or against the vendor's docs for third-party facts. Anything that couldn't be confirmed was left out.
  • Every winget id and Homebrew package was looked up against winget and the Homebrew API.

The status card

  • When a manager isn't ready (disabled included), the card shows How to set up {pm}, which opens that manager's section of the guide.
  • When no executable is found and the manager has a one-line install, the card also shows the command with Open in a terminal. That reuses ManualInstallHelper: it copies the command and opens a terminal with it already typed in.
  • If a manager is installed but fails to start, the card shows only the guide link, no install command.
  • Scoop shows no command on the card. Its page already has Install Scoop, and Scoop's installer only works in a non-admin PowerShell.

Where the data lives

Each manager now sets SetupGuide and InstallCommands on ManagerProperties in its constructor, so its setup data sits with the manager.

Tests

  • UniGetUI.PackageEngine.Tests builds every manager. Apt, Dnf and Pacman are now referenced by that project.
    • Each manager's guide section must exist as a heading (headings inside code blocks are ignored).
    • Its commands must match the guide word for word.
    • No manager may offer a command for an OS it doesn't run on.
    • A scan of the manager assemblies fails when a new manager is missing from the list.
  • UniGetUI.Tests covers when the card shows the guide link and the command, and the guide URL.
  • Both suites and both dotnet format checks pass locally.
  • I haven't checked the new card in the running app.

Notes

  • The guide links point at main, so they won't open until this is merged.
  • Not fixed here: Pip's extra-folder search on Windows can't find Python3xx\python.exe subfolders, so Python is only found through PATH.

Closes #5516

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Installation options can appear for managers that are already present, and suggested commands may rely on missing winget or brew prerequisites.

2 open issues
What changed in this PR

Adds centralized package-manager setup guidance and links it from UniGetUI’s settings status cards, addressing #5516. The Cargo instructions reflect the removal of helper-tool requirements in #5569.

Changes:

  • Documents installation, executable discovery, prerequisites, and verification for supported managers.
  • Adds manager-owned guide links and platform-specific install commands, exposed through the status card.
  • Adds tests for guide references, command consistency, platform restrictions, and setup-help visibility.
File Description
src/​UniGetUI.Tests/​PackageManagerSetupHelpTests.cs Tests setup-help visibility and guide URLs.
src/​UniGetUI.PackageEngine.Tests/​UniGetUI.PackageEngine.Tests.csproj Adds Apt, Dnf, and Pacman test references.
src/​UniGetUI.PackageEngine.Tests/​ManagerSetupGuideTests.cs Checks manager coverage, guide headings, and commands.
src/​UniGetUI.PackageEngine.Managers.WinInstaller/​WinInstaller.cs Links to Windows installer-feed documentation.
src/​UniGetUI.PackageEngine.Managers.WinGet/​WinGet.cs Adds the WinGet guide link.
src/​UniGetUI.PackageEngine.Managers.Vcpkg/​Vcpkg.cs Adds the vcpkg guide link.
src/​UniGetUI.PackageEngine.Managers.Snap/​Snap.cs Adds the Snap guide link.
src/​UniGetUI.PackageEngine.Managers.Scoop/​Scoop.cs Adds the Scoop guide link.
src/​UniGetUI.PackageEngine.Managers.PowerShell7/​PowerShell7.cs Adds setup guidance and Windows/macOS commands.
src/​UniGetUI.PackageEngine.Managers.PowerShell/​PowerShell.cs Adds the Windows PowerShell guide link.
src/​UniGetUI.PackageEngine.Managers.Pip/​Pip.cs Adds setup guidance and Python install commands.
src/​UniGetUI.PackageEngine.Managers.Pacman/​Pacman.cs Adds the Pacman guide link.
src/​UniGetUI.PackageEngine.Managers.Npm/​Npm.cs Adds setup guidance and Node.js install commands.
src/​UniGetUI.PackageEngine.Managers.MacPkg/​MacPkg.cs Links to macOS installer-feed documentation.
src/​UniGetUI.PackageEngine.Managers.Homebrew/​Homebrew.cs Adds setup guidance and the Homebrew install command.
src/​UniGetUI.PackageEngine.Managers.Flatpak/​Flatpak.cs Adds the Flatpak guide link.
src/​UniGetUI.PackageEngine.Managers.Dotnet/​DotNet.cs Adds setup guidance and .NET SDK install commands.
src/​UniGetUI.PackageEngine.Managers.Dnf/​Dnf.cs Adds the Dnf guide link.
src/​UniGetUI.PackageEngine.Managers.Chocolatey/​Chocolatey.cs Adds setup guidance and a Windows install command.
src/​UniGetUI.PackageEngine.Managers.Cargo/​Cargo.cs Adds setup guidance and a Windows rustup command.
src/​UniGetUI.PackageEngine.Managers.Bun/​Bun.cs Adds setup guidance and Windows/macOS commands.
src/​UniGetUI.PackageEngine.Managers.Apt/​Apt.cs Adds the Apt guide link.
src/​UniGetUI.PackageEngine.Interfaces/​ManagerProperties.cs Stores each manager’s setup metadata.
src/​UniGetUI.PackageEngine.Interfaces/​ManagerInstallCommands.cs Selects install commands by operating system.
src/​UniGetUI.Avalonia/​Views/​Pages/​SettingsPages/​PackageManagerPage.axaml.cs Reuses the view model’s executable candidates.
src/​UniGetUI.Avalonia/​Views/​Pages/​SettingsPages/​PackageManagerPage.axaml Adds guide and terminal controls to the status card.
src/​UniGetUI.Avalonia/​ViewModels/​Pages/​SettingsPages/​PackageManagerViewModel.cs Controls setup-help visibility and actions.
src/​Languages/​lang_en.json Adds English strings for the new controls.
docs/​PACKAGE_MANAGERS.md Provides the centralized setup and troubleshooting guide.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Setup guidance can offer commands that fail because of a stale PATH or missing curl, suppress the missing-SDK command, and overlook production managers in its coverage guard.

No open issues 🎉

4 previously missed issues

In code that hasn't changed since last review

Medium severity Use refreshed PATH when launching WinGet terminal commands

src/​UniGetUI.Avalonia/​ViewModels/​Pages/​SettingsPages/​PackageManagerViewModel.cs:97

On Windows, Which searches the current registry PATH as well as the process PATH, but LaunchManualAsync starts PowerShell with the app's inherited environment. If WinGet is installed while UniGetUI is open, this can offer a command because the new registry PATH contains winget, then open a terminal whose stale PATH cannot run it. Pass a refreshed PATH to the terminal or use the resolved executable path in the command.

Medium severity Offer SDK installation when disabled .NET Tool manager lacks SDK

src/​UniGetUI.Avalonia/​ViewModels/​Pages/​SettingsPages/​PackageManagerViewModel.cs:101

For a disabled .NET Tool manager, HasExecutable() only checks for dotnet, not the SDK. On a runtime-only machine the initial SDK probe sets found to false and disables the manager, but this check then suppresses the SDK installation command because dotnet exists. Use the same SDK-aware availability check for disabled .NET Tool as for its enabled initialization, so the first-time missing-SDK case still offers the command.

Medium severity Check for curl before offering the Homebrew installation command

src/​UniGetUI.PackageEngine.Managers.Homebrew/​Homebrew.cs:41

The availability check only probes /bin/bash, but this command also requires curl. On a Linux installation without curl, the card offers it anyway and the command substitution fails without installing Homebrew. Check for curl as well before offering the command, or provide an installation path that does not assume it is present.

Medium severity Compare test coverage against the full production manager list

src/​UniGetUI.PackageEngine.Tests/​ManagerSetupGuideTests.cs:86

Scanning only DLLs copied into the test output cannot detect a production manager whose project was never referenced by this test project. PowerShell 7 is already omitted on the portable target because both its reference and test-list entry are Windows-only. Include PowerShell 7 on both targets and compare coverage against an authoritative production manager list so future omissions fail this guard.

2 resolved since last review

Review effort: Balanced

@randy-but-a-ro randy-but-a-ro Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Pull request was approved automatically: the AI review is complete and all its review threads are resolved. 🎉

Integration Details
{
	"deliveryId": "963224c0-d6fb-11f1-96fd-ac8ee012b643",
	"headSha": "862ca9a2ddbb30c7580d3bd00494d7ba8c917851",
	"reviewer": "copilot-pull-request-reviewer[bot]"
}

@GabrielDuf
Gabriel Dufresne (GabrielDuf) merged commit 391d71f into main Nov 3, 2026
8 checks passed
@GabrielDuf
Gabriel Dufresne (GabrielDuf) deleted the feature/package-manager-setup-guide branch November 3, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement An improvement to WingetUI

Development

Successfully merging this pull request may close these issues.

[DOCUMENTATION] Add installation and prerequisite guides for supported package managers

2 participants