Commit Graph
29 Commits
Author SHA1 Message Date
3AvisD adae1b8bed docs: clarify the source-audit scope
State that scripts/validate.py checks revision format, patch existence and
patch parsing but does not verify applicability to pinned revisions. Point
patch changes at the separate prepare.py --check-only workflow.

Signed-off-by: 3AvisD <[email protected]>
2026-10-23 14:13:18 -06:00
3AvisD 2fcf44eaaf docs: apply review wording corrections
Distinguish the opt-in hide helper (local window management) from the
opt-in close helper (terminates eligible League client UI processes), and
list the tracked project artwork in the distribution scope.

Scope the platform-identity statement to repository-owned code: the
repository does not pass the identifiers as Riot authentication data, but
the values are guest-visible through IOKit and the official client's later
handling is outside the repository's scope. Use US spelling for licence
consistently.

Signed-off-by: 3AvisD <[email protected]>
2026-10-23 14:03:59 -06:00
3AvisD 56285686e8 docs: add the project repository URL
Link the project repository in the interoperability scope so readers can
distinguish it from the upstream Darling repository.

Signed-off-by: 3AvisD <[email protected]>
2026-10-23 14:03:59 -06:00
3AvisD c48272aa8f docs: clarify interoperability and compliance wording
Add docs/INTEROPERABILITY.md, an English scope document that describes
the project's interoperability and responsible-use practices: what it
distributes, how it handles local platform metadata and the MAC/AMFI
probe, how it keeps copyright and licence notices, how it avoids
access/authentication/integrity shortcuts, how it presents trademarks
and handles notices, and the user's responsibility for Riot's terms.

Update README, NOTICE, COMPLIANCE and PLATFORM_IDENTITY to link the
document and to state the opt-in window-helper and synthetic-identity
behaviour accurately. Add CONTRIBUTING with DCO sign-off and a scope
checklist.

Documentation-only change: no launcher, patch, build or test behaviour
changes.

Signed-off-by: 3AvisD <[email protected]>
2026-10-23 14:03:59 -06:00
3AvisD 9194beef2f fix(launcher): harden stale-client recovery
- fail closed when X11 omits _NET_CLIENT_LIST or WM_CLASS, and recognize the
  RiotClientServices window class;
- require stale client processes to be at least 60 seconds old;
- recheck process identity before SIGTERM and SIGKILL and recheck the window
  before signalling;
- document the age and window-detection guards.
2026-10-23 06:08:45 -06:00
3AvisD f8bb14624e fix(launcher): address in-game helper review
- restore hidden windows even when the launcher output pipe is closed;
- exit the hide watcher after ten idle minutes and start it only after the
  installed-client check;
- reject missing, malformed or invalid close-during-game preferences instead
  of silently selecting hide;
- document the preference contract and idle behavior.
2026-10-23 06:08:45 -06:00
3AvisD 0a04d4e16c fix(launcher): remove orphaned client-in-game helpers
A launcher can exit while its long-lived close/hide helper remains. The next
run then starts another watcher, so several copies watch the same prefix.

Add an opt-in RCLOL_CLEAN_STALE_HELPERS=1 preflight that removes only helper
processes of this prefix reparented to init/systemd. Helpers of a live
launcher, other prefixes, the game, Riot/League/CEF, darlingserver and the
runtime are preserved. Unreadable or relative process data leaves a process
alone.

Validated across repeated launcher starts: the cleanup removed four, then one,
then one orphaned watcher; a subsequent dry run reported no orphaned helpers.
Zombie reaping after partial recovery is tracked separately in #124.
2026-10-22 15:50:38 -06:00
3AvisD 732e9c8881 fix(launcher): handle YAML comments and log failures
- strip inline YAML comments from preference values, including quoted values;
- keep a successfully unmapped window tracked when the success log raises
  BrokenPipeError, while still discarding a window whose unmap failed;
- cover both cases with tests.
2026-10-22 15:30:45 -06:00
3AvisD c8dd3886fc fix(launcher): recover a stale client tree without restarting Darling
Darlingserver normally stays alive after the Riot Client or game is closed.
If the client window disappears but Riot/League/CEF processes remain,
restarting via run.sh reuses a half-dead runtime and can fail to open a
window.

