How can an app detect it's running under WINE?
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(a)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(a)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(a)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 -- Uwe Bonnes bon(a)elektron.ikp.physik.tu-darmstadt.de Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
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(a)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.
-- Andreas Mohr Stauferstr. 6, D-71272 Renningen, Germany Tel. +49 7159 800604 http://mohr.de.tt
On 25 Oct 2002, alby(a)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. :) -- Paul Rupe "She smiled, in the end." p r u p e @ m y r e a l b o x . c o m | Oppose government police-ware on your PC! | Stop the Consumer Broadband and Digital Television Promotion Act! | <http://www.eff.org/alerts/20020322_eff_cbdtpa_alert.html>
participants (4)
-
Alberto Massari -
Andreas Mohr -
Paul Rupe -
Uwe Bonnes