mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 22:52:42 +01:00
Merge pull request #502 from aclist/fix/check-granular-client
fix: check granular client
This commit is contained in:
2 files changed
+11
-7
No files matched your search
+3
-5
@@ -13,7 +13,7 @@ from warnings import deprecated
|
|||||||
|
|
||||||
from dzgui.api.acf import ACF
|
from dzgui.api.acf import ACF
|
||||||
from dzgui.init.prereqs import has_any_client
|
from dzgui.init.prereqs import has_any_client
|
||||||
from dzgui.init.proc import has_cmd
|
from dzgui.init.prereqs import has_flatpak_client, has_steam_client
|
||||||
from dzgui.const.constants import (
|
from dzgui.const.constants import (
|
||||||
APPID_DAYZ,
|
APPID_DAYZ,
|
||||||
APPID_DAYZ_EXP,
|
APPID_DAYZ_EXP,
|
||||||
@@ -23,11 +23,9 @@ from dzgui.const.constants import (
|
|||||||
DEBIAN_STEAM_PATH,
|
DEBIAN_STEAM_PATH,
|
||||||
DEFAULT_STEAM_PATH,
|
DEFAULT_STEAM_PATH,
|
||||||
DOWNLOADS_PATH,
|
DOWNLOADS_PATH,
|
||||||
FLATPAK_CMD,
|
|
||||||
FLATPAK_STEAM_PATH,
|
FLATPAK_STEAM_PATH,
|
||||||
LIBRARYFOLDERS_PATH,
|
LIBRARYFOLDERS_PATH,
|
||||||
REQUEST_TIMEOUT,
|
REQUEST_TIMEOUT,
|
||||||
STEAM_CMD,
|
|
||||||
UBUNTU_STEAM_PATH,
|
UBUNTU_STEAM_PATH,
|
||||||
VDF_PATH,
|
VDF_PATH,
|
||||||
)
|
)
|
||||||
@@ -85,9 +83,9 @@ def get_steam_paths() -> list[tuple[Path, str]]:
|
|||||||
}
|
}
|
||||||
|
|
||||||
for path in DEFAULT_PATH, FLATPAK_PATH, UBUNTU_PATH, DEBIAN_PATH:
|
for path in DEFAULT_PATH, FLATPAK_PATH, UBUNTU_PATH, DEBIAN_PATH:
|
||||||
if path is FLATPAK_PATH and has_cmd(FLATPAK_CMD) is False:
|
if path is FLATPAK_PATH and has_flatpak_client() is False:
|
||||||
continue
|
continue
|
||||||
if path is not FLATPAK_PATH and has_cmd(STEAM_CMD) is False:
|
if path is not FLATPAK_PATH and has_steam_client() is False:
|
||||||
continue
|
continue
|
||||||
if path.joinpath(VDF_PATH).is_file():
|
if path.joinpath(VDF_PATH).is_file():
|
||||||
paths.append((path, human[path]))
|
paths.append((path, human[path]))
|
||||||
|
|||||||
+8
-2
@@ -7,7 +7,12 @@ from pathlib import Path
|
|||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
|
|
||||||
from dzgui.const.constants import APP_NAME, APP_NAME_LOWER, FLATPAK_ROOT_PATH, ICONS_PATH
|
from dzgui.const.constants import (
|
||||||
|
APP_NAME,
|
||||||
|
APP_NAME_LOWER,
|
||||||
|
FLATPAK_ROOT_PATH,
|
||||||
|
ICONS_PATH,
|
||||||
|
)
|
||||||
from dzgui.const.enum import Preferences
|
from dzgui.const.enum import Preferences
|
||||||
from dzgui.config.query import lookup
|
from dzgui.config.query import lookup
|
||||||
from dzgui.config.userprefs import UserPrefs
|
from dzgui.config.userprefs import UserPrefs
|
||||||
@@ -103,7 +108,8 @@ def load_steam_icon() -> None:
|
|||||||
import gi
|
import gi
|
||||||
|
|
||||||
gi.require_version("Gtk", "3.0")
|
gi.require_version("Gtk", "3.0")
|
||||||
from gi.repository import Gtk # noqa
|
from gi.repository import Gtk # noqa
|
||||||
|
|
||||||
try:
|
try:
|
||||||
traversable = resources.files(APP_NAME_LOWER).joinpath(ICONS_PATH)
|
traversable = resources.files(APP_NAME_LOWER).joinpath(ICONS_PATH)
|
||||||
icons = Path(str(traversable))
|
icons = Path(str(traversable))
|
||||||
|
|||||||
Reference in new issue
Block a user