Add an opt-in RCLOL_RECOVER_STALE_CLIENT=1 preflight. When a darlingserver is
alive, no game is running, no managed client window is visible and stale
client processes belong to this prefix, stop only that client/CEF tree.
Preserve darlingserver, launchd/mldr, sockets and .init.pid, then continue
with the normal product launch.

The helper fails closed when X11 is unavailable, never touches a running game
or a visible client window, and does not patch client binaries, CEF or assets.
It saves the Darling bootstrap, but not Riot Client/CEF startup; a full runtime
restart remains the fallback if no window appears.
2026-10-22 15:27:33 -06:00
3AvisD 5a06f34725 fix(launcher): fail closed on automatic mode edge cases
- restrict preference reads to the lol-user-experience section;
- distinguish a failed close-preference read from a missing key;
- reject xprop's 'not found' text as a WM_CLASS value;
- track a window before unmap so an interrupting signal still restores it;
- report the tricks-mode opt-out in the hide helper's startup message;
- cover the new cases with preference, window and interruption tests.
2026-10-22 15:07:47 -06:00
3AvisD 4faa622336 feat(launcher): select client-in-game mode from preferences
Add RCLOL_CLIENT_IN_GAME_TRICKS=1 as the practical launcher switch. It reads
lol-user-experience from LCULocalPreferences.yaml:

- potatoModeEnabled false or unreadable: no action;
- closeLeagueClientDuringGame true: close the client UI;
- closeLeagueClientDuringGame false: hide the client windows.

The existing close and hide switches remain low-level options when the
automatic switch is not set. The hide helper accepts the master switch, and
the resolver plus preference cases are covered by tests and documentation.

The local .desktop entry was validated with the master switch; the installed
preferences select hide on this machine.
2026-10-22 14:56:03 -06:00
3AvisD 3c046252a7 fix(launcher): address hide-client review findings
- associate target windows with the selected prefix through the guest PID,
  X11 _NET_WM_PID, NSpid and the loader socket; fail closed when ownership is
  unknown;
- let --once run without either opt-in gate, matching the documented
  diagnostic;
- route SIGHUP through the restore handler;
- cache non-empty WM_CLASS results per window and prune stale entries;
- cover unreadable /proc, host PID mapping and prefix ownership in tests.
2026-10-22 12:32:03 -06:00
3AvisD 415aa7a949 feat(launcher): hide the League client UI while a match runs
Add an opt-in alternative to closing LeagueClientUx: hide the managed
LeagueClientUx and Riot Client X11 windows while the game process runs and
show them again when it exits. The client stays open; the game window is
never touched.

Detection is attributed to the launcher prefix through __mldr_sockpath and
fails closed when proc, ownership or window state is unreadable. The helper
requires X11/Xwayland, restores the window on end, signal or error, and is
mutually exclusive with RCLOL_CLOSE_CLIENT_IN_GAME=1.

Document the flag, compliance scope and limits. A local 30-second test on an
i5-3470/RX 550 reduced summed client/CEF CPU from 120.7% to 93.4%; this is a
CPU-bound-host measurement, not a universal FPS claim.

