Repository navigation
Start a .NET game through its release's Linux start script - #256
Merged
elripalda merged 2 commits intoNov 17, 2026
Merged
Conversation
A game whose boot profile names a Windows program is started by the native twin beside it. For a .NET release that twin is the app host, which looks for the runtime only where .NET put it system-wide and exits at once with code 131 when the player's runtime lives in ~/.dotnet. The release ships run.sh to find that runtime and set DOTNET_ROOT, but Play never reached it: the profile's program won over the game's selected exe. When the program a profile resolves to is a .NET app host (<name>.runtimeconfig.json beside it), Play now starts the release's Linux start script instead. A native build without a runtimeconfig is still itself. Fixes elripalda#255.
Resolve profile.rs: use named_program for the start program and keep the .NET app host's Linux start-script handoff.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Fixes #255.
On Linux, Play takes the game's boot profile first. For a .NET release, the profile's Windows program (
sotn.exe) maps to the native twin beside it (native_twin→sotn), which is the app host. The app host looks for the runtime only where .NET put it system-wide; when the player's runtime is in~/.dotnet, it stops at once with code 131 and "You must install .NET to run this application."The release's own
run.shfinds that runtime, exportsDOTNET_ROOTandPATH, thenexecs the host. #214 made the installer pickrun.sh(and bumpedEXE_RULESto 21), but the profile path still started the host, sog.exe = run.shwas bypassed.Profile::program_fornow checks the program it resolves. When it is a .NET app host (<name>.runtimeconfig.jsonbeside it) and the release has a Linux start script (run.sh,start.sh,<name>.sh,launcher.sh,play.sh), Play starts the script. This covers a profile that names the Windows program and one that names the Linux host.A native twin without a runtimeconfig is still itself, so
SuperMetroidSNESRecomp.exekeeps resolving to its native ELF (checked against the installed release, which has no runtimeconfig).Prepare::program_in(a build tool's program) and macOS are untouched.How you tested it
npm testpasses (654 passed, 1 ignored)node --test tests/*.test.cjspasses (280 passed)npm run dev)The new Rust test
a_dotnet_app_host_starts_through_the_releases_scriptbuilds the reported layout — thesotnapp host,sotn.runtimeconfig.json, andrun.sh— and checks that bothsotn.exeandsotnstart throughrun.sh. It also checks that without the script the host is still used, and that a native build stays itself when arun.shsits beside it.The reported log shows
DOTNET_ROOT = <not set>even thoughrun.shsets it before starting the host, which matches the profile path startingsotndirectly. The installed folder matches the test layout:sotnis an x86-64 ELF app host withsotn.runtimeconfig.jsonandrun.shbeside it.Checklist
recomplauncher.jsonchange, so no schema or docs update