How can an app detect it's running under WINE?, bad!
p_christ at hol.gr
Fri Oct 25 09:44:19 CDT 2002
> > > Hi everybody,
> > > I am working on making our software (Stylus Studio,
> > > http://www.stylusstudio.com) run under WINE, if this is feasible. To
> > > achieve this, I have already implemented a bunch of APIs (the
> > > application is built against the UNICODE version of the Win32 APIs) and
> > > fixed some bugs
> > > I hit (I already mailed the first patch to wine-patches at winehq.com).
> > >
> > > However, I would feel better if I could detect I am running under WINE
> > > and gracefully disable some functionalities that are not yet fully
> > > supported; is there any way to achieve this? Is there a WIN32 API
> > > (like, say, GetVersionEx) that can return a string like "Windows 2000
> > > (WINE)" or is WINE trying to be as stealth as possible?
> >http://www.winehq.org/FAQ/ would have been answering this in countless
> >cases already.
> I'm sorry I asked this here, but the only help I got from the FAQ was:
> Q: How can I detect Wine?
> A: You really shouldn't want to do this. If there's a quirk in Wine you
> need to work around, it's *much* better to fix it in Wine (after all you're
> a developer, so you should be able to gather enough help and knowledge to
> fix it for real).
> If you think you really want to know how to detect it anyway (maybe in
> order to just have a cool "running on Wine" status text or so), then please
> mail me.
I really diagree with allowing some method to differentiate between a native
M$ system and wine. What if some programmer uses that fn to block his
executable from running in wine?
I suggest that the GetVersionEx or a similar function indicates the presence
of Wine. However, that feature should be allowed to be switched off (this
fully hiding wine). The setting should be app-specific (in wine.conf). Thus,
a well-behaving program will have access to the wine info, while the bad one
More information about the wine-devel