## Pi 4, Raspbian Buster and Wine 4.0

RET80
Posts: 22
Joined: Mon Dec 19, 2016 10:52 pm

### Pi 4, Raspbian Buster and Wine 4.0

Hi everyone,

So, I have the latest Raspberry Pi board (the 2GB model) and it's a fantastic board, lots of performance!
I wanted to test out Wine on the Raspberry Pi now that it comes with the newly designed Buster Raspbian OS. I did a:

Code: Select all

sudo apt-get install wine  
and typed in 'winecfg', the configuration window came up; everything looks good!

But, I'm running into a problem. I was going to test Hover! (You know, that really old Windows 95 game?) and wine came back and prompted me:

Code: Select all

wine: Bad EXE format for F:\home\pi\Desktop\Hover\HOVER.EXE.
It looks like it's not liking any win32-based applications?
Has anyone ran into this problem as well?
How can I get a 32-bit application running with Raspbian's version of Wine? Any help would be great. I know what I'm doing is pretty fringe, but I'll be using this with other 32-bit applications soon.
"Just because you invested your valuable time in compensating for a software designer’s madness, does not mean the software is good. It means you don’t value your own time as much as you should. "

DougieLawson
Posts: 36177
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK

### Re: Pi 4, Raspbian Buster and Wine 4.0

WINE == WINE IS NOT [an] EMULATOR

Wine is a Linux library that provides some Windows GUI functions for native Linux programs. It doesn't mean you can run an X86 or X86_64 based program on an ARM based processor.

You're out of luck unless you can find a viable X86/X86_64 emulator.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

This is a doctor free zone.

RET80
Posts: 22
Joined: Mon Dec 19, 2016 10:52 pm

### Re: Pi 4, Raspbian Buster and Wine 4.0

DougieLawson wrote:
Wed Jul 03, 2019 12:40 am
WINE == WINE IS NOT [an] EMULATOR

Wine is a Linux library that provides some Windows GUI functions for native Linux programs. It doesn't mean you can run an X86 or X86_64 based program on an ARM based processor.

You're out of luck unless you can find a viable X86/X86_64 emulator.
Ah, you're right.
I just tested with a 64-bit program and received the same results.
I was hoping it was going to run x86 or x86_64 based applications because I heard wine was currently developing something called 'wine hangover' which is to run x86 applications on ARM, and I thought this was it (I could still be wrong?) (Here's the link: https://www.phoronix.com/scan.php?page= ... a-Released) so in this case WIAE = Wine ...is? an emulator?

I am able to run notepad.exe and explorer.exe from wine, but I'm assuming those are ARM compiled executables?
"Just because you invested your valuable time in compensating for a software designer’s madness, does not mean the software is good. It means you don’t value your own time as much as you should. "

RET80
Posts: 22
Joined: Mon Dec 19, 2016 10:52 pm

### Re: Pi 4, Raspbian Buster and Wine 4.0

I just tried the ARM64 compiled .exe binaries (which you can nab here: https://forum.xda-developers.com/devdb/ ... #downloads)
and Buster's version of WINE still complains:

Code: Select all

0009:err:process:replace_process L"F:\\home\\pi\\Downloads\\ARM64 PuTTY\\putty.exe" not supported on this installation (x86 binary)

So if it can't run x86, x86_64 or ARM64 for Windows 10 (also a .exe). ...what does it actually DO?
Maybe I'm misinterpreting its use case?
"Just because you invested your valuable time in compensating for a software designer’s madness, does not mean the software is good. It means you don’t value your own time as much as you should. "

RET80
Posts: 22
Joined: Mon Dec 19, 2016 10:52 pm

### Re: Pi 4, Raspbian Buster and Wine 4.0

Upon further investigation, it looks like Wine will only run this specific format:

Code: Select all

file iexplore.exe
iexplore.exe: PE32 executable (GUI) ARMv7 Thumb, for MS Windows

A PE32 executable for ARMv7.

The putty.exe file for Windows 10 is:

Code: Select all

file putty.exe
putty.exe: PE32+ executable (GUI), for MS Windows

So the use case for this wine is incredibly niche, to be fair, not worth the hassle at this point because this version of wine doesn't even target Windows 10, so then what could it possibly be used for? ReactOS? Regardless, too niche to be useful.

Maybe someone out there might need it some day.
"Just because you invested your valuable time in compensating for a software designer’s madness, does not mean the software is good. It means you don’t value your own time as much as you should. "

jdonald
Posts: 413
Joined: Fri Nov 03, 2017 4:36 pm

### Re: Pi 4, Raspbian Buster and Wine 4.0

RET80 wrote:
Wed Jul 03, 2019 1:30 am

So the use case for this wine is incredibly niche, ... what could it possibly be used for?
I was hoping it was going to run x86 or x86_64 based applications
Hangover is still in its infancy, and when it's ready it'll still require a 64-bit kernel.

In the meantime, what you were looking for is not Wine 4.0 on Raspbian, but Wine 4.0 Debian-i386 inside a chroot with qemu-user on Raspbian. novaspirit has a good tutorial with video, and this forum has multiple topics about setting this up from scratch with debootstrap.

Jorgisven
Posts: 1
Joined: Fri Sep 06, 2019 4:56 pm

### Re: Pi 4, Raspbian Buster and Wine 4.0

jdonald wrote:
Fri Aug 30, 2019 11:00 pm
RET80 wrote:
Wed Jul 03, 2019 1:30 am

So the use case for this wine is incredibly niche, ... what could it possibly be used for?
I was hoping it was going to run x86 or x86_64 based applications
Hangover is still in its infancy, and when it's ready it'll still require a 64-bit kernel.

In the meantime, what you were looking for is not Wine 4.0 on Raspbian, but Wine 4.0 Debian-i386 inside a chroot with qemu-user on Raspbian. novaspirit has a good tutorial with video, and this forum has multiple topics about setting this up from scratch with debootstrap.
Came here to say this. Here's the RasPi-specific walkthrough, which may accomplish the goal:
https://www.novaspirit.com/2019/04/15/run-x86-arm/

Note that x64 Win32 is not supported. But x86 Win32 is. Since many x64 apps have their x86 counterpart, it may be prudent to look for that in your target app, first.

scruss
Posts: 2493
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

### Re: Pi 4, Raspbian Buster and Wine 4.0

RET80 wrote:
Wed Jul 03, 2019 1:30 am
… not worth the hassle at this point because this version of wine doesn't even target Windows 10, so then what could it possibly be used for?
Wine lets me run the control software for a very expensive piece of machine shop hardware. This software was never developed past 32-bit Windows XP. For this - and this only - Wine on an ancient Mac is a lifesaver for me.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

jdonald
Posts: 413
Joined: Fri Nov 03, 2017 4:36 pm

### Re: Pi 4, Raspbian Buster and Wine 4.0

Welcome. Yeah, novaspirit's tutorial is solid. Note that it's a lot quicker to set up now that Raspbian Buster comes with a 3G/1G kernel. Also, I heard that starting with Buster you you can skip the odd step of copying qemu-*-static into the chroot's /usr/bin.
Jorgisven wrote:
Fri Sep 06, 2019 5:07 pm
Note that x64 Win32 is not supported.
User dqs105 reported getting qemu-x86_64-static+wine64 to work: https://www.raspberrypi.org/forums/view ... 6&start=74