"Cédric MARCOUX (sprimont)"
2008-Feb-11 10:59 UTC
[Wine] Emulated application retrieve wine version
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? Regards, C?dric MARCOUX
A. Tres Finocchiaro
2008-Feb-11 13:41 UTC
[Wine] Emulated application retrieve wine version
Sorry, forgot to "reply all" here's a CC of our conversatoin.> Cedric, > > What I've noticed is wine allows calling native linux commands. Have you > tried "Z:\\usr\\bin\\wine" --version? > > -Tres >Not tryed yet, I will take a look...> > I was wondering if something exist more "clean" as api call or > > registries read, or something else... > > Thanks anyway, > > >Cedric,> > > > > > I did "wine --version" and got: wine-0.9.54 > > > > > > Then I search registry for "9.54", and no keys. :( > > > > > > Perhaps an API call would be possible. Sorry I cannot help you more! > > > > > > -Tres > > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.winehq.org/pipermail/wine-users/attachments/20080211/29bbde38/attachment.htm
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!