[Wine] How can I detect WINE from my program?

Alexandre Julliard julliard at winehq.org
Fri Jun 5 04:00:58 CDT 2009


"Stefan Kuhr" <wineforum-user at winehq.org> writes:

> In a private project of mine I currently follow this approach: Users
> will have to specify the Wine version they are running, as a command
> line parameter. If they don't, the app will either not work or crash
> with current versions of Wine. There is no other way, otherwise I
> cannot work around limitations that Wine has, but I believe will not
> get fixed any time soon, given the fact that I submitted bug reports
> almost a year ago. It would be a helluva lot easier if there were a
> way to get the Wine version and let my app apply its compatibility
> code paths with a priori knowledge it has about certain Wine
> versions. Hey, I have to do the same thing for Windoze9x vs. NT
> vs. Windows 2000 vs. XP vs. W2K3 server vs. ..... why does Wine make
> it so hard for me to help my apps make the best use of it?

Check ntdll.get_wine_version(). It's not a good idea to add workarounds
based on the version, but if you really want to, it's there.

Just don't expect Wine to maintain any sort of backwards bug
compatibility; if a bug you worked around gets fixed and that breaks
your app it's your problem.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-users mailing list