Files
winehelper/autoinstall/abc-recomposer
2025-06-25 16:56:28 +06:00

35 lines
1.4 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
# info_ru: Программный комплекс АВС-Рекомпозитор.
########################################################################
export WH_WINE_USE="wine-9.0.14-alt1-amd64"
export WINEPREFIX="abc"
export PROG_NAME="АВС Рекомпозитор"
export PROG_ICON="abc-recomposerwl"
export BASE_PFX="none"
export WH_WINDOWS_VER="10"
export WINEARCH="win64"
# export INSTALL_DLL=""
prepair_wine
ABC_FILE="${WH_TMP_DIR}/abcrecomposer.html"
curl -o "$ABC_FILE" -A "Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)" "https://abccenter.ru/download-ru/"
if [[ ! -f "$ABC_FILE" ]] \
|| grep -q "Forbidden" "$ABC_FILE"
then
fatal "Страница сайта не доступна, или превышено количество запросов к странице."
fi
VERDATE=$(grep -oP 'abcrecomposer_\K\d+[._]\d+[._]\d+-\d+-\d+' "$ABC_FILE")
VERSION=$(grep -oP 'abcrecomposer_\K\d+[._]\d+' "$ABC_FILE" | sed -E 's/[._]/./g')
AUTOINSTALL_EXE="${WH_TMP_DIR}/Setup_ABC-RU_${VERDATE}.exe"
if try_download "https://abccenter.ru/wp-content/soft/abcrecomposer_${VERDATE}.exe" "${AUTOINSTALL_EXE}" ; then
wine_run_install "${AUTOINSTALL_EXE}" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
try_remove_file "$AUTOINSTALL_EXE"
try_remove_file "$ABC_FILE"
WIN_FILE_EXEC="$DRIVE_C/ABC-Soft/ABC RECOMPOSER/${VERSION}/abcrecomposerwl.exe"
create_desktop "$PROG_NAME $VERSION" "$WIN_FILE_EXEC" "$PROG_ICON"
fi