[Wine] Re: Checking if Wine is being used

flyerx_2000 at yahoo.com flyerx_2000 at yahoo.com
Mon Mar 19 00:46:37 CDT 2007


dank wrote:
> flyerx_2000 at yahoo.com wrote:
> > I am adapting a Windows application to make it Wine friendly. Some of
> > the application's operations must be changed if it is running using
> > Wine instead of Windows. Is there a way of checking, from within the
> > application, if Wine is being used?
> >
> > Right now the user selects at startup if the application is running
> > using Wine or just Windows but it would be nice if the process was
> > automatic.
>
> You can probably check an environment variable.
> http://www.paulmcnett.com/vfp/wine/vfp-wine-whitepaper.pdf
> suggests using getenv("_"); if that returns non-null, you're on Wine.
> I haven't verified if that works.
>
> What app are you adapting, and what do you do differently if you're
> running on Wine?
> - Dan

The application calls a program that is available in Windows and Linux
but the arguments passed are not the same between versions so the
program has to differentiate. I will test the enviroment variable idea.
If it does not work I guess the user will have to select at startup
where the program is running from.

thanks,

FlyerX



More information about the wine-users mailing list