Properly set system environment variables for wine (Fixes #875)

This commit is contained in:
Mathieu Comandon 2018-05-19 10:47:37 -07:00
parent 280ddbafcf
commit 182fd5a362
2 changed files with 6 additions and 2 deletions

View file

@ -151,7 +151,6 @@ class Runner:
def get_env(self, os_env=False):
env = {}
if os_env:
env.update(os.environ.copy())

View file

@ -1018,7 +1018,12 @@ class wine(Runner):
return overrides
def get_env(self, os_env=True):
env = super(wine, self).get_env(os_env)
"""Return environment variables used by the game"""
# Always false to runner.get_env, the default value
# of os_env is inverted in that class.
env = super(wine, self).get_env(False)
if os_env:
env.update(os.environ.copy())
env['WINEDEBUG'] = self.runner_config.get('show_debug', '-all')
env['WINEARCH'] = self.wine_arch
env['WINE'] = self.get_executable()