[pkg-wine-party] Bug#769234: Please (re)add binfmt format for wine64 executable

Mathieu Malaterre malat at debian.org
Wed Nov 12 10:27:06 UTC 2014

Package: wine-binfmt
Version: 1.6.2-16

Back on wheezy `wine` shell script used to do the following trick to
decide to call wine32 or wine64 using:

if test "$(file -b -L "$1" | cut -d\  -f1)" = "PE32+" -o "$WINEARCH" =
"win64"; then

This made it possible to execute: $ ./bla.exe without knowing whether
or not bla.exe was meant for x64 arch ahead of time.

Please resurrect this code path in current wine. I'm affecting the bug
to binfmts since it really lies at this level, feel free to reassign
to `wine` package (package which used to provide the wine indirection
described above).

Alternate solution:

Technically a new magic number could used to decide to call wine64
and/or wine32 since the binary files differ:

 $ file bla.exe
 bla.exe: PE32 executable (console) Intel 80386, for MS Windows
 $ file bla2.exe
 bla2.exe: PE32+ executable (console) x86-64, for MS Windows


$ cat /usr/share/binfmts/wine32
package wine-binfmt
interpreter /usr/bin/wine32
magic XYZ

$ cat /usr/share/binfmts/wine64
package wine-binfmt
interpreter /usr/bin/wine64
magic UVW

This is a simplification of #733556, which I'll close shorty.

More information about the pkg-wine-party mailing list