--- Patrik Stridvall ps@leissner.se wrote:
So that is why there is no OFFICAL way to detect Wine, simple because if where was an offical way people could quite reasonable complain if some change to Wine broke their detection. However since there are no offical way, they can't complain can they? :-)
Probably it's time to make an "official" way?
No and IMHO there is no reason to have an offical way at all.
This problem appears with each application, ported with Wine and isn't going to go away even when Wine will correctly implement all Windows api ;-)
If Wine implement every Windows API, why do you care whether you are running under Wine at all?
Your application works as good as it does under Windows. Period.
Of course you might better intergration with X Windows, printing or whatever to make your application work EVEN BETTER under Wine. :-)
Then you have two choice: 1. Recompile your application using Winelib and use Unix API's 2. Under Windows, link with and use some "Wine extension" DLL that are just in many cases "return FALSE; SetLastError(ERROR_NOT_IMPLEMENTED)" on Windows but are implemented on Unix (or some Unixes).
Sure (2) currently doesn't exist yet. However it wouldn't be very difficult to do it, if there is need. But no these functions are not for detecting Wine they are for tighter intergration with the underlying "OS" like X Windows, printing or whatever.
However this is IMHO far beyond 1.0, so don't hold your breath.
But sure if you can name some "Wine extension" API we REALLY need we might do it sooner...
PS. Theoretically, the "Wine extensions" DLLs might be implementated on some future version Windows as well and it would be quite ironical if Microsoft did in the future. :-)