Adding binfmt configuration to official Wine packages

Jens Reyer jre.winesim at gmail.com
Tue Aug 23 07:07:01 CDT 2016


On 23.08.2016 09:21, Marcus Meissner wrote:
> On Mon, Aug 22, 2016 at 11:50:15PM -0300, Bruno Jesus wrote:
>> On Mon, Aug 22, 2016 at 11:26 PM, Alex Henrie <alexhenrie24 at gmail.com> wrote:
>>> I think the real problem here is a technical one: The loader would
>>> have to launch Wine, Mono, or DOSBox depending on the contents of the
>>> binary.
>>
>> This is the part I also don't understand. When I run wine
>> ancient_dos.exe, or wine wine32.exe or wine dot_net_app.exe wine seems
>> to figure out what is supposed to be launched. Why would it be
>> different with binfmt? It will call wine and wine will sort it out,
>> no?

I can confirm that binfmt support for Wine with DOSBox works. I
successfully tested it with the 16-bit DOS app Daggerfall:

$ file INSTALL.EXE
INSTALL.EXE: MS-DOS executable, LE executable for MS-DOS, CauseWay DOS
extender

"./INSTALL.EXE" works with Wine and DOSBox installed (Note:
Unfortunately the changes to make DOSBox work with Wine still didn't
make it to an official DOSBox release, yet. But e.g. in Debian they are
already applied.)

If DOSBox isn't installed you get an understandable error message.


> I doubt it will launch the Linux Mono though, but try the Wine Mono stack.

I don't know the implications for Wine, but the native "mono-runtime"
package in Debian installs binfmt support for the same magic "MZ":

# sudo update-binfmts --display
[...]
cli (enabled):
     package = mono-runtime
        type = magic
      offset = 0
       magic = MZ
        mask =
 interpreter = /usr/bin/cli
    detector = /usr/lib/cli/binfmt-detector-cli
[...]
wine (enabled):
     package = wine
        type = magic
      offset = 0
       magic = MZ
        mask =
 interpreter = /usr/bin/wine
    detector =
[...]

At least for the non-.NET applications that I tested this didn't cause
any trouble - they were correctly started with Wine.

I don't know any .Net applications, so no tests here.

Greets
jre



More information about the wine-devel mailing list