fix: repair Wine setup and niri capture, input and tray (#22)

* fix(setup): verify provisioning and runtime readiness

* feat: add explicit per-user uninstall and purge

* fix: restore niri input and provide native capture and tray

* fix(build): declare Wayland scanner and release dependencies
This commit is contained in:
Xuc Pan authored and GitHub committed 2026-10-13 15:26:06 +08:00
1 parent d349e6ff6a
commit 8c0589021f
38 files changed
+2409 -185

No files matched your search

+33 -8
View File
@@ -7,39 +7,64 @@ set -euo pipefail
root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd -P)
readonly root
prefix="${UUR_INSTALL_PREFIX:-$HOME/.local}"
data_home="${XDG_DATA_HOME:-$HOME/.local/share}"
[[ "$prefix" = /* && "$data_home" = /* && "$prefix" != *$'\n'* && "$data_home" != *$'\n'* ]] || {
printf 'install prefix and XDG_DATA_HOME must be absolute paths without newlines\n' >&2
exit 1
}
[[ -x "$root/target/release/uur" ]] || {
printf 'missing %s — run: cargo build --release\n' \
"$root/target/release/uur" >&2
exit 1
}
[[ -f "$root/build/hook/wevtapi.dll" && -f "$root/build/hook/uur-hook.dll" ]] || {
printf 'missing hook DLLs — run: ./hook/build.sh\n' >&2
exit 1
}
[[ -f "$root/capture/uur-pw-capture" ]] || {
components=(wevtapi.dll uur-hook.dll wtsapi32.dll winlogon.exe uur-terminal-proxy.exe uur-mux-proxy.exe uur-launch-proxy.exe)
for component in "${components[@]}"; do
[[ -f "$root/build/hook/$component" ]] || {
printf 'missing hook component %s — run: ./hook/build.sh\n' "$component" >&2
exit 1
}
done
[[ -f "$root/capture/uur-pw-capture" && -f "$root/capture/uur-wl-capture" ]] || {
printf 'missing capture helper — run: ./capture/build.sh\n' >&2
exit 1
}
install -Dm0755 "$root/target/release/uur" "$prefix/bin/uur"
for helper in uur-pw-capture; do
for helper in uur-pw-capture uur-wl-capture; do
install -Dm0755 "$root/capture/$helper" "$prefix/lib/uur/$helper"
done
for dll in wevtapi.dll uur-hook.dll winlogon.exe uur-terminal-proxy.exe; do
for dll in "${components[@]}"; do
install -Dm0644 "$root/build/hook/$dll" "$prefix/lib/uur/hook/$dll"
done
# Menu entry: absolute Exec path so the user's PATH is irrelevant.
install -Dm0644 "$root/packaging/uur.desktop" \
"$prefix/share/applications/uur.desktop"
sed -i "s|^Exec=.*|Exec=$prefix/bin/uur run|; s|^TryExec=.*|TryExec=$prefix/bin/uur|" \
# Escape Desktop Entry quoted arguments, then escape the sed replacement.
desktop_binary="$prefix/bin/uur"
desktop_binary="${desktop_binary//\\/\\\\}"
desktop_binary="${desktop_binary//\"/\\\"}"
desktop_binary="${desktop_binary//\$/\\\$}"
desktop_binary="${desktop_binary//\`/\\\`}"
sed_binary="${desktop_binary//\\/\\\\}"
sed_binary="${sed_binary//&/\\&}"
sed_binary="${sed_binary//|/\\|}"
try_binary="$prefix/bin/uur"
try_binary="${try_binary//\\/\\\\}"
try_binary="${try_binary//&/\\&}"
try_binary="${try_binary//|/\\|}"
sed -i "s|^Exec=uur |Exec=\"$sed_binary\" |; s|^TryExec=uur$|TryExec=$try_binary|" \
"$prefix/share/applications/uur.desktop"
if [[ -f "$root/packaging/uur-icon.png" ]]; then
install -Dm0644 "$root/packaging/uur-icon.png" \
"$prefix/share/icons/hicolor/256x256/apps/uur.png"
fi
# Only the source installer writes this receipt. Package managers own their
# system files; uur uninstall must not remove those behind their backs.
printf 'uur-user-install-v1\n%s/uur\n' "${data_home%/}" > "$prefix/lib/uur/user-install"
printf 'installed:\n %s/bin/uur\n %s/lib/uur/\n %s/share/applications/uur.desktop\n' \
"$prefix" "$prefix" "$prefix"
UUR_COMMAND="$prefix/bin/uur" "$root/packaging/post-install-message"