Repository navigation
fix(setup): stage FEX scripts and tools when MetalSharp Wine was downloaded - #774
Merged
aaf2tbz merged 1 commit intoNov 13, 2026
Merged
Conversation
…loaded Switching a regular MetalSharp.app to the FEX runtime downloads MetalSharp-Wine.app into ~/.metalsharp/downloads/. Setup then looked for configs and scripts/tools beside that app, assuming it sits in MetalSharp.app's Resources, so step 10 failed with "missing or invalid metalsharp-scripts-tools.tar.zst", an archive the FEX path never reads. The FEX rule-set fallback in mtsp.c made the same assumption. Resolve both through ms_app_resources_path(), which looks only in MetalSharp.app's Resources, and keep the downloads/ fallback to ms_wine_fex_app_source().
aaf2tbz
approved these changes
Nov 13, 2026
Collaborator
|
Thank you for this fix! |
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.
Switching the regular 1.1.0 app (
MetalSharp-1.1.0-arm64.dmg) to FEX with the FEX | x86_64 toggle fails setup at step 10:The regular app does not carry
MetalSharp-Wine.app, soms_wine_runtime_downloadputs it in~/.metalsharp/downloads/, andapp_source()returns that path.fex_stage_scripts_tools()insetup.cstrips the app name and expectsconfigsandscripts/tools/{native,updater}in the same folder, which is only true when the app sits inMetalSharp.app/Contents/Resources. Indownloads/they are missing, so staging fails. The error text points at the scripts-tools archive, but the FEX path never reads it.ms_mtsp_open_rules_file()inmtsp.chas the same assumption for its Resources fallback. It's hidden there because the staged~/.metalsharp/configscopy is found first.Changes:
ms_app_resources_path(name)inwine_runtime.c: the Resources lookup split out ofapp_source()(next to the backend, then/Applications/MetalSharp.app), without thedownloads/fallback.$METALSHARP_APP_RESOURCESoverrides it for tests.app_source()uses it and keeps thedownloads/fallback, soms_wine_fex_app_source()behaves as before.fex_stage_scripts_tools()and the rules fallback inmtsp.ctake Resources fromms_app_resources_path()instead of the Wine app's parent.wine_runtime_test.c: with the Wine app only indownloads/,ms_wine_fex_app_source()returns the download andms_app_resources_path("configs")returns Resources.Tested:
make -C app/src-c testpasses for both the regular and fex variants.POST /setup/install-allon a scratchMETALSHARP_HOME, withMETALSHARP_ACTIVE_RUNTIME=fex, the bundled tool paths from the regular 1.1.0 app, andMetalSharp-Wine.apponly indownloads/. The 1.1.0 backend from/Applications/MetalSharp.appfails at step 10 with the error above. The backend from this branch stagesscripts/tools/{cef,configs,native,updater}and gets to step 18 (Steam prefix). I stopped it there. macOS 27.2, M4 Max.Workaround on 1.1.0: copy
configsandscripts/tools/{native,updater}from/Applications/MetalSharp.app/Contents/Resourcesinto~/.metalsharp/downloads/, then run setup again. With that in place, setup completed all 18 steps on my install.