Emulation

From WineHQ Wiki
Jump to: navigation, search

Emulation

Wine can run on different architectures, still most available Windows applications are x86 ones. As Wine Is Not an Emulator, all those applications can't run on other architectures with Wine alone. Here, we want to discuss some options on how to use Wine together with emulators to achieve what Wine can't do alone.

System emulation

The easiest thing, but slowest, is to use an emulator to run a full x86 Linux installation in it. For example you can grab an image from stacklet, this list or somewhere else and run it with QEMU. There are many instructions for that on the Internet and you can also use different emulators, like e.g. [Bochs http://bochs.sourceforge.net/]. Still, this solution involves even booting the system and doesn't integrate very good into your desktop.

User-Space-Emulation

(Or User-Mode Emulation)
At least on Linux it is possible to use QEMU to jump out of emulation at syscall level. This means your native kernel is used and there is no need to emulate one. This approach also integrates well into your Desktop and doesn't require a big image file. Still you need Wine compiled for x86 and all it's dependencies, which could be done with Buildroot or tools like debootstrap. There is an old thread on the Forums on how to setup Wine for User-Space-Emulation: I got Wine/x86 1.5.11 to run on Linux/ARM with qemu!. If your QEMU is not too old, you most likely don't have to patch and/or compile it yourself. You still might need a x86 WINEPREFIX from a different machine.
It seems a ready-to-use version for Raspberry Pis can be found here: github/AlbrechtL/RPi-QEMU-x86-wine

Hangover

Similar to User-Space-Emulation, but much faster. Here we jump out of emulation at the win32 API level. This means you only need a native Wine installation, some wrapper DLLs and some Wine DLLs comiled for Windows. It currently only works on ARM64 and x86_64 with Linux or Android. The code can be found at GitHub, but it's not quite ready for users yet. If you want to try it anyway, carefully read the README and make sure you understand it. See also WineConf2017.