Skip to content

fix: fall back to 'wine' when 'wine64' is unavailable - #602

Merged
erikian merged 1 commit into
mainfrom
fix/wine-fallback-513
Jun 28, 2026
Merged

fix: fall back to 'wine' when 'wine64' is unavailable#602
erikian merged 1 commit into
mainfrom
fix/wine-fallback-513

Conversation

@claude

@claude claude Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Requested by Samuel Attard · Slack thread

Before / After

Before: On 64-bit hosts (x64/arm64), the Wine presence check only probed for the wine64 binary. Many distributions ship only a wine binary (the common wine metapackage), so these machines failed with You must install both Mono and Wine on non-Windows even when Wine was actually installed.

After: The check probes for wine64 first and falls back to wine when wine64 is absent. Hosts that only have the wine binary now work, and the binary that was actually found is the one used for downstream Wine invocations.

How

In createWindowsInstaller (src/index.ts), the wineExe variable is now mutable. The non-Windows branch first calls checkIfCommandExists(wineExe) for the preferred binary; if that fails and the preferred binary was wine64, it sets wineExe = 'wine' and probes again. Only if neither probe succeeds (or Mono is missing) is the error thrown. Because wineExe is updated to the binary that was found, the later cmd = wineExe calls invoke the correct executable.

Fixes #513.


Generated by Claude Code

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
MarshallOfSound marked this pull request as ready for review June 28, 2026 04:50
@MarshallOfSound
MarshallOfSound requested a review from a team as a code owner June 28, 2026 04:50
@erikian
erikian merged commit d22a30f into main Jun 28, 2026
14 checks passed
@erikian
erikian deleted the fix/wine-fallback-513 branch June 28, 2026 12:19
@electron-npm-package-publisher

Copy link
Copy Markdown

🎉 This PR is included in version 5.4.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants