fix: fall back to 'wine' when 'wine64' is unavailable - #602
Merged
Conversation
On 64-bit hosts the Wine check only probed for 'wine64', so x64/arm64 machines that ship only the 'wine' binary (the common 'wine' metapackage) failed with 'You must install both Mono and Wine on non-Windows' even when Wine was installed. Probe for 'wine64' first and fall back to 'wine' when it is absent, using the binary that was actually found for downstream invocations. Fixes #513
MarshallOfSound
approved these changes
Jun 28, 2026
MarshallOfSound
marked this pull request as ready for review
June 28, 2026 04:50
erikian
approved these changes
Jun 28, 2026
|
🎉 This PR is included in version 5.4.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Requested by Samuel Attard · Slack thread
Before / After
Before: On 64-bit hosts (
x64/arm64), the Wine presence check only probed for thewine64binary. Many distributions ship only awinebinary (the commonwinemetapackage), so these machines failed withYou must install both Mono and Wine on non-Windowseven when Wine was actually installed.After: The check probes for
wine64first and falls back towinewhenwine64is absent. Hosts that only have thewinebinary now work, and the binary that was actually found is the one used for downstream Wine invocations.How
In
createWindowsInstaller(src/index.ts), thewineExevariable is now mutable. The non-Windows branch first callscheckIfCommandExists(wineExe)for the preferred binary; if that fails and the preferred binary waswine64, it setswineExe = 'wine'and probes again. Only if neither probe succeeds (or Mono is missing) is the error thrown. BecausewineExeis updated to the binary that was found, the latercmd = wineExecalls invoke the correct executable.Fixes #513.
Generated by Claude Code