Skip to content

Commit 391d71f

Browse files
authored
Add a setup guide for each package manager and link it from the status card (#5669)
1 parent 46692b4 commit 391d71f

31 files changed

Lines changed: 746 additions & 3 deletions

File tree

‎docs/PACKAGE_MANAGERS.md‎

Lines changed: 315 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,315 @@
1+
# Setting up package managers
2+
3+
UniGetUI is a front end: it drives package managers that are already installed on the computer,
4+
and apart from Scoop it does not install them for you. This page explains, for each one, what to
5+
install, how UniGetUI finds it, and how to check that it works.
6+
7+
Each manager has its own page, opened from **Package Managers** in the sidebar or from
8+
**Settings > Package manager preferences**. When a manager is not ready, the status card at the top
9+
of that page links to its section of this guide. When the manager is also not installed, the card
10+
shows the install command from its section, where there is a one-line one (Scoop has its own
11+
**Install Scoop** button instead), with **Open in a terminal**: that copies the command to the
12+
clipboard and opens a terminal with it already typed (Windows PowerShell on Windows, Terminal on
13+
macOS, the first terminal emulator UniGetUI finds on Linux).
14+
15+
## Before you start
16+
17+
- **A manager that is missing the first time UniGetUI checks for it is turned off.** After
18+
installing it, open its page and turn on **Enable {manager}**: UniGetUI looks for it again
19+
straight away. A manager that was found before and has since been removed stays on, and its page
20+
reports that it was not found.
21+
- **PATH on Windows.** UniGetUI finds most managers by searching `PATH`. On Windows it reads the
22+
user and system `PATH` from the registry each time it searches (user entries first), so a manager
23+
installed while UniGetUI is open is found when you turn on **Enable {manager}**, without a restart.
24+
- **PATH on macOS.** At startup, UniGetUI replaces its `PATH` with the one a zsh login shell reports
25+
(`zsh -l -c "printenv PATH"`). That shell reads `~/.zshenv`, `~/.zprofile` and `~/.zlogin`, but not
26+
`~/.zshrc`, so a folder added to `PATH` only in `~/.zshrc`, or only in another shell's profile, is
27+
not seen. If the shell does not answer within 5 seconds, UniGetUI keeps the `PATH` it was started
28+
with. Restart UniGetUI after installing a manager.
29+
- **PATH on Linux.** UniGetUI uses the `PATH` it was started with. Restart UniGetUI after installing
30+
a manager.
31+
- **Extra folders.** For some managers UniGetUI also searches fixed folders that are often missing
32+
from `PATH`; each section below lists them.
33+
- **Install commands.** The Windows commands below use WinGet, and most macOS ones use Homebrew.
34+
UniGetUI can run without the system WinGet (it falls back to its bundled Pinget), so `winget`
35+
may be missing even though UniGetUI works; see [WinGet](#winget) to get it back, or use the
36+
direct download linked beside each command. Without Homebrew, see [Homebrew](#homebrew) or the same
37+
links. The status card only offers a command when it can find the program that runs it.
38+
- **Picking the executable yourself.** Each manager's page lists the executables it found. Choosing
39+
another one, or browsing to a file, is disabled by default for security reasons. To allow it,
40+
turn on **Allow changing the paths for package manager executables** under **Settings >
41+
Administrator rights and other dangerous settings**.
42+
- **When a manager still is not detected.** Each section ends with a command to run in a terminal.
43+
If that command works but UniGetUI still reports the manager as missing, open **More > UniGetUI
44+
Log** in the sidebar: it records whether each manager was found and the errors raised while
45+
starting it. **View {manager} logs**, on the manager's page, shows the commands UniGetUI ran with
46+
that manager and their output.
47+
48+
| Manager | Windows | macOS | Linux |
49+
|---|---|---|---|
50+
| [WinGet](#winget) | Yes | | |
51+
| [Scoop](#scoop) | Yes | | |
52+
| [Chocolatey](#chocolatey) | Yes | | |
53+
| [PowerShell 5.x](#powershell-5x) | Yes | | |
54+
| [PowerShell 7.x](#powershell-7x) | Yes | Yes | Yes |
55+
| [Pip](#pip) | Yes | Yes | Yes |
56+
| [Npm](#npm) | Yes | Yes | Yes |
57+
| [Bun](#bun) | Yes | Yes | Yes |
58+
| [.NET Tool](#net-tool) | Yes | Yes | Yes |
59+
| [Cargo](#cargo) | Yes | Yes | Yes |
60+
| [vcpkg](#vcpkg) | Yes | Yes | Yes |
61+
| [Homebrew](#homebrew) | | Yes | Yes |
62+
| [Apt](#apt), [Dnf](#dnf), [Pacman](#pacman), [Snap](#snap), [Flatpak](#flatpak) | | | [Depends on the distribution](#linux-distributions) |
63+
64+
Installer packages published by your organization (`.msi`, `.exe`, `.pkg`, `.dmg`) need no package
65+
manager: see [WINDOWS_INSTALLER_FEEDS.md](WINDOWS_INSTALLER_FEEDS.md) and [PKG_FEEDS.md](PKG_FEEDS.md).
66+
67+
## WinGet
68+
69+
**Nothing to install.** WinGet is part of App Installer, which Windows 11 and current versions of
70+
Windows 10 include and which the Microsoft Store keeps up to date. UniGetUI uses the system WinGet
71+
when it is found and works; otherwise it uses Pinget, a WinGet client that ships with UniGetUI. On
72+
the WinGet page, **WinGet command-line tool** chooses between them.
73+
74+
If WinGet lists no packages, try **Reset WinGet** on its page. To repair the system copy, update
75+
**App Installer** from the Microsoft Store.
76+
77+
Check: `winget --version`
78+
79+
## Scoop
80+
81+
On the Scoop page, turn on **Enable Scoop**, then use **Install Scoop**. It sets the PowerShell
82+
execution policy to `RemoteSigned` for your user, installs Scoop, `scoop-search`, and Git if Git is
83+
missing, then restarts UniGetUI.
84+
85+
To install Scoop yourself instead, run this in a PowerShell window that is **not** elevated (Scoop's
86+
installer refuses to run as administrator unless told to):
87+
88+
```powershell
89+
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
90+
```
91+
92+
UniGetUI also needs `scoop-search` and Git. When Scoop is found but either one is missing, UniGetUI
93+
offers to install it when it starts, with `scoop install main/scoop-search` or
94+
`scoop install main/git`, unless you chose not to be asked again.
95+
96+
UniGetUI finds `scoop.ps1` on `PATH` and runs it with PowerShell 7 when `pwsh.exe` is on `PATH`,
97+
or with Windows PowerShell otherwise.
98+
99+
Check: `scoop --version`
100+
101+
## Chocolatey
102+
103+
UniGetUI no longer ships a copy of Chocolatey; install it once:
104+
105+
```powershell
106+
winget install --exact --id Chocolatey.Chocolatey
107+
```
108+
109+
Without WinGet, follow <https://chocolatey.org/install>.
110+
111+
UniGetUI looks for `C:\ProgramData\chocolatey\bin\choco.exe` first, then `choco.exe` on `PATH`.
112+
113+
Check: `choco --version`
114+
115+
## PowerShell 5.x
116+
117+
**Nothing to install.** UniGetUI uses Windows PowerShell (`powershell.exe` on `PATH`, else
118+
`%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe`) and manages modules from the
119+
PowerShell Gallery through PowerShellGet (`Install-Module`, `Get-InstalledModule`).
120+
121+
Windows PowerShell ships with version 1.0.0.1 of PowerShellGet, which Microsoft no longer supports;
122+
to update it, follow
123+
<https://learn.microsoft.com/powershell/gallery/powershellget/install-powershellget>.
124+
125+
Check: run `$PSVersionTable.PSVersion` in a Windows PowerShell window.
126+
127+
## PowerShell 7.x
128+
129+
Install PowerShell 7:
130+
131+
- **Windows:** `winget install --exact --id Microsoft.PowerShell`, or follow
132+
<https://learn.microsoft.com/powershell/scripting/install/installing-powershell-on-windows>
133+
- **macOS:** `brew install powershell`, or follow
134+
<https://learn.microsoft.com/powershell/scripting/install/installing-powershell-on-macos>
135+
- **Linux:** follow Microsoft's instructions for your distribution:
136+
<https://learn.microsoft.com/powershell/scripting/install/installing-powershell-on-linux>
137+
138+
UniGetUI finds `pwsh` on `PATH` and manages modules through PSResourceGet (`Install-PSResource`,
139+
`Get-InstalledPSResource`), which PowerShell 7.4 and later include.
140+
141+
Check: `pwsh -NoProfile -Version`
142+
143+
## Pip
144+
145+
Install Python, which includes pip:
146+
147+
- **Windows:** `winget install --exact --id Python.Python.3.14` (this installer adds Python to
148+
`PATH`), or download it from <https://www.python.org/downloads/windows/>
149+
- **macOS:** `brew install python`, or download it from <https://www.python.org/downloads/macos/>
150+
- **Linux:** use your distribution's packages, for example `python3-pip` on Ubuntu.
151+
152+
On Windows, UniGetUI runs `python -m pip` with the first `python` it finds on `PATH`. If typing
153+
`python` in a terminal opens the Microsoft Store or reports that the command is not found,
154+
UniGetUI cannot use it either. Python's documentation covers this case: open Start, search for
155+
**Manage app execution aliases**, and check the Python entries there
156+
(<https://docs.python.org/3/using/windows.html>).
157+
158+
On macOS and Linux, UniGetUI uses `pip3` or `pip` on `PATH` when one is there, and otherwise runs
159+
`python -m pip`, or `python3 -m pip` when there is no `python`.
160+
161+
Check: `python -m pip --version` (or `python3 -m pip --version`)
162+
163+
## Npm
164+
165+
Install Node.js, which includes npm:
166+
167+
- **Windows:** `winget install --exact --id OpenJS.NodeJS.LTS`
168+
- **macOS:** `brew install node`
169+
- **Windows or macOS without WinGet or Homebrew:** download it from <https://nodejs.org/en/download>
170+
- **Linux:** use your distribution's packages, or [nvm](https://github.com/nvm-sh/nvm).
171+
172+
On Windows, UniGetUI finds `npm.cmd` on `PATH` and runs npm through Windows PowerShell.
173+
174+
On macOS and Linux, UniGetUI uses `npm` on `PATH` first. It also finds npm versions installed by nvm
175+
(under `$NVM_DIR/versions/node/`, or `~/.nvm/versions/node/` when `NVM_DIR` is not set), so they
176+
work even when nvm only sets up `PATH` in `~/.zshrc`. Among those, it prefers nvm's `default`
177+
version, then the newest one.
178+
179+
Check: `npm --version`
180+
181+
## Bun
182+
183+
- **Windows:** `winget install --exact --id Oven-sh.Bun`
184+
- **macOS:** `brew install oven-sh/bun/bun`
185+
- **Linux, or without WinGet or Homebrew:** follow <https://bun.sh/docs/installation>
186+
187+
UniGetUI finds `bun` on `PATH` (on Windows, `bun.exe`, or the `bun.cmd` wrapper). It searches no
188+
other folder, so the folder Bun is installed in must be on `PATH`.
189+
190+
Check: `bun --version`
191+
192+
## .NET Tool
193+
194+
.NET tools are a feature of the .NET **SDK**, so install the SDK:
195+
196+
- **Windows:** `winget install --exact --id Microsoft.DotNet.SDK.10`
197+
- **macOS:** `brew install --cask dotnet-sdk`
198+
- **Windows or macOS without WinGet or Homebrew:** download the SDK from
199+
<https://dotnet.microsoft.com/download>
200+
- **Linux:** follow <https://learn.microsoft.com/dotnet/core/install/linux>
201+
202+
UniGetUI finds `dotnet` on `PATH`, and treats .NET Tool as missing when `dotnet tool -h` exits with
203+
an error.
204+
205+
Check: `dotnet tool list --global`
206+
207+
## Cargo
208+
209+
Install Rust through rustup:
210+
211+
- **Windows:** `winget install --exact --id Rustlang.Rustup`
212+
- **macOS, Linux, or Windows without WinGet:** follow <https://rustup.rs>
213+
214+
No Cargo extensions are needed. Older versions of UniGetUI also required `cargo-update` and
215+
`cargo-binstall`; current versions search, install and update crates without them.
216+
217+
When UniGetUI installs or updates a crate, it downloads a verified prebuilt binary when the crate
218+
publishes one for your platform. Otherwise it builds the crate with `cargo install --locked`, and it
219+
always builds when the operation runs as administrator, uses custom Cargo arguments or build
220+
settings, or comes from a source other than crates.io. Building needs a working linker and any
221+
native libraries the crate uses; on Windows, Rust's default toolchain gets its linker from Visual
222+
Studio or the Visual Studio Build Tools
223+
(<https://rust-lang.github.io/rustup/installation/windows-msvc.html>).
224+
225+
UniGetUI finds `cargo` on `PATH`, and also in `$CARGO_HOME/bin` (or `~/.cargo/bin` when
226+
`CARGO_HOME` is not set), so it works before a new terminal or session has picked up rustup's
227+
`PATH` change.
228+
229+
Check: `cargo --version`
230+
231+
## vcpkg
232+
233+
vcpkg is set up by cloning its repository and running its bootstrap script once:
234+
235+
```shell
236+
git clone https://github.com/microsoft/vcpkg
237+
```
238+
239+
Then run `bootstrap-vcpkg.bat` (Windows) or `bootstrap-vcpkg.sh` (macOS, Linux) inside the clone.
240+
After that, UniGetUI re-runs the bootstrap script itself each time it loads vcpkg.
241+
242+
UniGetUI needs to know where that folder is. It uses the first of these that is set, and does not
243+
move on to the next one when a value is wrong:
244+
245+
1. The folder chosen with **Change vcpkg root location** on the vcpkg page.
246+
2. The `VCPKG_ROOT` environment variable.
247+
3. A `vcpkg` on `PATH` whose folder contains a `triplets` folder.
248+
249+
UniGetUI also needs Git to refresh vcpkg's package list. When vcpkg is set up but Git is not on
250+
`PATH`, UniGetUI offers to install Git when it starts, unless you chose not to be asked again: with
251+
WinGet on Windows, with Homebrew (or the Xcode command-line tools when Homebrew is absent) on macOS,
252+
and on Linux with the first of `apt-get`, `dnf`, `pacman` or `zypper` it finds.
253+
254+
Check: `vcpkg version`
255+
256+
## Homebrew
257+
258+
Install it from <https://brew.sh>:
259+
260+
```shell
261+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
262+
```
263+
264+
UniGetUI finds `brew` on `PATH`, and also in `/opt/homebrew/bin`, `/usr/local/bin` and
265+
`/home/linuxbrew/.linuxbrew/bin`. UniGetUI offers casks on macOS only.
266+
267+
Check: `brew --version`
268+
269+
## Linux distributions
270+
271+
UniGetUI decides which Linux package managers to offer from the `ID` and `ID_LIKE` lines of
272+
`/etc/os-release`, so a derivative counts as the distribution it names there. If the file cannot be
273+
read, all five are offered.
274+
275+
| Manager | Offered when `ID` or `ID_LIKE` contains |
276+
|---|---|
277+
| Apt | `debian` or `ubuntu` |
278+
| Dnf | `fedora`, `rhel` or `centos` |
279+
| Pacman | `arch` |
280+
| Snap, Flatpak | `ubuntu`, `debian`, `fedora` or `arch` |
281+
282+
## Apt
283+
284+
Apt is the package manager of Debian, Ubuntu and their derivatives; there is nothing to install.
285+
UniGetUI finds `apt` on `PATH`, in `/usr/bin` or in `/usr/local/bin`.
286+
287+
Check: `apt --version`
288+
289+
## Dnf
290+
291+
Dnf is the package manager of Fedora, RHEL and CentOS; there is nothing to install. UniGetUI looks
292+
for `dnf5` on `PATH` first, then `dnf` on `PATH`, then in `/usr/bin` and `/usr/local/bin`.
293+
294+
Check: `dnf --version`
295+
296+
## Pacman
297+
298+
Pacman is the package manager of Arch Linux and its derivatives; there is nothing to install.
299+
UniGetUI finds `pacman` on `PATH`, in `/usr/bin` or in `/usr/local/bin`.
300+
301+
Check: `pacman -Q pacman`
302+
303+
## Snap
304+
305+
If `snap` is not available, install `snapd` following <https://snapcraft.io/docs/installing-snapd>.
306+
UniGetUI finds `snap` on `PATH`, in `/usr/bin` or in `/usr/local/bin`.
307+
308+
Check: `snap --version`
309+
310+
## Flatpak
311+
312+
Install `flatpak` and add Flathub following <https://flathub.org/setup>. UniGetUI finds `flatpak` on
313+
`PATH`, in `/usr/bin` or in `/usr/local/bin`.
314+
315+
Check: `flatpak --version`

‎src/Languages/lang_en.json‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2212,5 +2212,8 @@
22122212
"Make the window wider to show package details here": "Make the window wider to show package details here",
22132213
"Details panel": "Details panel",
22142214
"Show details panel": "Show details panel",
2215-
"Hide details panel": "Hide details panel"
2215+
"Hide details panel": "Hide details panel",
2216+
"How to set up {0}": "How to set up {0}",
2217+
"Install it with this command:": "Install it with this command:",
2218+
"Open in a terminal": "Open in a terminal"
22162219
}

0 commit comments

Comments
 (0)