Merge pull request #502 from aclist/fix/check-granular-client

fix: check granular client
This commit is contained in:
aclist authored and GitHub committed 2026-10-26 16:15:47 +09:00
commit 100cb43afc
2 files changed
+11 -7

No files matched your search

+3 -5
View File
@@ -13,7 +13,7 @@ from warnings import deprecated
from dzgui.api.acf import ACF
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 (
APPID_DAYZ,
APPID_DAYZ_EXP,
@@ -23,11 +23,9 @@ from dzgui.const.constants import (
DEBIAN_STEAM_PATH,
DEFAULT_STEAM_PATH,
DOWNLOADS_PATH,
FLATPAK_CMD,
FLATPAK_STEAM_PATH,
LIBRARYFOLDERS_PATH,
REQUEST_TIMEOUT,
STEAM_CMD,
UBUNTU_STEAM_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:
if path is FLATPAK_PATH and has_cmd(FLATPAK_CMD) is False:
if path is FLATPAK_PATH and has_flatpak_client() is False:
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
if path.joinpath(VDF_PATH).is_file():
paths.append((path, human[path]))
+8 -2
View File
@@ -7,7 +7,12 @@ from pathlib import Path
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.config.query import lookup
from dzgui.config.userprefs import UserPrefs
@@ -103,7 +108,8 @@ def load_steam_icon() -> None:
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk # noqa
from gi.repository import Gtk # noqa
try:
traversable = resources.files(APP_NAME_LOWER).joinpath(ICONS_PATH)
icons = Path(str(traversable))