Test If Running Under Wine

cdr cedar at 3web.net
Tue Oct 11 19:41:04 CDT 2005

Craig macLeod wrote:
> I am a developer of Win32 applications. 
Same here...

> How in our code do we differentiate between Wine runs and Windows runs?
Here is one possibility:
/* Get a non-0 to indicate we are running under Wine. */
    iWine = (int)GetProcAddress(LoadLibrary("kernel32"), "wine_get_unix_file_name");

> The documentation discourages such tests saying we should fix Wine.
This is naive and far from practical. To me, it's self-evident that an
application will want know which run-time OS it's running under for many
reasons; it's completely inappropriate for the run-time OS supplier to
discourage it from doing so.

It is further my observation that Wine developers are (unfortunately)
not particularly interested in supporting application builders who
would like to make their applications run well under Wine;  they
believe their system is primarily for the users who will want to run
an application that the application vendor would like to prevent from
running under anything but MS Windows.


More information about the wine-devel mailing list