1
0
Fork 0
mirror of synced 2024-09-29 08:51:43 +13:00

Add STEAM_COMPAT_CLIENT_INSTALL_PATH for proton to fix #186

This commit is contained in:
Dummerle 2022-03-12 23:04:52 +01:00
parent 8ba7791c82
commit ebe1714f74
No known key found for this signature in database
GPG key ID: AB68CC59CA39F2F1

View file

@ -1,6 +1,7 @@
import os
import platform
from logging import getLogger
from pathlib import Path
from typing import Tuple
from PyQt5.QtCore import QSettings, QThreadPool, Qt
@ -12,9 +13,9 @@ from PyQt5.QtWidgets import (
QPushButton,
QSizePolicy,
)
from legendary.core import LegendaryCore
from legendary.models.game import InstalledGame, Game
from rare.components.tabs.settings.linux import LinuxSettings
from rare.ui.components.tabs.games.game_info.game_settings import Ui_GameSettings
from rare.utils import config_helper
@ -222,6 +223,7 @@ class GameSettings(QWidget, Ui_GameSettings):
config_helper.remove_option(self.game.app_name, "wrapper")
config_helper.remove_option(self.game.app_name, "no_wine")
config_helper.remove_option(f"{self.game.app_name}.env", "STEAM_COMPAT_DATA_PATH")
config_helper.remove_option(f"{self.game.app_name}.env", "STEAM_COMPAT_CLIENT_INSTALL_PATH")
self.proton_prefix.setEnabled(False)
# lk: TODO: This has to be fixed properly.
@ -246,9 +248,15 @@ class GameSettings(QWidget, Ui_GameSettings):
"STEAM_COMPAT_DATA_PATH",
os.path.expanduser("~/.proton"),
)
config_helper.add_option(
f"{self.game.app_name}.env",
"STEAM_COMPAT_CLIENT_INSTALL_PATH",
str(Path.home().joinpath(".steam", "steam"))
)
self.proton_prefix.setText(os.path.expanduser("~/.proton"))
# Dont use Wine
# Don't use Wine
self.linux_settings.wine_exec.setText("")
self.linux_settings.wine_prefix.setText("")