Hi Andreas,
At 03.12 25/10/2002 -0500, you wrote:
Message: 13 Date: Fri, 25 Oct 2002 10:10:32 +0200 From: Andreas Mohr andi@rhlx01.fht-esslingen.de To: Alberto Massari alby@exln.com Cc: wine-devel@winehq.com Subject: Re: How can an app detect it's running under WINE? Reply-To: andi@rhlx01.fht-esslingen.de
On Fri, Oct 25, 2002 at 09:25:23AM +0200, Alberto Massari wrote:
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@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. (address-suppressed) ------
So I though I could ask it here....
Alberto
------------------------------- Alberto Massari eXcelon Corp. http://www.StylusStudio.com
On Friday 25 October 2002 03:30 am, Alberto Massari wrote:
Hi Andreas,
At 03.12 25/10/2002 -0500, you wrote:
Message: 13 Date: Fri, 25 Oct 2002 10:10:32 +0200 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. (address-suppressed)
So I though I could ask it here....
Blech! That's tacky. If we're going to plug fixing wine as a solution to someone's problem, we should at least have the decency to give them a straight answer as well. Should we expect them to fix DCOM if that's their problem? What about driver installation? etc... there are lots of totally legitimate reasons somebody might need this.
On Fri, Oct 25, 2002 at 10:30:15AM +0200, Alberto Massari wrote:
Hi Andreas,
At 03.12 25/10/2002 -0500, you wrote:
Message: 13 Date: Fri, 25 Oct 2002 10:10:32 +0200 From: Andreas Mohr andi@rhlx01.fht-esslingen.de To: Alberto Massari alby@exln.com Cc: wine-devel@winehq.com Subject: Re: How can an app detect it's running under WINE? Reply-To: andi@rhlx01.fht-esslingen.de
On Fri, Oct 25, 2002 at 09:25:23AM +0200, Alberto Massari wrote:
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@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. (address-suppressed)
So I though I could ask it here....
Argh ! That "(address-suppressed)" wasn't meant to be like that from the beginning... :-(
Originally that part showed my email address.
Thanks for notifying me about this issue !
So yes, your posting is pretty much very justified after all.
Like someone else said (IIRC), you could check for the existence of the Wine configuration registry key branch. That'd be a 150% reliable method of detecting Wine presence.
But again, trying to fix issues would be preferrable. (unless there are just too many problems to be fixed)
Andreas Mohr
At 13.22 25/10/2002 +0200, Andreas Mohr wrote:
On Fri, Oct 25, 2002 at 10:30:15AM +0200, Alberto Massari wrote:
[...]
Like someone else said (IIRC), you could check for the existence of the Wine configuration registry key branch. That'd be a 150% reliable method of detecting Wine presence.
But again, trying to fix issues would be preferrable. (unless there are just too many problems to be fixed)
Thanks for your answers: we all agree that the best thing to do is to have WINE support all the WIN32 API, and mimic all the Windows flavors. But just like an application calls GetVersionEx to decide how to behave on a specific platform, it is perfectly valid for it to try to detect WINE as a variant of Windows, and react accordingly. That registry information is the right piece of information, as it could also be used to instruct the user on the changes needed to make the application work better.
Thanks again,
Alberto
------------------------------- Alberto Massari eXcelon Corp. http://www.StylusStudio.com
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@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. (address-suppressed)
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 won't.