diff --git a/packaging/wsl2/README.md b/packaging/wsl2/README.md index 479ab73..5a68687 100644 --- a/packaging/wsl2/README.md +++ b/packaging/wsl2/README.md @@ -97,6 +97,22 @@ The installer is written to `out/make/squirrel.windows/x64/` as `You must install both Mono and Wine on non-Windows`. Install e.g. `wine` and `mono-complete` (or `mono-core`) first. + It also needs a **64-bit (WoW64) Wine prefix**. Squirrel is a 32-bit .NET + assembly but zips the package by `ShellExecuteEx`-ing the 64-bit + `node_modules/electron-winstaller/vendor/7z.exe`; a 32-bit-only prefix + (`#arch=win32`) cannot launch a 64-bit PE and the build fails with + `ShellExecuteEx failed: Bad EXE format`. Build against a WoW64 prefix without + disturbing an existing one: + + ```sh + export WINEARCH=win64 WINEPREFIX="$HOME/.wine-trimsp64" + wineboot -u + npm run make:win + ``` + + (Wine ≥ 9 supports running 32-bit apps from a `win64` prefix, so a single + prefix is enough.) On Windows none of this applies. + ### Verifying the shipped .exe The `TrimSP.exe` inside the install loads the engine only through WSL, so the @@ -144,5 +160,6 @@ workbench is often driven remotely. After the first-run import, verify: - `wsl.exe` availability is assumed; older Windows builds without WSL2 must install it (`wsl --install`) first. - The macOS runtime is not built. -- Cross-building the `.exe` from Linux additionally needs Wine and Mono (see - above); building on Windows needs neither. +- Cross-building the `.exe` from Linux additionally needs Wine, Mono and a + 64-bit (WoW64) Wine prefix (see above); building on Windows needs none of + these.