derrod / legendary

Legendary - A free and open-source replacement for the Epic Games Launcher
https://legendary.gl/discord
GNU General Public License v3.0
4.54k stars 161 forks source link

Wine-Prefix in Config not working? #156

Closed galitus closed 3 years ago

galitus commented 3 years ago

Hey,

I tried to use the config.ini file in the .config/legendary folder.

At the moment I only tried it for Ark:


[aafc587fbf654758802c8e41e4fb3255]
wrapper = "/home/galitus/Games/Steam/steamapps/common/Proton 5.13/proton" run
no_wine = true

[aafc587fbf654758802c8e41e4fb3255.env]
; environment variables to set for this game (mostly useful on linux)
WINEPREFIX = /home/galitus/Games/legendary/ARKSurvivalEvolved/.wine
STEAM_COMPAT_DATA_PATH = /home/galitus/Games/legendary/ARKSurvivalEvolved/

But as soon I try to configure [Game.env], I get this error:

[cli] INFO: Launching aafc587fbf654758802c8e41e4fb3255...
Traceback (most recent call last):
  File "/usr/bin/legendary", line 11, in <module>
    load_entry_point('legendary-gl==0.20.4', 'console_scripts', 'legendary')()
  File "/usr/lib/python3.8/site-packages/legendary/cli.py", line 1323, in main
    cli.launch_game(args, extra)
  File "/usr/lib/python3.8/site-packages/legendary/cli.py", line 512, in launch_game
    subprocess.Popen(params, cwd=cwd, env=env)
  File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1624, in _execute_child
    env_list.append(k + b'=' + os.fsencode(v))
  File "/usr/lib/python3.8/os.py", line 806, in fsencode
    filename = fspath(filename)  # Does type-checking of `filename`.
TypeError: expected str, bytes or os.PathLike object, not NoneType

When I use

legendary launch aafc587fbf654758802c8e41e4fb3255 --wine-prefix=/home/galitus/Games/legendary/ARKSurvivalEvolved/.wine

it works without any problem.

The wrapper and Compat_data.... stuff is not important, even with the normal wine64, I get the same error while using the config file. I tried to use the config file, so that I can set the environment variable for STEAM_COMPAT...... for proton. So my question is, is there something missing in the .env block? Or is there a problem with using the config file for environment settings? Is there another way to set different environment settings like STEAMCOMPAT..... while using the command line option "legendary launch"?

Big thanks in advance

derrod commented 3 years ago

Try it with the comment in the ini file removed

galitus commented 3 years ago

Alright, this did work, thanks. And thanks for the work at all.

I know, this is a bit offtopic, but is there a guide what else you have to do, to get a game running with proton? installing dxvk, creating etc.? I guess I'm a bit spoiled by using lutris.