[Wine] Emulated application retrieve wine version
L. Rahyen
research at science.su
Mon Feb 11 07:43:47 CST 2008
On Monday February 11 2008 10:59:40 Cédric MARCOUX (sprimont) wrote:
> Hi all,
>
> i'm currently writing Win32 application under Delphi.
> I do all possible to get it compatible with wine.
> For design purpose I have made a little check to know in my application
> is run under wine or not.
> I just make a registry test to know if wine registries entry exist or
> not and it work fine.
> If exist I display a nice tux logo inside my appz :)
>
> However, I was wondering if there is a way to get from my emulated
> application the version of wine that host it?
By definition, if you are trying to detect WINE and this is successful - this
is a bug. And there is no warranty that registry key you are testing doesn't
exist on Windows or exist on WINE (at least user can create it by hand in
Windows registry or remove it in WINE registry; or after some time it might
be changed/removed in WINE registry).
If there is any bugs, please report them at http://bugs.winehq.org .
If you decide to keep WINE-detection at least provide documented command-line
keys to disable it. For example, I saw one application that tries to detect
WINE and if this is successful it changes its behavior in some places and I
prefer to disable that because modern WINE works much better that at the time
the program (and its WINE-related workarounds) was created.
In other words, any attempt to detect WINE, or, even worse, its version, is
strongly discouraged practice (because relying on such a thing means relying
on bugs).
If you *really* require some workarounds ASAP, then you can give a user to
choose (either in menu/options dialog or at first startup) does he/she use
WINE or not - but this is also discouraged practice.
Don't forget to report a bug if you found one!
More information about the wine-users
mailing list