Jump to content

Can a compiled script detect if it is running under wine?


Go to solution Solved by Nine,

Recommended Posts

Posted

I have some compiled scripts that cause problems if they run under wine on linux. I think I can work around the problems, but only if the script can detect that it is running under wine, and not real Windows. I've searched the forum without finding a technique for detecting wine. Am I missing something obvious? Thanks for any help.

  • Solution
Posted (edited)
33 minutes ago, Nine said:

Or set an environment variable that tell you if it is running under Wine ?

That is almost certainly the answer. Apparently Wine sets some variables that I should be able to test. I should have thought of this myself. Thank you!

EDIT: There are about a dozen relevant variables: WINELOADER, WINEUSERNAME, etc., etc., This should be easy. Thank you again.

Edited by emendelson

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...