diff --git a/autoinstall/scadoffice b/autoinstall/scadoffice new file mode 100644 index 0000000..14d2d01 --- /dev/null +++ b/autoinstall/scadoffice @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +# info_ru: SCAD Office — это программный комплекс для расчёта строительных конструкций, с дополнением Apache OpenOffice. Apache OpenOffice - пакет офисного программного обеспечения для обработки текстов, электронных таблиц, презентаций, графики, баз данных и многого другого. +######################################################################## +export WH_WINE_USE="wine_x_tkg_10-0_amd64" +export WINEPREFIX="scadoffice" +export BASE_PFX="none" +export WH_WINDOWS_VER="10" +export WINEARCH="win64" +export INSTALL_DLL="dotnet48 gdiplus vcrun6sp6 vcrun2005 vcrun2019 d3dx11_42 d3dx11_43 d3dx9 d3dcompiler_42 d3dcompiler_43 d3dcompiler_46 d3dcompiler_47 richtx32 riched30 riched20 msxml6" + +ADDONS_PACK="${WH_TMP_DIR}/scadoffice_addons_v01.tar.xz" +ADDONS_PATH="${WH_TMP_DIR}/scadoffice_addons" +OFFICE_EXE="${ADDONS_PATH}/OpenOffice.exe" +OFFICE_PACK="${ADDONS_PATH}/OpenOffice" +AUTOINSTALL_SETUP="${ADDONS_PATH}/OpenOffice/setup.exe" +ADDONS_PATH_REG="${ADDONS_PATH}/REG" +ADDONS_PATH_MDAC="${ADDONS_PATH}/mdac64" +ADDONS_PATH_OPENSSH="${ADDONS_PATH}/OpenSSH" +AUTOINSTALL_EXE="${WH_TMP_DIR}/SCADOffice_11.exe" +DRIVE_C_SCADOFFICE="$DRIVE_C/SCAD Soft/SCADOffice/64" + +prepair_wine +if try_download "https://scadhelp.ru/files/10/download" "${AUTOINSTALL_EXE}" ; then + create_new_dir "$DRIVE_C/SDATA" + create_new_dir "$DRIVE_C/SWORK" + wine_run_install "${AUTOINSTALL_EXE}" /auto /hide + + # Определение всех программ, значков и исполняемых файлов + declare -a PROG_NAME=("Арбат" "Вест" "Глобальные настройки" "Декор" "Дискретная арматура" "Запрос" "Камин" "КоКон" "Комета" "Конструктор сечений" "Консул" "Конфигуратор лицензий" "Кристалл" "Кросс" "Куст" "Магнум" "Монолит" "Откос" "Пастернак" "Преобразование ед. измерений" "Cортамент металлопроката" "Расчет по формуле" "Редактор акселерограмм" "Редактор динамичности" "Редактор материалов" "Тонус" "Эквивалентное сечение" "SCAD++") + + declare -a PROG_ICON=("arbat" "west" "globalsettings" "decor" "rebar" "underground" "comein" "cocon" "comet" "section" "consul" "configprotection" "kristall" "cross" "kust" "magnum" "monolit" "slope" "pasternak" "ucalc" "viewprof" "scalc" "acceledit" "betaedit" "materialsedit" "tonus" "sezam" "scadx") + + declare -a WIN_FILE_EXEC=("${DRIVE_C_SCADOFFICE}/Arbat.exe" "${DRIVE_C_SCADOFFICE}/West.exe" "${DRIVE_C_SCADOFFICE}/GlobalSettings.exe" "${DRIVE_C_SCADOFFICE}/Decor.exe" "${DRIVE_C_SCADOFFICE}/ReBar.exe" "${DRIVE_C_SCADOFFICE}/UnderGround.exe" "${DRIVE_C_SCADOFFICE}/ComeIn.exe" "${DRIVE_C_SCADOFFICE}/CoCon.exe" "${DRIVE_C_SCADOFFICE}/Comet2.exe" "${DRIVE_C_SCADOFFICE}/Section.exe" "${DRIVE_C_SCADOFFICE}/Consul.exe" "${DRIVE_C_SCADOFFICE}/ConfigProtection.exe" "${DRIVE_C_SCADOFFICE}/Kristall.exe" "${DRIVE_C_SCADOFFICE}/Cross.exe" "${DRIVE_C_SCADOFFICE}/Kust2.exe" "${DRIVE_C_SCADOFFICE}/Magnum.exe" "${DRIVE_C_SCADOFFICE}/Monolit.exe" "${DRIVE_C_SCADOFFICE}/Slope.exe" "${DRIVE_C_SCADOFFICE}/Pasternak.exe" "${DRIVE_C_SCADOFFICE}/UCalc.exe" "${DRIVE_C_SCADOFFICE}/ViewProf.exe" "${DRIVE_C_SCADOFFICE}/SCalc.exe" "${DRIVE_C_SCADOFFICE}/AccelEdit.exe" "${DRIVE_C_SCADOFFICE}/BetaEdit.exe" "${DRIVE_C_SCADOFFICE}/MaterialsEdit.exe" "${DRIVE_C_SCADOFFICE}/Tonus.exe" "${DRIVE_C_SCADOFFICE}/Sezam.exe" "${DRIVE_C_SCADOFFICE}/SCADX.exe") + + # Цикл для создания десктопных файлов + for i in "${!PROG_NAME[@]}"; do + create_desktop "${PROG_NAME[i]}" "${WIN_FILE_EXEC[i]}" "${PROG_ICON[i]}" + done +fi + +print_info "Установка дополнительных компонентов..." + +if try_download "https://cloud.linux-gaming.ru/portproton/scadoffice_addons_v01.tar.xz" "${ADDONS_PACK}" ; then + create_new_dir "${ADDONS_PATH}" + unpack "${ADDONS_PACK}" "${ADDONS_PATH}" + 7z x -y "${OFFICE_EXE}" -o"${OFFICE_PACK}" + wine_run_install "${AUTOINSTALL_SETUP}" /qn + + wine_run regedit "${ADDONS_PATH_REG}"/*.reg + + # Установка ODBC + rm -fR "$DRIVE_C/Program Files (x86)/Common Files/System" + cp -r "${ADDONS_PATH_MDAC}/System" "$DRIVE_C/Program Files (x86)/Common Files/System" + cp -r "${ADDONS_PATH_MDAC}"/*.* "$DRIVE_C/windows/system32/" + wine_run regedit "${ADDONS_PATH_MDAC}"/*.reg + + # Установка SSH + cp -r "${ADDONS_PATH_OPENSSH}" "$DRIVE_C/windows/system32/" + + export PROG_NAME1="OpenOffice" + export PROG_ICON1="openoffice" + + WIN_FILE_EXEC1="$DRIVE_C/Program Files (x86)/OpenOffice 4/program/soffice.exe" + create_desktop "$PROG_NAME1" "$WIN_FILE_EXEC1" "$PROG_ICON1" + try_remove_dir "$ADDONS_PATH" + try_remove_file "$ADDONS_PACK" + try_remove_file "$AUTOINSTALL_EXE" +fi diff --git a/image/acceledit.png b/image/acceledit.png new file mode 100644 index 0000000..0a91f66 Binary files /dev/null and b/image/acceledit.png differ diff --git a/image/arbat.png b/image/arbat.png new file mode 100644 index 0000000..fd5cbc2 Binary files /dev/null and b/image/arbat.png differ diff --git a/image/betaedit.png b/image/betaedit.png new file mode 100644 index 0000000..572a542 Binary files /dev/null and b/image/betaedit.png differ diff --git a/image/cocon.png b/image/cocon.png new file mode 100644 index 0000000..545ccbc Binary files /dev/null and b/image/cocon.png differ diff --git a/image/comein.png b/image/comein.png new file mode 100644 index 0000000..cc0f8ce Binary files /dev/null and b/image/comein.png differ diff --git a/image/comet.png b/image/comet.png new file mode 100644 index 0000000..3ba519d Binary files /dev/null and b/image/comet.png differ diff --git a/image/configprotection.png b/image/configprotection.png new file mode 100644 index 0000000..78c7317 Binary files /dev/null and b/image/configprotection.png differ diff --git a/image/consul.png b/image/consul.png new file mode 100644 index 0000000..3b0c9cc Binary files /dev/null and b/image/consul.png differ diff --git a/image/cross.png b/image/cross.png new file mode 100644 index 0000000..b42b0cc Binary files /dev/null and b/image/cross.png differ diff --git a/image/decor.png b/image/decor.png new file mode 100644 index 0000000..7f8edbe Binary files /dev/null and b/image/decor.png differ diff --git a/image/globalsettings.png b/image/globalsettings.png new file mode 100644 index 0000000..813bc48 Binary files /dev/null and b/image/globalsettings.png differ diff --git a/image/kristall.png b/image/kristall.png new file mode 100644 index 0000000..04f4b39 Binary files /dev/null and b/image/kristall.png differ diff --git a/image/kust.png b/image/kust.png new file mode 100644 index 0000000..fa594b0 Binary files /dev/null and b/image/kust.png differ diff --git a/image/magnum.png b/image/magnum.png new file mode 100644 index 0000000..a25f61d Binary files /dev/null and b/image/magnum.png differ diff --git a/image/materialsedit.png b/image/materialsedit.png new file mode 100644 index 0000000..0517f7a Binary files /dev/null and b/image/materialsedit.png differ diff --git a/image/monolit.png b/image/monolit.png new file mode 100644 index 0000000..4afa626 Binary files /dev/null and b/image/monolit.png differ diff --git a/image/openoffice.png b/image/openoffice.png new file mode 100644 index 0000000..c3d9355 Binary files /dev/null and b/image/openoffice.png differ diff --git a/image/pasternak.png b/image/pasternak.png new file mode 100644 index 0000000..c62126d Binary files /dev/null and b/image/pasternak.png differ diff --git a/image/rebar.png b/image/rebar.png new file mode 100644 index 0000000..12beace Binary files /dev/null and b/image/rebar.png differ diff --git a/image/scadx.png b/image/scadx.png new file mode 100644 index 0000000..595d85a Binary files /dev/null and b/image/scadx.png differ diff --git a/image/scalc.png b/image/scalc.png new file mode 100644 index 0000000..c0b0846 Binary files /dev/null and b/image/scalc.png differ diff --git a/image/section.png b/image/section.png new file mode 100644 index 0000000..7b13cd9 Binary files /dev/null and b/image/section.png differ diff --git a/image/sezam.png b/image/sezam.png new file mode 100644 index 0000000..ad34790 Binary files /dev/null and b/image/sezam.png differ diff --git a/image/slope.png b/image/slope.png new file mode 100644 index 0000000..af07564 Binary files /dev/null and b/image/slope.png differ diff --git a/image/tonus.png b/image/tonus.png new file mode 100644 index 0000000..cebca24 Binary files /dev/null and b/image/tonus.png differ diff --git a/image/ucalc.png b/image/ucalc.png new file mode 100644 index 0000000..b50b68e Binary files /dev/null and b/image/ucalc.png differ diff --git a/image/underground.png b/image/underground.png new file mode 100644 index 0000000..f79a318 Binary files /dev/null and b/image/underground.png differ diff --git a/image/viewprof.png b/image/viewprof.png new file mode 100644 index 0000000..62f2a42 Binary files /dev/null and b/image/viewprof.png differ diff --git a/image/west.png b/image/west.png new file mode 100644 index 0000000..e2ebabc Binary files /dev/null and b/image/west.png differ