Skip to content

RecompLauncher: write the log and copy its lines to the launcher's stream - #893

Merged
peiikai merged 1 commit into
developfrom
fix/launcher-log-file
Nov 26, 2026
Merged

peiikai merged 1 commit into
developfrom
fix/launcher-log-file

Conversation

@peiikai

@peiikai peiikai commented Nov 25, 2026

Copy link
Copy Markdown
Owner

When RecompLauncher starts the game (RECOMPLAUNCHER set, not 0), stderr is the launcher's pipe.

  • Windows: no lasrecomp.log was written next to the exe, so the launcher profile's log folder had nothing.
  • Linux: the log took stderr, so the launcher's own game output was empty.

Now the log is opened as for any start, and a thread follows the log file and copies new lines into a copy of the launcher's stderr. It drains at exit, in plat_exec, plat_terminate and plat_fatal_notice (try-lock there). On Linux the descriptor stays open across exec through LASRECOMP_LOG_TEE. macOS is unchanged.

Ported from peiikai/ReTri#94.

Tests:

  • tools/test_windows_logs.py: launcher start and launcher relaunch write the log and the stream gets the same bytes; RECOMPLAUNCHER=0 keeps the old behaviour.
  • tools/test_cli.py: end-to-end check on Linux and Windows (CI runs it on Linux only).

🤖 Generated with Claude Code

…ream

Started by RecompLauncher (RECOMPLAUNCHER set, not "0"), stderr is the
launcher's pipe. On Windows that meant no lasrecomp.log next to the exe; on
Linux the log took stderr and the launcher's game output stayed empty.

The log is now opened as for any start, and a thread follows the log file and
copies new bytes into a duplicate of the launcher's stderr. It drains at exit,
in plat_exec, plat_terminate and plat_fatal_notice (try-lock there). On Linux
the descriptor survives exec via LASRECOMP_LOG_TEE. macOS is unchanged.

Ported from ReTri (peiikai/ReTri#94).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@peiikai
peiikai merged commit 5619c12 into develop Nov 26, 2026
8 checks passed
@peiikai
peiikai deleted the fix/launcher-log-file branch November 26, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant