chore: consolidate parallel-session WIP (HOLD — do not push)
Local snapshot of intermingled in-flight work, committed to unblock the encode
refactor (a clean ffmpeg_win.rs for the vbv-dedup follow-on). These hunks span
the same files and can't be cleanly split here; the commit bundles three
distinct workstreams that each belong in their own PR:
- logging rework (~43 files: level re-tiering, structured fields, `?e`,
hot-path flood latches)
- conflicting-host detection (detect.rs + detect/{linux,windows}.rs + wiring
in main.rs/mgmt.rs/Cargo.toml/docs/packaging)
- standby-sink DWM-stall attribution (windows/display_events.rs + capture/
vdisplay wiring)
NOT verified as a combination. NOT to be pushed until the refactor is done and
these are re-verified and reorganized into their proper per-workstream PRs.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -25,7 +25,9 @@ packaging/
|
||||
The other packaging targets have their own READMEs: [`debian/`](debian/README.md) (apt),
|
||||
[`arch/`](arch/README.md) (pacman binary repo + PKGBUILD + SteamOS sysext),
|
||||
[`flatpak/`](flatpak/README.md) (the client), [`windows/`](windows/README.md) (host installer +
|
||||
drivers), plus `kde/` and `linux/` helpers.
|
||||
drivers), plus `kde/` and `linux/` helpers. **NixOS / Nix** users get a flake (`flake.nix` at the
|
||||
repo root) with reproducible host + client packages and a `services.punktfunk` NixOS module —
|
||||
see [`../nix/README.md`](../nix/README.md).
|
||||
|
||||
## What's needed beyond base Fedora
|
||||
|
||||
|
||||
@@ -38,6 +38,13 @@ MSG
|
||||
sudo firewall-cmd --reload
|
||||
MSG
|
||||
fi
|
||||
# Conflicting Moonlight-compatible host (Sunshine/Apollo/...): reuse the host's own detector so
|
||||
# the warning lives in one place. Exit 1 = found; never fail the install on it.
|
||||
if command -v punktfunk-host >/dev/null 2>&1; then
|
||||
if ! conflict="$(punktfunk-host detect-conflicts 2>/dev/null)"; then
|
||||
printf '\n%s\n' "$conflict"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
|
||||
@@ -210,6 +210,14 @@ if [ "$1" = "configure" ]; then
|
||||
echo " sudo firewall-cmd --permanent --add-service=punktfunk-native && sudo firewall-cmd --reload"
|
||||
echo " (use punktfunk-gamestream for the Moonlight-compat host)"
|
||||
fi
|
||||
# Conflicting Moonlight-compatible host (Sunshine/Apollo/...): reuse the host's own detector so
|
||||
# the warning lives in one place. Exit 1 = found; never fail the install on it.
|
||||
if command -v punktfunk-host >/dev/null 2>&1; then
|
||||
if ! conflict="$(punktfunk-host detect-conflicts 2>/dev/null)"; then
|
||||
echo ""
|
||||
echo "$conflict"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
exit 0
|
||||
EOF
|
||||
|
||||
@@ -385,6 +385,14 @@ if command -v firewall-cmd >/dev/null 2>&1; then
|
||||
echo " sudo firewall-cmd --permanent --add-service=punktfunk-gamestream && sudo firewall-cmd --reload"
|
||||
echo " (use punktfunk-native for the native-only host)"
|
||||
fi
|
||||
# Conflicting Moonlight-compatible host (Sunshine/Apollo/...): reuse the host's own detector so the
|
||||
# warning stays in one place. Exit 1 = something found; never fail the install on it.
|
||||
if command -v punktfunk-host >/dev/null 2>&1; then
|
||||
if ! conflict="$(punktfunk-host detect-conflicts 2>/dev/null)"; then
|
||||
echo ""
|
||||
echo "$conflict"
|
||||
fi
|
||||
fi
|
||||
|
||||
%if %{with web}
|
||||
%post web
|
||||
|
||||
@@ -285,6 +285,42 @@ Filename: "powershell.exe"; \
|
||||
#endif
|
||||
|
||||
[Code]
|
||||
{ True if another Moonlight-compatible streaming host is installed - by its SCM service key or its
|
||||
Program Files directory. Sunshine and its forks all register a "<Name>Service" and install under
|
||||
Program Files, so a registry + directory probe catches them without enumerating processes (which
|
||||
pure Pascal can't do cleanly). }
|
||||
function StreamHostPresent(SvcKey, DirName: String): Boolean;
|
||||
begin
|
||||
Result := RegKeyExists(HKLM, 'SYSTEM\CurrentControlSet\Services\' + SvcKey)
|
||||
or DirExists(ExpandConstant('{commonpf}\' + DirName))
|
||||
or DirExists(ExpandConstant('{commonpf32}\' + DirName));
|
||||
end;
|
||||
|
||||
{ Runs before any wizard page - the earliest point we can warn. Detect a conflicting host and let
|
||||
the user abort (default) or continue. Returning False cancels setup. }
|
||||
function InitializeSetup(): Boolean;
|
||||
var
|
||||
Found: String;
|
||||
begin
|
||||
Result := True;
|
||||
Found := '';
|
||||
if StreamHostPresent('SunshineService', 'Sunshine') then Found := Found + ' - Sunshine' + #13#10;
|
||||
if StreamHostPresent('ApolloService', 'Apollo') then Found := Found + ' - Apollo' + #13#10;
|
||||
if StreamHostPresent('VibeshineService', 'Vibeshine') then Found := Found + ' - Vibeshine' + #13#10;
|
||||
if StreamHostPresent('VibepolloService', 'Vibepollo') then Found := Found + ' - Vibepollo' + #13#10;
|
||||
if StreamHostPresent('LuminalShineService', 'LuminalShine') then Found := Found + ' - LuminalShine' + #13#10;
|
||||
if Found <> '' then
|
||||
Result := MsgBox(
|
||||
'Another game-streaming host is already installed on this PC:' + #13#10#13#10 + Found + #13#10 +
|
||||
'Running Punktfunk alongside Sunshine / Apollo / other Moonlight-compatible hosts is NOT ' +
|
||||
'supported. They bind the same GameStream network ports (47984, 47989, 47998-48010) and ' +
|
||||
'install a conflicting virtual-display driver, which causes pairing failures, "address ' +
|
||||
'already in use" errors and capture glitches.' + #13#10#13#10 +
|
||||
'Stop and uninstall the other host before using Punktfunk.' + #13#10#13#10 +
|
||||
'Continue with the installation anyway?',
|
||||
mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDYES;
|
||||
end;
|
||||
|
||||
{ The GameStream task choice, forwarded to `service install` (which writes host.env's
|
||||
PUNKTFUNK_HOST_CMD - only if it is unset or still one of the two canonical values, so a
|
||||
hand-customized command line survives upgrades). }
|
||||
|
||||
Reference in New Issue
Block a user