Hello, 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. thanks, FlyerX
flyerx_2000@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?No. It is the goal of Wine to provide a complete implementation of the Win32 API, which includes that a process cannot tell which implementation it is using. You could, of course, take advantage of know shortcomings of wine (eg. ntoskrnl.exe not implemented), but then you would have to monitor wine for changes in that respect. Why is it necessary to change the applications behaviour at all? If this is due to bugs in wine, you could file reports so that these bugs get fixed. Daniel
flyerx_2000@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