Compare commits

..

11 Commits

Author SHA1 Message Date
Mikhail Tergoev
fb0336b3ef fixed ppdgr2 script 2025-12-05 16:01:58 +03:00
Mikhail Tergoev
5095e73409 Merge branch 'minergenon-devel' 2025-12-05 15:53:32 +03:00
Mikhail Tergoev
bc6000018b returned prefix separation for nalog programs 2025-12-05 15:51:47 +03:00
Sergey Palcheh
e3adf19624 fixed the display of icons for t-flex* in the manual installation tab 2025-12-04 14:03:33 +06:00
Sergey Palcheh
dc7a996060 added ICONS_BUTTON_GUI variable for GUI 2025-12-04 13:59:54 +06:00
Sergey Palcheh
eca1905c62 added a default icon for files.exe without an icon 2025-12-04 12:49:03 +06:00
Sergey Palcheh
371b2b7484 the prefix name was added to the list immediately after it was restored 2025-12-04 09:55:38 +06:00
Mikhail Tergoev
1f4cb54f54 revert d3d* for winetricks 2025-12-03 17:33:20 +03:00
Mikhail Tergoev
af52bd74d0 Merge branch 'minergenon-devel' 2025-12-03 14:55:26 +03:00
Sergey Palcheh
ded62bd9ac the description of the prepared prefix has been corrected 2025-12-03 12:43:49 +06:00
Sergey Palcheh
15b6fdd216 added HiDPI support 2025-12-02 13:28:35 +06:00
10 changed files with 91 additions and 57 deletions

BIN
image/wh_default.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -2,7 +2,7 @@
# info_ru: Ручная установка дополнений для T-FLEX CAD 17 или 18
########################################################################
export PROG_NAME="T-FLEX CAD 17/18"
export PROG_ICON="tflexcad"
export ICONS_BUTTON_GUI="tflexcad17 tflexcad18"
export WH_WINE_USE="wine-10.18.1-tflex-alt2-wow64"
export BASE_PFX="tflex_pfx_x64_v03"
export WINEARCH="win64"

View File

@@ -2,7 +2,7 @@
# info_ru: Ручная установка дополнений для T-FLEX DOCS 17 или 18
########################################################################
export PROG_NAME="T-FLEX DOCS 17/18"
export PROG_ICON="tflexcad"
export PROG_ICON="tflexdoc17"
export WH_WINE_USE="wine-10.18.1-tflex-alt2-wow64"
export BASE_PFX="tflex_pfx_x64_v03"
export WINEARCH="win64"

View File

@@ -3,13 +3,13 @@
########################################################################
export PROG_URL="https://www.nalog.gov.ru"
export WH_WINE_USE="wine_x_tkg_10-0_amd64"
export WINEPREFIX="nalog"
export WINEPREFIX="declaration"
export PROG_NAME="Декларация"
export PROG_ICON="declarac"
export BASE_PFX="none"
export BASE_PFX="defpfx_x86_v01"
export WINEARCH="win32"
export INSTALL_DLL="msxml3 msxml4 msxml6 corefonts wsh57 vcrun6 jet40 gdiplus"
export WH_WINDOWS_VER="10"
export INSTALL_DLL="corefonts micross tahoma lucida riched20 comctl32 msxml3 msxml4 msxml6 mdac28 wsh57 vcrun6 vb6run jet40 gdiplus vcrun2019 dotnet20sp2 dotnet40 dotnet48"
try_get_page "https://www.nalog.gov.ru/rn77/program/5961249/"
VER_YEAR=$(read_page | grep -oP 'href="\K[^"]*.msi[^"]*' | awk -F'/' '{print $(NF-2)}' | head -n 1)

View File

@@ -6,10 +6,10 @@ export WH_WINE_USE="wine_x_tkg_10-0_amd64"
export WINEPREFIX="nalog"
export PROG_NAME="Налогоплательщик ЮЛ"
export PROG_ICON="npul"
export BASE_PFX="none"
export BASE_PFX="defpfx_x86_v01"
export WINEARCH="win32"
export INSTALL_DLL="msxml3 msxml4 msxml6 corefonts wsh57 vcrun6 jet40 gdiplus"
export WH_WINDOWS_VER="10"
export INSTALL_DLL="corefonts micross tahoma lucida riched20 comctl32 msxml3 msxml4 msxml6 mdac28 wsh57 vcrun6 vb6run jet40 gdiplus vcrun2019 dotnet20sp2 dotnet40 dotnet48"
try_get_page "https://data.nalog.ru/rn77/program/5961229/"
VER_MSI=$(read_page | grep -oP 'NalogUL\d+\.msi' | tail -1 | grep -oP '\d+')

