nex_shift/src-tauri
mula.liu 47f8bc69d9 fix(runtime): make the one-click component install work on Windows
Reported: "在windows机器上实测一键安装组件会失败." Four independent
defects hid inside the same ten lines of `install_target_package`:

- `winget`'s benign codes — 0x8A15002B already installed, 0x8A150016 no
  upgrade applicable — were read as failures, so a machine that already
  had the tool was guaranteed to be told the install failed.
- `--source` was never pinned, so on a host that also carries msstore
  `winget` could block on a source agreement `--silent` never answers,
  and the 15-minute deadline turned a hang into the same failure.
- Machine-level packages (Poppler, FFmpeg, ImageMagick, Typst) install
  into Program Files and need admin, and Shift is an unelevated GUI
  process. There was no elevation path at all.
- Post-install verification could not succeed even when the install did:
  a process keeps the environment block it was launched with, so the
  WinGet Links directory written to the registry never reached the live
  `which` lookup.

Attempts now run unscoped, then `--scope user`, then elevated machine
scope, and success is decided by whether the binary is on disk after the
process PATH has been re-read. The four outcomes a user can act on —
declined prompt, installed-but-not-on-PATH, no package source, timeout —
each say so in both languages instead of "安装失败".

Co-Authored-By: Codex <noreply@openai.com>
2026-11-19 17:46:52 +08:00
..
binaries release: prepare Shift 0.1.8 2026-10-27 18:45:32 +08:00
capabilities release: 0.1.1 — update channel, settings/UI trims, macOS + Windows x64 only 2026-10-26 03:06:46 +08:00
icons fix(tray): let the system draw a black/white mark, not the colour wheel 2026-11-19 17:45:07 +08:00
src fix(runtime): make the one-click component install work on Windows 2026-11-19 17:46:52 +08:00
Cargo.lock fix(drop): 拒绝改由光标表达,不再往按钮上叠禁止图标 2026-11-07 12:43:06 +08:00
Cargo.toml fix(drop): 拒绝改由光标表达,不再往按钮上叠禁止图标 2026-11-07 12:43:06 +08:00
Info.plist fix(share): declare the local network usage description 2026-10-26 18:54:25 +08:00
build.rs release: 0.1.1 — update channel, settings/UI trims, macOS + Windows x64 only 2026-10-26 03:06:46 +08:00
tauri.conf.json release: prepare Shift 0.1.11 2026-11-06 23:14:57 +08:00
tauri.macos.conf.json baseline: capture workspace state (bug fixes in progress) 2026-10-21 08:54:54 +08:00