mirror of
https://github.com/lutris/lutris
synced 2024-10-02 22:14:23 +00:00
Added workdir to wineexec
Might want to add it to execute() in installer.py but it's using subprocess.call() which doesn't seem to have a working dir argument, contrary to subprocess.Popen()
This commit is contained in:
parent
6d6c46f31e
commit
35d77aa832
|
@ -162,7 +162,7 @@ Currently, the following tasks are implemented:
|
|||
|
||||
wine: ``wineexec`` Runs a windows executable. Parameters are ``executable``,
|
||||
``args`` (optional arguments passed to the executable), ``prefix`` (optional
|
||||
WINEPREFIX).
|
||||
WINEPREFIX), ``workdir`` (optional working directory).
|
||||
|
||||
wine: ``winetricks`` Runs winetricks with the ``app`` argument. ``prefix`` is
|
||||
an optional WINEPREFIX path.
|
||||
|
|
|
@ -33,7 +33,7 @@ def create_prefix(prefix, arch='win32'):
|
|||
wineexec('', prefix=prefix, wine_path='wineboot', arch=arch)
|
||||
|
||||
|
||||
def wineexec(executable, args="", prefix=None, wine_path='wine', arch='win32'):
|
||||
def wineexec(executable, args="", prefix=None, wine_path='wine', arch='win32', workdir=None):
|
||||
if not prefix:
|
||||
prefix = ""
|
||||
else:
|
||||
|
@ -45,7 +45,7 @@ def wineexec(executable, args="", prefix=None, wine_path='wine', arch='win32'):
|
|||
arch, prefix, wine_path, executable, args
|
||||
)
|
||||
logger.debug("Running wine command: %s", command)
|
||||
subprocess.Popen(command, shell=True, stdout=subprocess.PIPE).communicate()
|
||||
subprocess.Popen(command, cwd=workdir, shell=True, stdout=subprocess.PIPE).communicate()
|
||||
|
||||
|
||||
def winetricks(app, prefix=None, arch='win32', silent=False):
|
||||
|
|
Loading…
Reference in a new issue