View File

@@ -3,14 +3,14 @@
########################################################################
export PROG_URL="https://www.nalog.gov.ru"
export WH_WINE_USE="wine_x_tkg_10-0_amd64"
export WINEPREFIX="nalog"
export WINEPREFIX="ppdgr2"
export PROG_NAME="ППДГР-2"
export PROG_ICON="ppdgr"
export BASE_PFX="none"
export BASE_PFX="defpfx_dn48_x86_v01"
export WINEARCH="win32"
export INSTALL_DLL="dotnet48 msxml3 msxml4 msxml6 corefonts lucida wsh57 vcrun6 jet40 gdiplus"
export WH_WINDOWS_VER="10"
var_winedlloverride_update "msxml4=b,wininet=b"
export INSTALL_DLL="corefonts micross tahoma lucida riched20 comctl32 msxml3 msxml4 msxml6 mdac28 wsh57 vcrun6 vb6run jet40 gdiplus vcrun2019 dotnet20sp2 dotnet40 dotnet48"
try_get_page "https://www.nalog.gov.ru/rn77/program/5961277/"
VER_MSI_SLASH=$(read_page | grep -oP 'href="\K[^"]*.msi[^"]*' | awk -F'/' '{print $(NF-1)}' | head -n 1)
@@ -24,4 +24,3 @@ if try_download "https://data.nalog.ru/files/ppdgr/${VER_MSI_SLASH}/SetupPPDGR2.
WIN_FILE_EXEC="$DRIVE_C/АО ГНИВЦ/ППДГР-2/PPDGR2.exe"
create_desktop "$PROG_NAME" "$WIN_FILE_EXEC" "$PROG_ICON"
fi
https://data.nalog.ru/files/ppdgr/2.7.3/SetupPPDGR2.msi

View File

@@ -3,13 +3,14 @@
########################################################################
export PROG_URL="https://www.nalog.gov.ru"
export WH_WINE_USE="wine_x_tkg_10-0_amd64"
export WINEPREFIX="nalog"
export WINEPREFIX="soun"
export PROG_NAME="СОУН"
export PROG_ICON="soun"
export BASE_PFX="none"
export BASE_PFX="defpfx_x86_v01"
export WINEARCH="win32"
export INSTALL_DLL=""
export WH_WINDOWS_VER="10"
export INSTALL_DLL="corefonts micross tahoma lucida riched20 comctl32 msxml3 msxml4 msxml6 mdac28 wsh57 vcrun6 vb6run jet40 gdiplus vcrun2019 dotnet20sp2 dotnet40 dotnet48"
export WH_USE_EXTRA_FONTS="1"
try_get_page "https://www.nalog.gov.ru/rn77/program/5961268/"
VER_MSI_SLASH=$(read_page | grep -oP 'href="\K[^"]*.exe[^"]*' | awk -F'/' '{print $(NF-1)}' | head -n 1)

View File

@@ -6,10 +6,10 @@ export WH_WINE_USE="wine_x_tkg_10-0_amd64"
export WINEPREFIX="nalog"
export PROG_NAME="Тестер"
export PROG_ICON="tester"
export BASE_PFX="none"
export BASE_PFX="defpfx_x86_v01"
export WINEARCH="win32"
export INSTALL_DLL="msxml3 msxml4 msxml6 corefonts wsh57 vcrun6 jet40 gdiplus"
export WH_WINDOWS_VER="10"
export INSTALL_DLL="corefonts micross tahoma lucida riched20 comctl32 msxml3 msxml4 msxml6 mdac28 wsh57 vcrun6 vb6run jet40 gdiplus vcrun2019 dotnet20sp2 dotnet40 dotnet48"
try_get_page "https://www.nalog.gov.ru/rn77/program/5961279/"
VER_EXE_SLASH=$(read_page | grep -oP 'href="\K[^"]*.exe[^"]*' | awk -F'/' '{print $(NF-1)}' | tail -n 1)

View File

