From bf3a30487eb43a7366fa3d0e28d0bb44c695f78b Mon Sep 17 00:00:00 2001 From: Sergey Palcheh Date: Tue, 9 Sep 2025 15:19:55 +0600 Subject: [PATCH] fixed paths for determining the installation of system dependencies --- winehelper_gui.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/winehelper_gui.py b/winehelper_gui.py index a5639e9..d577564 100644 --- a/winehelper_gui.py +++ b/winehelper_gui.py @@ -42,10 +42,14 @@ class DependencyManager: def _get_dependencies_path(self): """Определяет и возвращает путь к скрипту dependencies.sh.""" - winehelper_script_path = os.environ.get("RUN_SCRIPT") - if winehelper_script_path and os.path.exists(winehelper_script_path): - return os.path.join(os.path.dirname(winehelper_script_path), 'dependencies.sh') - return None + if Var.DATA_PATH: + base_path = Var.DATA_PATH + elif Var.RUN_SCRIPT and os.path.exists(Var.RUN_SCRIPT): + base_path = os.path.dirname(Var.RUN_SCRIPT) + else: + return None + + return os.path.join(base_path, 'dependencies.sh') def _calculate_file_hash(self): """Вычисляет хэш SHA256 файла зависимостей."""