Optimize installer: preflight checks, tuned conf, doctor, faster default
Layers a few things on top of the initial scaffold: - Default to sunshine-bin (precompiled, ~seconds) instead of building from source. --from-source restores the old behavior. - Add lib/preflight.sh: catches the gotchas before any work is done — Wayland session, NVIDIA driver responsive, nvidia-drm.modeset, amdgpu loaded, pipewire-pulse present, SSH-without-session warning. - Add lib/config.sh: writes a tuned ~/.config/sunshine/sunshine.conf with per-vendor encoder settings (NVENC P1+ll+cbr, VAAPI ultralowlatency, QuickSync veryfast), KMS capture, pulse audio sink. Uses a "# managed-by: omarchy-moonlight" marker; removing it hands ownership back to the user and the installer won't touch the file again. - Add lib/verify.sh: post-install verification of every step (cap_sys_admin set, group resolves, udev rule present, /dev/uinput exists, encoder reachable, service active, :47990 listening). Same checks are reachable standalone via --doctor. - Install runtime helpers (pipewire-pulse, vulkan-tools, libva-utils) alongside Sunshine for diagnostics + audio. - Uninstall handles both sunshine + sunshine-bin and the -bin moonlight variant. - README documents the tuning table, the new flags, and the modeset troubleshooting path.
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install Sunshine, Moonlight, and GPU-specific hardware-encode dependencies.
|
||||
|
||||
# Default to source build (canonical AUR package). Override with SUNSHINE_PKG=sunshine-bin
|
||||
# in the environment for the precompiled build (much faster install).
|
||||
: "${SUNSHINE_PKG:=sunshine}"
|
||||
# Default to the precompiled AUR build for a fast install (~seconds instead of
|
||||
# the ~10 minute source compile). Override with SUNSHINE_PKG=sunshine to build
|
||||
# from source.
|
||||
: "${SUNSHINE_PKG:=sunshine-bin}"
|
||||
: "${MOONLIGHT_PKG:=moonlight-qt}"
|
||||
|
||||
install_sunshine() {
|
||||
# Ensure runtime deps useful for capture/diagnostics across vendors.
|
||||
yay_install pipewire-pulse vulkan-tools libva-utils
|
||||
yay_install "$SUNSHINE_PKG"
|
||||
}
|
||||
|
||||
install_moonlight() {
|
||||
# moonlight-qt is in the AUR (also a -bin variant). yay handles both.
|
||||
yay_install moonlight-qt
|
||||
yay_install "$MOONLIGHT_PKG"
|
||||
}
|
||||
|
||||
install_gpu_encoder_packages() {
|
||||
|
||||
Reference in New Issue
Block a user