No client binaries, CEF, assets or anti-cheat are modified.
2026-10-22 12:15:35 -06:00
3AvisD 0947a9f20d launcher: use a neutral Darling Launcher name and icon
Use a project-owned identity for the visible desktop entry while keeping the existing binary, package and window-matching identifiers working. The helper now copies the project's original icon instead of extracting one from the client, and the old game-named entry and icons it created are removed. Extend the packaging check to assert the neutral fields.
2026-10-20 23:49:39 -06:00
3AvisD 6dec8e176e launcher: use a neutral Darling Launcher name and icon
Use a project-owned identity for the visible desktop entry while keeping the existing binary, package and window-matching identifiers working. The helper now copies the project's original icon instead of extracting one from the client, and the old game-named entry and icons it created are removed. Extend the packaging check to assert the neutral fields.
2026-10-20 23:49:39 -06:00
3AvisD 75da66c1ea docs: add scope and terminology guidance
Add docs/COMPLIANCE.md with the project's compatibility scope: no DRM/anti-cheat circumvention, no third-party game assets, and neutral terminology for issues and PRs. Link it from README and NOTICE.
2026-10-19 23:06:47 -06:00
3AvisD 4157d1ed3b docs: add scope and terminology guidance
Add docs/COMPLIANCE.md with the project's compatibility scope: no DRM/anti-cheat circumvention, no third-party game assets, and neutral terminology for issues and PRs. Link it from README and NOTICE.
2026-10-19 23:06:47 -06:00
3AvisD 54edf6fca1 patches, tools, docs: use neutral integrity-check wording and state the compatibility scope
The patch comments and the Mach-O strings filter named an anti-cheat product. Use neutral wording; the patches still differ only in comments. The platform-identity document now says the overrides are for compatibility, not a bypass of anti-cheat, telemetry, licensing or platform controls.
2026-10-19 22:47:59 -06:00
3AvisD 3309f079c7 patches, tools, docs: use neutral integrity-check wording and state the compatibility scope
The patch comments and the Mach-O strings filter named an anti-cheat product. Use neutral wording; the patches still differ only in comments. The platform-identity document now says the overrides are for compatibility, not a bypass of anti-cheat, telemetry, licensing or platform controls.
2026-10-19 22:47:59 -06:00
3AvisD 57660f168d flake.nix: mark the desktop entry and package as unofficial
Keep the executable names and StartupWMClass; only the user-facing name, comment and descriptions change.
2026-10-19 22:47:59 -06:00
3AvisD 24962cc056 flake.nix: mark the desktop entry and package as unofficial
Keep the executable names and StartupWMClass; only the user-facing name, comment and descriptions change.
2026-10-19 22:47:59 -06:00
3AvisD 5cf12f4f06 README, NOTICE: add trademark notice and remove the gameplay clip
Consolidate the non-affiliation note into a dedicated Trademarks section, replace the embedded gameplay video with a pointer to the status document, and reword the takedown note as a continuity statement. Describe the compatibility tools as referring to public API names and constants.
2026-10-19 22:47:59 -06:00
3AvisD 9651602cba README, NOTICE: add trademark notice and remove the gameplay clip
Consolidate the non-affiliation note into a dedicated Trademarks section, replace the embedded gameplay video with a pointer to the status document, and reword the takedown note as a continuity statement. Describe the compatibility tools as referring to public API names and constants.
2026-10-19 22:47:59 -06:00
3AvisD 7947164c2c darling-lol: use an original project mark instead of the game logo
The bundled darling-lol.svg/png are the League of Legends logo, a Riot Games trademark, used as the project icon. The README already states that the project is not affiliated with or endorsed by Riot Games, so the icon should not be someone else's mark.

Replace both files with an original D monogram. Same file names, so flake.nix and the desktop entry keep working. The mark is provisional and easy to swap for a final one. No functional changes.
2026-10-19 22:36:55 -06:00
3AvisD 3edddf250d darling-lol: use an original project mark instead of the game logo
The bundled darling-lol.svg/png are the League of Legends logo, a Riot Games trademark, used as the project icon. The README already states that the project is not affiliated with or endorsed by Riot Games, so the icon should not be someone else's mark.

Replace both files with an original D monogram. Same file names, so flake.nix and the desktop entry keep working. The mark is provisional and easy to swap for a final one. No functional changes.
2026-10-19 22:36:55 -06:00
3AvisD 72eb402cd4 fix(launcher): keep Mesa's shader cache on the host
Mesa derives its shader disk cache from $HOME. Inside the guest that is
/Users/<user>, which does not exist on the host filesystem, so Mesa could not
create the cache and disabled it, once per process:

    Failed to create /Users/<user> for shader cache (Permission denied)---disabling

One launcher log contained 212 of those lines, and no shader compiled by one
process was reused by another process or by the next start: the client and the
game recompiled every shader on every launch, spending CPU at startup for no
gain.

Mesa is host code loaded into the guest and reads MESA_SHADER_CACHE_DIR verbatim,
so point it at a host directory; Mesa creates mesa_shader_cache/ (client and game
shaders) and radv_builtin_shaders/ below it. A non-empty value from the caller is
preserved, and a directory that cannot be created leaves the previous behaviour
instead of ending the launch.

