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?
Thanks in advance,
Alberto
------------------------------- Alberto Massari eXcelon Corp. http://www.StylusStudio.com
"Alberto" == Alberto Massari alby@exln.com writes:
Alberto> Hi everybody, I am working on making our software (Stylus Alberto> Studio, http://www.stylusstudio.com) run under WINE, if this is Alberto> feasible. To achieve this, I have already implemented a bunch Alberto> of APIs (the application is built against the UNICODE version Alberto> of the Win32 APIs) and fixed some bugs I hit (I already mailed Alberto> the first patch to wine-patches@winehq.com).
Alberto> However, I would feel better if I could detect I am running Alberto> under WINE and gracefully disable some functionalities that are Alberto> not yet fully supported; is there any way to achieve this? Is Alberto> there a WIN32 API (like, say, GetVersionEx) that can return a Alberto> string like "Windows 2000 (WINE)" or is WINE trying to be as Alberto> stealth as possible?
You can query for example the wine registry entries.
Bye
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.
On 25 Oct 2002, alby@exln.com wrote:
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?
I look at this the same way I do those browser-sniffing scripts many websites use. As an Opera user I get really annoyed when I run into a site that kicks me out for no reason other than its user agent string. "If not IE and not NS, go away." Maybe this made sense when Opera was at version 2, but not now at version 6-going-on-7. Almost every time the site works fine if I just bypass the silly check.
My suggestion is whenever possible check for features, not version strings. Just call the API and if it fails, then gracefully disable whatever functionality. When some future version of Wine supports that API, it will just start working without any further effort on your part. An added benefit is that whichever Wine developer is implementing that feature will have your app to test with. Also have some sympathy for the poor Wine developer tearing his hair out trying to figure out why your app behaves differently in Wine vs. Windows no matter how perfect his shiny new DX12/DCOM/HAL/TANSTAAFL implementation is. :)