Add WINEPREFIX to winesteam

This commit is contained in:
Mathieu Comandon 2013-07-20 19:12:45 +02:00
parent f6154c413a
commit e45a446cc7

View file

@ -89,7 +89,9 @@ class winesteam(wine):
self.arguments = []
self.game_options = [
{'option': 'appid', 'type': 'string', 'label': 'appid'},
{'option': 'args', 'type': 'string', 'label': 'arguments'}
{'option': 'args', 'type': 'string', 'label': 'arguments'},
{'option': 'prefix', 'type': 'directory_chooser',
'label': 'Prefix'}
]
self.settings = settings
@ -179,6 +181,12 @@ class winesteam(wine):
'runner': self.__class__.__name__}
self.prepare_launch()
command = []
prefix = self.settings['game'].get('prefix', "")
if os.path.exists(prefix):
command.append("WINEPREFIX=\"%s\" " % prefix)
command.append(self.launch_args)
return {
'command': self.launch_args + ['-applaunch', appid, self.args]
'command': command + ['-applaunch', appid, self.args]
}