Document the win64/WoW64 Wine prefix needed to cross-build the .exe
electron-winstaller's Squirrel runs as 32-bit .NET but zips the package by
ShellExecuteEx-ing the 64-bit vendor/7z.exe. A 32-bit-only Wine prefix
('#arch=win32') cannot launch a 64-bit PE, so the cross-build fails with
'ShellExecuteEx failed: Bad EXE format'. Record the WINEARCH=win64 recipe
(and the pre-existing Wine+Mono requirement) instead of leaving it as a
build-host surprise.
This commit is contained in:
1 parent
b3e75b2300
commit
752c8363bf
1 file changed
+19
-2
@@ -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.
|
||||
Reference in new issue
Block a user