Skip to content

Start a Linux game by its release's own start script - #214

Merged
elripalda merged 1 commit into
elripalda:mainfrom
Element20Three:fix/linux-dotnet-start-script
Nov 16, 2026
Merged

elripalda merged 1 commit into
elripalda:mainfrom
Element20Three:fix/linux-dotnet-start-script

Conversation

@Element20Three

Copy link
Copy Markdown
Contributor

What this changes

Fixes #207.

A .NET recomp's Linux release ships its app host (e.g. sotn) next to a run.sh that finds the player's runtime, sets DOTNET_ROOT, and then starts the host. The launcher picked the app host as the game; the host searches only the default locations, finds nothing, and Play ends at once with code 131 and "You must install .NET to run this application."

find_exe now ranks a Linux start script (run.sh, start.sh, Launch.sh) ahead of the program it sets up, the same way it already treats a Windows launch script. Diagnostic and build scripts don't win, nor do scripts in a tool folder or a dedicated server's (server/start.sh). EXE_RULES goes from 20 to 21, so installs picked by the older rules look at their folder again on the next Play and move to the start script automatically.

The crash window also recognises the Linux app host's output ("You must install .NET...", ".NET location: Not found", app-launch-failed) and the "Download the .NET runtime" link next to it, so a runtime that is genuinely missing still offers Get .NET.

How you tested it

  • npm test passes (620 passed, 1 ignored)
  • node --test tests/*.test.cjs passes (258 passed)
  • Tried it in the launcher (npm run dev)

The new Rust test a_linux_start_script_goes_ahead_of_the_program_it_sets_up builds the reported layout — a 78 KB .NET app host, its managed DLL, and run.sh — and checks run.sh is picked. It also checks that a diagnostic script and a dedicated server's start.sh don't win.

Against the log from #207, the crash window's new pattern matches and reads its download link (https://aka.ms/dotnet-core-applaunch?...).

Checklist

  • One change per pull request
  • No version bump or patch notes (those are done at release time)
  • Not a recomplauncher.json change, so no schema or docs update

A .NET release's run.sh finds the player's runtime and sets DOTNET_ROOT before
starting the app host; the host on its own finds nothing and exits at once with
code 131. The installer picked the host as the game, so Play never started it.

find_exe now ranks a Linux start script (run.sh, start.sh, Launch.sh) ahead of
the program it sets up, as it already does for a Windows launch script, but
never a diagnostic, build, tool or dedicated-server script. EXE_RULES 21 makes
installs picked by the older rules look again on their next Play. The crash
window also reads the Linux app host's message and its "Download the .NET
runtime" link.

Fixes elripalda#207.
@elripalda
elripalda merged commit c2a608d into elripalda:main Nov 16, 2026
5 checks passed
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.

Crash: Symphony Recomp closed with code 131

2 participants