@@ -610,7 +610,7 @@ create_desktop () {
print_ok "Иконка успешно извлечена и сохранена: $icon_file"
else
print_warning "Не удалось извлечь иконку из $exe_file. Используется иконка по умолчанию."
icon_file="wine" # Запасной вариант
icon_file="$WH_IMAGE_PATH/wh_default.png" # Запасной вариант
fi
try_remove_dir "$tmp_ico_dir"
fi
@@ -620,7 +620,7 @@ create_desktop () {
# Случай 4: Запасной вариант по умолчанию
else
print_info "Иконка '$icon_arg' не найдена. Используется иконка по умолчанию."
icon_file="wine"
icon_file="$WH_IMAGE_PATH/wh_default.png"
fi
# --- Конец логики обработки иконки ---
@@ -1865,46 +1865,49 @@ select_prepared_prefix() {
local in_prefix_section=false
local current_description=""
local current_prefix_name=""
while IFS= read -r line; do
if [[ "$line" =~ ^#####[[:space:]]PREFIX[[:space:]]#####$ ]]; then
if [[ "$line" =~ ^#####[[:space:]]PREFIX[[:space:]]#####$ ]] ; then
in_prefix_section=true
continue
elif [[ "$line" =~ ^#####.* ]]; then
if [[ "$in_prefix_section" == true ]] && [[ -n "$current_description" ]]; then
descriptions+=("$(echo -e "$current_description" | sed 's/\\n$//')")
current_description=""
fi
elif [[ "$line" =~ ^#####.* ]] ; then
in_prefix_section=false
fi
if [[ "$in_prefix_section" == true ]]; then
if [[ "$line" =~ ^[a-f0-9]{64} ]]; then
[[ -n "$current_description" ]] && descriptions+=("$(echo -e "$current_description" | sed 's/\\n$//')")
if [[ "$in_prefix_section" == true ]] ; then
if [[ "$line" =~ ^[a-f0-9]{64} ]] ; then
# Если у нас есть имя предыдущего префикса, добавляем его описание
if [[ -n "$current_prefix_name" ]] ; then
descriptions+=("$(echo -e "${current_description}" | sed 's/\\n$//')")
fi
current_description=""
local filename
filename=$(echo "$line" | awk '{print $2}')
local prefix_name=${filename%.tar.xz}
current_prefix_name=${filename%.tar.xz}
if [[ "$arch" == "win32" ]]; then
if [[ "$prefix_name" == *"_x86_"* ]] || [[ "$prefix_name" == *"_i586_"* ]]; then
options+=("$prefix_name")
fi
elif [[ "$arch" == "win64" ]]; then
if [[ "$prefix_name" == *"_x64_"* ]] || [[ "$prefix_name" == *"_amd64_"* ]]; then
options+=("$prefix_name")
fi
if [[ "$arch" == "win32" ]] && ([[ "$current_prefix_name" == *"_x86_"* ]] || [[ "$current_prefix_name" == *"_i586_"* ]]) ; then
options+=("$current_prefix_name")
elif [[ "$arch" == "win64" ]] && ([[ "$current_prefix_name" == *"_x64_"* ]] || [[ "$current_prefix_name" == *"_amd64_"* ]]) ; then
options+=("$current_prefix_name")
else
# Если архитектура не совпадает, сбрасываем имя, чтобы не добавлять описание
current_prefix_name=""
fi
elif [[ "$line" =~ ^#[[:space:]] ]]; then
elif [[ "$line" =~ ^#[[:space:]] ]] ; then
local comment_line=${line:2} # Удаляем '# '
current_description+="$comment_line\n"
fi
fi
done < "$sha256_file"
# Добавляем описание для самого последнего префикса в файле
if [[ -n "$current_prefix_name" ]] ; then
descriptions+=("$(echo -e "${current_description}" | sed 's/\\n$//')")
fi
echo
print_info "Выберите тип создаваемого префикса:"
for i in "${!options[@]}"; do
for i in "${!options[@]}" ; do
printf "\n\E[36m %s) %s \e[0m\n" "$((i+1))" "${options[$i]}"
[[ -n "${descriptions[$i]}" ]] && printf " \E[33m%s\e[0m\n" "$(echo -e "${descriptions[$i]}" | sed 's/^/ /g')"
done

View File

@@ -642,9 +642,9 @@ class WinetricksManagerDialog(QDialog):
settings_blacklist_pattern = None
if category == 'dlls':
# Исключаем d3d*, directx9, dont_use, dxvk*, vkd3d*, galliumnine, faudio*, Foundation
# Исключаем dont_use, dxvk*, vkd3d*, galliumnine, faudio*, Foundation
dlls_blacklist_pattern = re.compile(
r'^(d3d|directx9|dont_use|dxvk|vkd3d|galliumnine|faudio|foundation)', re.IGNORECASE
r'^(dont_use|dxvk|vkd3d|galliumnine|faudio|foundation)', re.IGNORECASE
)
elif category == 'fonts':
fonts_blacklist_pattern = re.compile(
@@ -1034,14 +1034,21 @@ class ScriptParser:
with open(script_path, 'r', encoding='utf-8') as f:
lines = f.readlines()
# 1. Приоритет у PROG_ICON
# 1. Приоритет у переменной ICONS_BUTTON_GUI для GUI
for line in lines:
if line.strip().startswith('export ICONS_BUTTON_GUI='):
icon_names_str = line.split('=', 1)[1].strip().strip('"\'')
if icon_names_str:
return icon_names_str.split()
# 2. Если ICONS_BUTTON_GUI не найдена, ищем PROG_ICON (для обратной совместимости)
for line in lines:
if line.strip().startswith('export PROG_ICON='):
icon_name = line.split('=', 1)[1].strip().strip('"\'')
if icon_name:
return [icon_name]
icon_names_str = line.split('=', 1)[1].strip().strip('"\'')
if icon_names_str:
return icon_names_str.split()
# 2. Если PROG_ICON не найден, ищем все вызовы create_desktop
# 3. Если ничего не найдено, ищем все вызовы create_desktop
icon_names = []
for line in lines:
line = line.strip()
@@ -1503,23 +1510,39 @@ class CreatePrefixDialog(QDialog):
continue
if re.match(r'^[a-f0-9]{64}', line):
current_prefix_name = line.split(maxsplit=1)[1].replace('.tar.xz', '')
# Если у нас есть имя и описание для предыдущего префикса, добавляем его
if current_prefix_name and current_description:
arch_for_prev_prefix = None
if "_x86_" in current_prefix_name or "_i586_" in current_prefix_name:
arch_for_prev_prefix = 'win32'
elif "_x64_" in current_prefix_name or "_amd64_" in current_prefix_name:
arch_for_prev_prefix = 'win64'
arch = None
if "_x86_" in current_prefix_name or "_i586_" in current_prefix_name:
arch = 'win32'
elif "_x64_" in current_prefix_name or "_amd64_" in current_prefix_name:
arch = 'win64'
if arch:
description = current_description.strip().replace('\\n', '\n') if current_description else "Рекомендуемый набор библиотек"
self.prepared_prefixes[arch].append((current_prefix_name, description))
if arch_for_prev_prefix:
description_to_add = current_description.strip().replace('\\n', '\n')
self.prepared_prefixes[arch_for_prev_prefix].append((current_prefix_name, description_to_add))
# Сбрасываем описание для нового префикса
current_description = ""
current_prefix_name = None
# Получаем имя нового префикса
current_prefix_name = line.split(maxsplit=1)[1].replace('.tar.xz', '') if len(line.split(maxsplit=1)) > 1 else None
elif line.startswith('# '):
current_description += line[2:] + "\\n"
# Накапливаем описание
comment_line = line[2:].strip()
if current_description:
current_description += "\n" + comment_line
else:
current_description = comment_line
# После цикла добавляем описание для самого последнего префикса, если оно есть
if current_prefix_name and current_description:
arch = None
if "_x86_" in current_prefix_name or "_i586_" in current_prefix_name: arch = 'win32'
elif "_x64_" in current_prefix_name or "_amd64_" in current_prefix_name: arch = 'win64'
if arch:
self.prepared_prefixes[arch].append((current_prefix_name, current_description.strip().replace('\\n', '\n')))
except IOError as e:
QMessageBox.warning(self, "Ошибка", f"Не удалось прочитать файл с описаниями префиксов: {e}")
@@ -5101,6 +5124,7 @@ class WineHelperGUI(QMainWindow):
if exit_code == 0:
self.command_log_output.append(f"\n=== Восстановление успешно завершено ===")
self.update_installed_apps()
self._load_created_prefixes()
self.filter_installed_buttons()
else:
self.command_log_output.append(f"\n=== Ошибка выполнения (код: {exit_code}) ===")
@@ -5123,6 +5147,13 @@ class WineHelperGUI(QMainWindow):
def main():
"""Основная точка входа в приложение."""
# Включаем поддержку HiDPI до создания QApplication для надежного и предсказуемого масштабирования.
# AA_EnableHighDpiScaling включает автоматическое масштабирование на основе DPI дисплея.
if hasattr(Qt, 'AA_EnableHighDpiScaling'):
QApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)
# AA_UseHighDpiPixmaps позволяет использовать высококачественные иконки (например, @2x).
if hasattr(Qt, 'AA_UseHighDpiPixmaps'):
QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps, True)
# QApplication должен быть создан до использования любых других частей Qt
app = QApplication(sys.argv)