Monday, 9 September 2013

Why doesn't WINE work perfectly?

Why doesn't WINE work perfectly?

WINE is an open source implementation of the Windows API for UNIX-like
operating systems. It is very widely used, and allows people using UNIX
and Linux to run software written for Windows, which is occasionally
useful. I'd like to point out that I have only a very naive understanding
of the program and how it works.
As I understand it, the API is an interface containing all the (C++ ?)
functions, constants, classes, macros, structures etc. that are used in
Windows programs to make interact with the operating system in ways that
go beyond displaying text at a prompt. For example, we might have:
void buttonPressed()
{
CreateWindow(...) //API call
//other commands
}
which creates a new window when the buttonPressed function is called.
I presume that the Windows API functions are all in DLLs so that Windows
programs don't have to link all the OS libraries they are using. Wine can
then do the same thing, creating libraries of the API functions that
native Windows programs can call inside a UNIX-like environment.
I accept that reimplementing the Windows API is a big and difficult
undertaking. But once it has been implemented, it appears that all Windows
applications should run on Wine just as they would run on Windows.
Instead, Windows applications run on Wine are often buggy, require a lot
of effort to 'port' over or just don't work at all.
WINE even has a page where they list Windows applications, along with how
well they perform on Wine. There's a very impressive list there of
applications that run perfectly on Wine, and an even longer list of
applications that run fairly well, with a few issues. But I get the
feeling that, in a lot of cases, it took some effort to get these
applications to work on Wine, whereas I would have thought that a straight
implementation of the Windows API shouldn't require any more work after it
has been written. Why doesn't Wine work perfectly for all applications?
[Note that this is not in any way intended as a criticism of Wine, which
is a truly excellent project, or to the volunteers who have given up so
much to make it what it is. There's clearly some reason why it doesn't
work perfectly, but it's certainly not because of any fault of its
developers.]

No comments:

Post a Comment