Observed on a Radeon RX 550 with radv: no shader-cache failure after the change,
and 434 files / 5.6 MB written during one client start, still growing while the
client ran. The cache is reused from the second start on, which lowers the
client's CPU use while it starts; the startup-time gain itself has not been
measured separately.
2026-10-18 12:18:33 -06:00
3AvisD efc92dfb04 fix(launcher): keep Mesa's shader cache on the host
Mesa derives its shader disk cache from $HOME. Inside the guest that is
/Users/<user>, which does not exist on the host filesystem, so Mesa could not
create the cache and disabled it, once per process:

    Failed to create /Users/<user> for shader cache (Permission denied)---disabling

One launcher log contained 212 of those lines, and no shader compiled by one
process was reused by another process or by the next start: the client and the
game recompiled every shader on every launch, spending CPU at startup for no
gain.

Mesa is host code loaded into the guest and reads MESA_SHADER_CACHE_DIR verbatim,
so point it at a host directory; Mesa creates mesa_shader_cache/ (client and game
shaders) and radv_builtin_shaders/ below it. A non-empty value from the caller is
preserved, and a directory that cannot be created leaves the previous behaviour
instead of ending the launch.

Observed on a Radeon RX 550 with radv: no shader-cache failure after the change,
and 434 files / 5.6 MB written during one client start, still growing while the
client ran. The cache is reused from the second start on, which lowers the
client's CPU use while it starts; the startup-time gain itself has not been
measured separately.
2026-10-18 12:18:33 -06:00
3AvisD 823fa6addc fix(launcher): close the League client UI while a match runs
The client does not come back properly after a match when its own "Close client
during game" option is enabled. The UI (LeagueClientUx and its helpers) is a
Chromium/CEF instance and, under Darling, the pre-match instance keeps running:
the client the backend starts when the match ends is a second CEF instance on the
same --user-data-dir, and its window never paints. Its DOM and audio work and the
window stays black; closing the client by hand during a match leaves the same
state for the same reason.

RCLOL_CLOSE_CLIENT_IN_GAME=1 opts in to closing that UI from the host, and only
while a match runs, so the client that appears afterwards is the only instance.
The UI also competes with the game for CPU: on a four-core host with a Radeon
RX 550 a practice match reported roughly 120 FPS with the UI running and roughly
180 FPS with it closed. This is not the helper-killing memory optimization the
RAM section warns against, and the Riot client, the League backend and the game
are never touched.

The helper fails closed. It attributes the game and the client to the launcher's
prefix through the loader's __mldr_sockpath, since guest processes do not carry
DPREFIX (checked on a live session). It never closes a client younger than 60
seconds (the one the backend starts after a match), preserves a process of
another installation or owner, acts only when the environment and the stat fields
can be read, gives up after three closes in one match, and leaves after ten
minutes without a client or a match. It is off by default.

Tests use fake /proc entries and mock every signal.
2026-10-18 12:18:33 -06:00
3AvisD bc8fa71a7f fix(launcher): close the League client UI while a match runs
The client does not come back properly after a match when its own "Close client
during game" option is enabled. The UI (LeagueClientUx and its helpers) is a
Chromium/CEF instance and, under Darling, the pre-match instance keeps running:
the client the backend starts when the match ends is a second CEF instance on the
same --user-data-dir, and its window never paints. Its DOM and audio work and the
window stays black; closing the client by hand during a match leaves the same
state for the same reason.

RCLOL_CLOSE_CLIENT_IN_GAME=1 opts in to closing that UI from the host, and only
while a match runs, so the client that appears afterwards is the only instance.
The UI also competes with the game for CPU: on a four-core host with a Radeon
RX 550 a practice match reported roughly 120 FPS with the UI running and roughly
180 FPS with it closed. This is not the helper-killing memory optimization the
RAM section warns against, and the Riot client, the League backend and the game
are never touched.

The helper fails closed. It attributes the game and the client to the launcher's
prefix through the loader's __mldr_sockpath, since guest processes do not carry
DPREFIX (checked on a live session). It never closes a client younger than 60
seconds (the one the backend starts after a match), preserves a process of
another installation or owner, acts only when the environment and the stat fields
can be read, gives up after three closes in one match, and leaves after ten
minutes without a client or a match. It is off by default.

Tests use fake /proc entries and mock every signal.
2026-10-18 12:18:33 -06:00