Skip to content

0040: The Couchdogs client is a thin fork of Moonlight on every platform

Status: Accepted (owner, 2026-11-24). Proposed (2026-11-22). Supersedes the launcher part of ADR 0039; 0039's server parts (mDNS announce, <Couchdogs> in serverinfo) stay.

Context

The M8 launcher (0039) drives stock moonlight-qt's command line, which can pair with a PIN the launcher chooses. Moonlight Android has no such entry point: it makes a random PIN (SecureRandom) in its own screen, and no other app can start pairing or hand it a PIN, so any Android app around stock Moonlight leaves a manual step inside Moonlight. Owner: Android users must open straight into Couchdogs, APK from releases; and if Android needs a fork, "fork on all platforms. People can still just use moonlight if they'd rather not have another app". iOS is out for now.

Decision

One "Couchdogs" app per platform (Windows, macOS, Linux x86_64 AppImage, one Android APK for phone, TV and Android handhelds), built from a pinned moonlight-qt / moonlight-android release plus a small patch series kept in this repo (client/moonlight-qt/, client/moonlight-android/), like the patched Gamescope (0035). The patch only: recognises Couchdogs servers, shows only those plus hosts added by hand or paired (amended 2026-11-23: Moonlight's host grid becomes the Couchdogs page, picking a Couchdogs server opens its Couchdogs app, and leaving a Couchdogs stream comes back to that page, not to the app grid), pairs with Moonlight's own flow, remembers the last one and opens its "Couchdogs" app on a cold start (cancellable, never on return from a stream), and gives the app its own name, icons and identity so it sits beside stock Moonlight. The Python launcher is removed. Design: docs/superpowers/specs/2026-11-22-m8b-couchdogs-client-design.md.

Not chosen: forking Android only and keeping the launcher (two installs and a window flash on desktop); an Android app around stock Moonlight (manual pairing step).

Consequences

Two GPLv3 patch series to rebase on each Moonlight release (CI fails at git am when one no longer applies); heavier CI (Qt, FFmpeg, SDL, Android NDK). This goes against "consume upstream unmodified" (0011) on the client, accepted for one install and no manual step. The APK needs a release key the owner keeps in a GitHub environment. Stock Moonlight keeps working against the server unchanged.

Amendment (2026-11-22): the rename is full. The user never sees "Moonlight" as the app's own name: UI strings and translations (the compiled .qm catalogs too), Windows Couchdogs.exe and its WiX installer, macOS Couchdogs.app, the Linux desktop and appdata files and the Android labels all say Couchdogs. Moonlight stays only where it credits the project or names an upstream thing (the Moonlight Internet Hosting Tool, upstream help and privacy pages, moonlight-stream.org services). Credit and GPLv3: both About screens say the app is based on Moonlight by the Moonlight Game Streaming Project, modified by the Couchdogs project, with the licence and the source link; every package carries the GPLv3 text and NOTICE-Couchdogs.txt (Windows zip root, macOS Contents/Resources, AppImage usr/share/licenses/couchdogs, APK assets), CI checks each one; the release body names the pinned upstream tags and where the source and patches are.

Amendment (2026-11-23): the desktop client migrates. Its first start, when its own settings store is still empty, copies any pairing and settings once from the store v0.1.0 kept (Moonlight's settings identity: stock Moonlight's own store on macOS and Linux, and on Windows the portable Moonlight Game Streaming Project/Moonlight.ini beside the exe, which the new portable zip reads first), and never writes to that store. Because the copied identity is Moonlight's, the server sees both apps as one device. Each client-v* release also carries Couchdogs-client-source.tar.gz (the tagged client/ folder plus both apply.sh trees, submodules included), so the source of the exact build travels with the binaries; the notice text is generated from the UPSTREAM pin by apply.sh.