Compare commits

..

7 Commits

Author SHA1 Message Date
Mikhail Tergoev
ac4dd4f0bf fixed scadoffice scripts and updated prefix 2025-10-10 11:25:16 +03:00
Mikhail Tergoev
c15d751372 WH_USE_MESA_GL_OVERRIDE=0 by default 2025-10-10 11:24:01 +03:00
Mikhail Tergoev
78113b92a5 Merge branch 'minergenon-devel' 2025-10-10 10:50:48 +03:00
Sergey Palcheh
9e8e41e812 the license agreement window has been removed when creating a prefix 2025-10-07 15:03:08 +06:00
Sergey Palcheh
5f4d3a54b1 fixed auto-scrolling of the log to the final message when creating a prefix 2025-10-07 14:55:37 +06:00
Sergey Palcheh
9d16883e6e added display of installed Winetricks components 2025-10-07 14:28:18 +06:00
Sergey Palcheh
e3cafee4f5 added a filter for unnecessary components 2025-10-07 13:35:29 +06:00
4 changed files with 94 additions and 34 deletions

View File

@@ -1,12 +1,12 @@
#!/usr/bin/env bash
# info_ru: SCAD Office — это программный комплекс для расчёта строительных конструкций, с дополнением Apache OpenOffice. Apache OpenOffice - пакет офисного программного обеспечения для обработки текстов, электронных таблиц, презентаций, графики, баз данных и многого другого.
# info_ru: SCAD Office — это программный комплекс для расчёта строительных конструкций.
########################################################################
export PROG_URL="https://scadoffice.ru"
export WH_WINE_USE="wine_x_tkg_10-0_amd64"
export WINEPREFIX="scadoffice"
export PROG_NAME="SCAD Office"
export PROG_ICON="scadoffice"
export BASE_PFX="scadaoffice_pfx_x64_v04"
export BASE_PFX="scadaoffice_pfx_x64_v05"
export WH_WINDOWS_VER="10"
export WINEARCH="win64"
export INSTALL_DLL="dotnet20 dotnet48 gdiplus vcrun6sp6 vcrun2005 vcrun2019 d3dx11_42 d3dx11_43 d3dx9 d3dcompiler_42 d3dcompiler_43 d3dcompiler_46 d3dcompiler_47 richtx32 riched30 riched20 msxml6"
@@ -32,17 +32,16 @@ if [[ -n $2 ]] ; then
fi
fi
if [[ $BASE_PFX == "none" ]] ; then
print_info "Установка дополнительных компонентов..."
print_info "Установка дополнительных компонентов..."
ADDONS_PACK="${WH_TMP_DIR}/$(basename "$SCADOFFICE_ADDONS_URL")"
ADDONS_PATH="${WH_TMP_DIR}/scadoffice_addons"
ADDONS_PACK="${WH_TMP_DIR}/$(basename "$SCADOFFICE_ADDONS_URL")"
ADDONS_PATH="${WH_TMP_DIR}/scadoffice_addons"
ADDONS_PATH_REG="${ADDONS_PATH}/REG"
ADDONS_PATH_MDAC="${ADDONS_PATH}/mdac64"
ADDONS_PATH_OPENSSH="${ADDONS_PATH}/OpenSSH"
ADDONS_PATH_REG="${ADDONS_PATH}/REG"
ADDONS_PATH_MDAC="${ADDONS_PATH}/mdac64"
ADDONS_PATH_OPENSSH="${ADDONS_PATH}/OpenSSH"
if try_download "$SCADOFFICE_ADDONS_URL" "${ADDONS_PACK}" ; then
if try_download "$SCADOFFICE_ADDONS_URL" "${ADDONS_PACK}" ; then
create_new_dir "${ADDONS_PATH}"
unpack "${ADDONS_PACK}" "${ADDONS_PATH}"
wine_run regedit "${ADDONS_PATH_REG}"/*.reg
@@ -58,7 +57,6 @@ if [[ $BASE_PFX == "none" ]] ; then
try_remove_dir "$ADDONS_PATH"
try_remove_file "$ADDONS_PACK"
fi
fi
if try_download "https://scadhelp.ru/files/10/download" "${AUTOINSTALL_EXE}" ; then

View File

@@ -208,10 +208,11 @@ dfb44ce5e5af7dba1686932c63d6b05e5dd6919a21c78130a7d1d0271b93958e audiorecstatio
# create with wine_x_tkg_10-0_i586 (universal user: xuser)
# winetricks arial dotnet7 dotnetdesktop7 renderer=gdi
4fa93434c5c15440014357323257ddcee7d28b94ad6a56bd6f5a08b33ae4c3cb scadaoffice_pfx_x64_v04.tar.xz
# create with wine-8.8-staging-amd64
8c6312f2e4e846a98ca4a87fc90ee1917eb28d4caaddde040fb4d2dd05f8c0fe scadaoffice_pfx_x64_v05.tar.xz
# create with wine_x_tkg_10-0_amd64 (universal user: xuser)
# winetricks dotnet48 gdiplus vcrun6sp6 vcrun2005 vcrun2019 d3dx11_42 d3dx11_43 d3dx9 d3dcompiler_42 d3dcompiler_43 d3dcompiler_46 d3dcompiler_47 richtx32 riched30 riched20 msxml6 dotnet20
# + addons with ODBC, SSH, *.reg
# addons with ODBC, SSH, *.reg
0f4ef434df07bc338ae308af44330590eaa1d9c94b64850514e55b960642d0eb scadoffice_addons_v02.tar.xz
ef7e8f1ba785d48e4ea287feed5b79bd630d423e59efadb43da9653adefef218 ais-lpu-client_pfx_x86_v01.tar.xz

View File

@@ -163,6 +163,7 @@ check_variables WH_WINDOWS_VER "10"
# check_variables WH_USE_GSTREAMER "1"
# check_variables WH_USE_D3D_EXTRAS "1"
check_variables WH_USE_SHADER_CACHE "1"
check_variables WH_USE_MESA_GL_OVERRIDE "0"
check_variables WH_USE_WINE_DXGI "0"
check_variables WH_DLL_INSTALL ""

View File

@@ -13,7 +13,7 @@ from functools import partial
from PyQt5.QtWidgets import (QApplication, QMainWindow, QWidget, QVBoxLayout, QHBoxLayout, QPushButton, QLabel, QTabWidget, QTabBar,
QTextEdit, QFileDialog, QMessageBox, QLineEdit, QCheckBox, QStackedWidget, QScrollArea, QFormLayout, QGroupBox, QRadioButton, QComboBox,
QListWidget, QListWidgetItem, QGridLayout, QFrame, QDialog, QTextBrowser, QInputDialog, QDialogButtonBox, QSystemTrayIcon, QMenu)
from PyQt5.QtCore import Qt, QProcess, QSize, QTimer, QProcessEnvironment, QPropertyAnimation, QEasingCurve
from PyQt5.QtCore import Qt, QProcess, QSize, QTimer, QProcessEnvironment, QPropertyAnimation, QEasingCurve, pyqtSignal
from PyQt5.QtGui import QIcon, QFont, QTextCursor, QPixmap, QPainter, QCursor
from PyQt5.QtNetwork import QLocalServer, QLocalSocket
@@ -428,6 +428,8 @@ class WinetricksManagerDialog(QDialog):
"Для переустановки компонента: Выделите его в списке и нажмите кнопку «Переустановить»."
)
installation_complete = pyqtSignal()
def __init__(self, prefix_path, winetricks_path, parent=None, wine_executable=None):
super().__init__(parent)
self.prefix_path = prefix_path
@@ -617,12 +619,33 @@ class WinetricksManagerDialog(QDialog):
self._log(f"--- Предупреждение: не удалось прочитать {log_path}: {e} ---")
return installed_verbs
def _parse_winetricks_list_output(self, output, installed_verbs, list_widget):
def _parse_winetricks_list_output(self, output, installed_verbs, list_widget, category):
"""Парсит вывод 'winetricks list' и заполняет QListWidget."""
# Regex, который обрабатывает строки как с префиксом статуса '[ ]', так и без него.
# 1. `(?:\[(.)]\s+)?` - опциональная группа для статуса (напр. '[x]').
# 2. `([^\s]+)` - имя компонента (без пробелов).
# 3. `(.*)` - оставшаяся часть строки (описание).
# Определяем шаблоны для фильтрации на основе категории
dlls_blacklist_pattern = None
fonts_blacklist_pattern = None
settings_blacklist_pattern = None
if category == 'dlls':
# Исключаем d3d*, directx9, dont_use, dxvk*, vkd3d*, galliumnine, faudio*, Foundation
dlls_blacklist_pattern = re.compile(
r'^(d3d|directx9|dont_use|dxvk|vkd3d|galliumnine|faudio|foundation)', re.IGNORECASE
)
elif category == 'fonts':
fonts_blacklist_pattern = re.compile(
r'^(dont_use)', re.IGNORECASE
)
elif category == 'settings':
# Исключаем vista*, alldlls, autostart_*, bad*, good*, win*, videomemory*, vd=*, isolate_home
settings_blacklist_pattern = re.compile(
r'^(vista|alldlls|autostart_|bad|good|win|videomemory|vd=|isolate_home)', re.IGNORECASE
)
line_re = re.compile(r"^\s*(?:\[(.)]\s+)?([^\s]+)\s*(.*)")
found_items = False
@@ -643,6 +666,14 @@ class WinetricksManagerDialog(QDialog):
if '/' in name or '\\' in name or name.lower() in ('executing', 'using', 'warning:') or name.endswith(':'):
continue
# Применяем фильтры для черных списков
if dlls_blacklist_pattern and dlls_blacklist_pattern.search(name):
continue
if fonts_blacklist_pattern and fonts_blacklist_pattern.search(name):
continue
if settings_blacklist_pattern and settings_blacklist_pattern.search(name):
continue
is_checked = name in installed_verbs
item_text = f"{name.ljust(27)}{description.strip()}"
item = QListWidgetItem(item_text)
@@ -681,7 +712,7 @@ class WinetricksManagerDialog(QDialog):
self._log("--------------------------------------------------", "red")
else:
installed_verbs = self._parse_winetricks_log()
found_items = self._parse_winetricks_list_output(output, installed_verbs, list_widget)
found_items = self._parse_winetricks_list_output(output, installed_verbs, list_widget, category)
if from_cache is None: # Только если мы не читали из кэша
# Сохраняем успешный результат в кэш
@@ -856,6 +887,7 @@ class WinetricksManagerDialog(QDialog):
# Перезагружаем данные, чтобы обновить состояние
self.initial_states.clear()
self.load_all_categories()
self.installation_complete.emit()
self.installation_finished = True
def closeEvent(self, event):
@@ -2601,19 +2633,39 @@ class WineHelperGUI(QMainWindow):
self.esync_button.blockSignals(False)
self.fsync_button.blockSignals(False)
# --- Чтение и отображение установленных компонентов Winetricks ---
winetricks_log_path = os.path.join(Var.USER_WORK_PATH, "prefixes", prefix_name, "winetricks.log")
installed_verbs = []
if os.path.exists(winetricks_log_path):
try:
with open(winetricks_log_path, 'r', encoding='utf-8') as f:
for line in f:
verb = line.split('#', 1)[0].strip()
if verb:
installed_verbs.append(verb)
except IOError as e:
print(f"Ошибка чтения winetricks.log: {e}")
# Фильтруем служебные компоненты, чтобы не засорять вывод
verbs_to_ignore = {
'isolate_home', 'winxp', 'win7', 'win10', 'win11',
'vista', 'win2k', 'win2k3', 'win2k8', 'win8', 'win81',
'workaround', 'internal'
}
display_verbs = sorted([v for v in installed_verbs if v not in verbs_to_ignore])
# Карта для красивого отображения известных переменных
display_map = {
"WINEPREFIX": ("Путь", lambda v: v),
"WINEARCH": ("Архитектура", lambda v: "64-bit" if v == "win64" else "32-bit"),
"WH_WINE_USE": ("Версия Wine", lambda v: "Системная" if v == "system" else v),
"BASE_PFX": ("Тип", lambda v: 'Чистый' if v == "none" else 'С рекомендуемыми библиотеками'),
"DXVK_VER": ("Версия DXVK", lambda v: v if v else "Не установлено"),
"VKD3D_VER": ("Версия VKD3D", lambda v: v if v else "Не установлено"),
"WINEESYNC": ("ESync", lambda v: "Включен" if v == "1" else "Выключен"),
"WINEFSYNC": ("FSync", lambda v: "Включен" if v == "1" else "Выключен"),
"WH_XDG_OPEN": ("Ассоциации файлов", lambda v: v if v and v != "0" else "Не заданы"),
}
display_order = ["WINEPREFIX", "WINEARCH", "WH_WINE_USE", "BASE_PFX", "DXVK_VER", "VKD3D_VER", "WINEESYNC", "WINEFSYNC", "WH_XDG_OPEN"]
display_order = ["WINEPREFIX", "WINEARCH", "WH_WINE_USE", "DXVK_VER", "VKD3D_VER", "WINEESYNC", "WINEFSYNC", "WH_XDG_OPEN"]
html_content = f'<p style="line-height: 1.3; font-size: 9pt;">'
html_content += f"<b>Имя:</b> {html.escape(prefix_name)}<br>"
@@ -2635,6 +2687,15 @@ class WineHelperGUI(QMainWindow):
html_content += "<br><b>Дополнительные параметры:</b><br>"
html_content += other_vars_html
html_content += "<br><b>Компоненты (Winetricks):</b> "
if display_verbs:
# Используем span вместо div, чтобы избежать лишних отступов
html_content += '<span style="max-height: 120px; overflow-y: auto;">'
html_content += ", ".join(html.escape(v) for v in display_verbs)
html_content += '</span>'
else:
html_content += "Не установлены"
html_content += "</p>"
self.prefix_info_display.setHtml(html_content)
@@ -3191,9 +3252,6 @@ class WineHelperGUI(QMainWindow):
"""Открывает диалог создания нового префикса."""
dialog = CreatePrefixDialog(self)
if dialog.exec_() == QDialog.Accepted:
if not self._show_license_agreement_dialog():
return
self.start_prefix_creation(
prefix_name=dialog.prefix_name,
wine_arch=dialog.wine_arch,
@@ -3644,6 +3702,7 @@ class WineHelperGUI(QMainWindow):
wine_executable = self._get_wine_executable_for_prefix(prefix_name)
dialog = WinetricksManagerDialog(prefix_path, winetricks_path, self, wine_executable=wine_executable)
dialog.installation_complete.connect(lambda: self.update_prefix_info_display(prefix_name))
dialog.exec_()
def _get_wine_executable_for_prefix(self, prefix_name):
@@ -4636,6 +4695,7 @@ class WineHelperGUI(QMainWindow):
self.command_process.deleteLater()
self.command_process = None
self.command_close_button.setEnabled(True)
self.command_log_output.ensureCursorVisible()
def _handle_launcher_creation_finished(self, exit_code, exit_status):
"""Обрабатывает завершение создания ярлыка."""