forked from CastroFidel/winehelper
changed the launch of the system wine when installing the application
This commit is contained in:
@@ -2440,7 +2440,7 @@ class WineHelperGUI(QMainWindow):
|
||||
self.prefix_install_button.setEnabled(path_ok and prefix_selected)
|
||||
|
||||
def run_prefix_installer(self):
|
||||
"""Запускает установку файла в выбранный префикс."""
|
||||
"""Запускает установку файла в выбранный префикс через скрипт winehelper."""
|
||||
prefix_name = self.current_managed_prefix_name
|
||||
installer_path = self.prefix_install_path_edit.text().strip()
|
||||
|
||||
@@ -2451,9 +2451,6 @@ class WineHelperGUI(QMainWindow):
|
||||
QMessageBox.warning(self, "Ошибка", "Указан неверный путь к установочному файлу.")
|
||||
return
|
||||
|
||||
prefix_path = os.path.join(Var.USER_WORK_PATH, "prefixes", prefix_name)
|
||||
wine_executable = self._get_wine_executable_for_prefix(prefix_name)
|
||||
|
||||
self.command_dialog = QDialog(self)
|
||||
self.command_dialog.setWindowTitle(f"Установка в префикс: {prefix_name}")
|
||||
self.command_dialog.setMinimumSize(750, 400)
|
||||
@@ -2477,13 +2474,12 @@ class WineHelperGUI(QMainWindow):
|
||||
self.command_process.readyReadStandardOutput.connect(self._handle_command_output)
|
||||
self.command_process.finished.connect(self._handle_prefix_install_finished)
|
||||
|
||||
env = QProcessEnvironment.systemEnvironment()
|
||||
env.insert("WINEPREFIX", prefix_path)
|
||||
self.command_process.setProcessEnvironment(env)
|
||||
# Окружение полностью настраивается скриптом winehelper
|
||||
self.command_process.setProcessEnvironment(QProcessEnvironment.systemEnvironment())
|
||||
|
||||
args = [installer_path]
|
||||
self.command_log_output.append(f"Запуск установки: {shlex.quote(wine_executable)} {shlex.quote(installer_path)}")
|
||||
self.command_process.start(wine_executable, args)
|
||||
args = ["install-to-prefix", prefix_name, installer_path]
|
||||
self.command_log_output.append(f"Выполнение: {shlex.quote(self.winehelper_path)} {' '.join(shlex.quote(a) for a in args)}")
|
||||
self.command_process.start(self.winehelper_path, args)
|
||||
self.command_dialog.exec_()
|
||||
|
||||
def _get_prefix_component_version(self, prefix_name, component_key):
|
||||
|
Reference in New Issue
Block a user