winehelper/autoinstall/ctm-service
2025-04-01 16:37:35 +03:00

40 lines
1.7 KiB
Bash
Raw Permalink 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 PROG_NAME="СТМ-Сервис"
export PROG_ICON="ctmservice"
export WH_WINE_USE="wine_x_tkg_10-0_amd64"
export WINEPREFIX="ved_ctm"
export BASE_PFX="ved_ctm_pfx_x86_v04"
export WINEARCH="win32"
export WH_WINDOWS_VER="7"
export INSTALL_DLL="vb6run art2kmin mdac27 mdac28 arial jet40 dotnet452 dotnet46 msxml3 ie8"
prepair_wine
AUTOINSTALL_EXE="${WH_TMP_DIR}/setup_cs.exe"
AUTOINSTALL_UNPACK="${WH_TMP_DIR}/setup_cs"
AUTOINSTALL_SETUP="${WH_TMP_DIR}/setup_cs/setup.exe"
if try_download "https://files.ctm.ru/CSERVICE/SFX/setup_cs.exe" "${AUTOINSTALL_EXE}" ; then
7z x -y "${AUTOINSTALL_EXE}" -o"${AUTOINSTALL_UNPACK}"
try_remove_file "$AUTOINSTALL_EXE"
wine_run_install "${AUTOINSTALL_SETUP}" /cd /targetdir="C:\\\\Program Files\\\\CTM\\\\CSERVICE" /auto /hide
try_remove_dir "$AUTOINSTALL_UNPACK"
WIN_FILE_EXEC="$DRIVE_C/Program Files/CTM/CSERVICE/ctmservc.exe"
create_desktop "$PROG_NAME" "$WIN_FILE_EXEC" "$PROG_ICON"
if [[ "$USE_CTMBAR" == "1" ]] ; then
if [[ -f "$DRIVE_C/Program Files/CTM/COMMON/CTMBAR.EXE" ]]
then WIN_FILE_EXEC1="$DRIVE_C/Program Files/CTM/COMMON/CTMBAR.EXE"
elif [[ -f "$DRIVE_C/Program Files/CTM/COMMON/ctmbar.exe" ]]
then WIN_FILE_EXEC1="$DRIVE_C/Program Files/CTM/COMMON/ctmbar.exe"
else WIN_FILE_EXEC1="$DRIVE_C/Program Files/CTM/Common/ctmbar.exe"
fi
create_desktop "CTM-Офис" "$WIN_FILE_EXEC1" "wedctmbar"
fi
fi