Compare commits

..

5 Commits
devel ... 0.8.1

Author SHA1 Message Date
Mikhail Tergoev
70bee8c760 Merge branch 'minergenon-devel' 2025-11-13 22:51:08 +03:00
Mikhail Tergoev
dab4017c44 ksamu: updated wine and wine-cpcsp_proxy 2025-11-13 22:48:19 +03:00
Mikhail Tergoev
e21db7d2bd updated sha256sum.list and added wow64 wine and wine-cpcsp_proxy 2025-11-13 22:46:46 +03:00
Mikhail Tergoev
e2d39484f4 added support wine-cpcsp_proxy wow64 2025-11-13 22:44:28 +03:00
Mikhail Tergoev
01d60271c2 create_base_pfx: added rm symlink from windows 2025-11-11 14:34:44 +03:00
3 changed files with 125 additions and 54 deletions

View File

@@ -1,12 +1,17 @@
##### WINE #####
##### WINE WOW64 #####
e9a8b79dfe12cad1304dca573d73aefe109e3d69b6fff739c8dbb8b2d3c271c6 wine-10.12.1-alt1-wow64.tar.xz
##### WINE AMD64 #####
009c95bfe2df3f9264c9c5092f3e30ea7a168dd7869046058a718a70739602d4 wine_wh_tflex_10-9_amd64.tar.xz
3571c40a787f0386e0160b5d471b1bf11fa2a235b497156cd38198b90bcb4a9f wine_x_tkg_10-0_i586.tar.xz
71d6fdfd23d7988471d345c68e81699b8af931352b03dd216424b398f63c7b12 wine_x_tkg_10-0_amd64.tar.xz
fb7fdfde96de10a1b3b051bdf2727b6a7c1768b878483726454dd6726e9e0193 wine-9.0.14-alt1-i586-spravkibk.tar.xz
e0a84bb4908c3927954d7eef6b8ac7212e442b8c107d000c6890fec340f96183 wine-9.0.14-alt1-amd64.tar.xz
6f86d2220b65b709bf88c6f829a4998de3b929cc2091cd1333a51c32e1491b79 wine-9.0.9-alt1-i586.tar.xz
f1bf1261550ca2928cefacdb724926d3d6d103433d0ff6882ee9783a50d8f4e4 wine-8.8-staging-amd64.tar.xz
61bec1230b37b8fcc69fd45f848b44fd88cc41fcdd5dc3080336d7da63660f40 wine-7.16.1-alt1-amd64.tar.xz
##### WINE I586 #####
3571c40a787f0386e0160b5d471b1bf11fa2a235b497156cd38198b90bcb4a9f wine_x_tkg_10-0_i586.tar.xz
fb7fdfde96de10a1b3b051bdf2727b6a7c1768b878483726454dd6726e9e0193 wine-9.0.14-alt1-i586-spravkibk.tar.xz
6f86d2220b65b709bf88c6f829a4998de3b929cc2091cd1333a51c32e1491b79 wine-9.0.9-alt1-i586.tar.xz
6fea17fd131f57c2ebf7ca4c60d3c5a9e819afe16e5d0b77ecb750da99ae0e38 wine-7.16.1-alt1-i586.tar.xz
##### WINE_LG #####
@@ -150,6 +155,7 @@ edf16d2b37bc77d121d5d81b06b60d3f694e0060c6606e729ceab30de3d27466 vkd3d-proton-s
##### CPCSP_PROXY #####
3153088ff28d6af415c3504a421e5382554dbb305f38d5a87dd84df90d680421 wine-cpcsp_proxy-0.6.1-alt1.tar.xz
fbe72bfe3c2c307363782ce2d37589e142b44111f269657b0e516a6b2d6ab8a9 wine-cpcsp_proxy-0.7.3-alt5-wow64.tar.xz
##### FONTS #####
405bfe3b7c7f80034837c05656535053305727ee4bf1d993521b67b71d08ebc6 extra_fonts_v01.tar.xz
@@ -171,6 +177,10 @@ d62225f6a23e49355a59a2bd9a495390694bd70d4be6d6527cfb7fb2e2d65f0d defpfx_x64_v01
# create with wine_x_tkg_10-0_amd64 (universal user: xuser and isolate_home by default)
# winetricks msxml3 msxml4 msxml6 andale arial comicsans courier georgia impact times trebuchet verdana webdings corefonts wsh57 vcrun6 gdiplus lucida tahoma ucrtbase2019 vcrun2019 dotnet40 dotnet48 dotnet20sp2 d3dcompiler_47
eb1fec64eea3d83f2bdce185c7bc0c1a93afb51139f16256c885098a6f7e2242 defpfx_dn48_x64_v03.tar.xz
# based on dotpfx48v8 (renamed steamuser to xuser and isolate_home by default)
# winetricks dotnet20sp2 dotnet40 dotnet45 dotnet46 dotnet461 dotnet462 dotnet472 dotnet48 andale arial comicsans courier georgia impact times rebuchet verdana webdings corefonts lucida mfc42 msxml3 msxml4 msxml6 vcrun2005 vcrun2010 vcrun2012 vcrun2013 vcrun2022 atmlib gdiplus 7zip
68ad589a3e6d8a845c2e3bd4c2672cf97982b3fea0ca4b4f2fb6da126d8b3075 tflex_pfx_x64_v03.tar.xz
# create with wine_wh_tflex_10-9_amd64
# winetricks isolate_home msxml6 ipamona opensymbol wenquanyi ucrtbase2019 uff unifont droid wenquanyizenhei internal dotnet48 dotnet20 eufonts takao d3dcompiler_47 fontsmooth=rgb vcrun2019 vlgothic andale arial comicsans courier georgia impact times trebuchet verdana webdings corefonts liberation sourcehansans baekmuk tahoma lucida t-flex-cad-prepair

View File

@@ -1,17 +1,18 @@
#!/usr/bin/env bash
# info_ru: Программа “КСАМУ”.
# info_ru: “КСАМУ” - Комплексная система автоматизации медицинского учреждения.
########################################################################
export PROG_URL="https://docs.medicine-it.ru/"
export WH_WINE_USE="wine_x_tkg_10-0_amd64"
export WH_WINE_USE="wine-10.12.1-alt1-wow64"
export WINEPREFIX="ksamu"
export PROG_NAME="КСАМУ"
export PROG_ICON="ksamu"
export BASE_PFX="ksamu_pfx_x64_v01"
export WINEARCH="win64"
export INSTALL_DLL="richtx32 riched20 riched30 msls31 msftedit msxml6 msxml3 msxml4 fontsmooth=gray" #riched32
export INSTALL_DLL="richtx32 riched20 riched30 msls31 msftedit msxml6 msxml4 msxml3 fontsmooth=gray"
# riched32
export WH_USE_EXTRA_FONTS="1"
export WH_WINDOWS_VER="7"
export WH_USE_CPCSP_PROXY="1"
prepair_wine
create_desktop "$PROG_NAME" "$DRIVE_C/KSAMU/KSAMU.exe" "$PROG_ICON"

View File

@@ -92,7 +92,7 @@ check_variables () { [[ -z ${!1} ]] && export $1="$2" ;}
##### CHECK DEBUG #####
if [[ "$1" == "--debug" ]] ; then
check_variables WINEDEBUG "+loaddll,+seh"
check_variables WINEDEBUG "+loaddll"
export DXVK_LOG_LEVEL="error"
export VKD3D_DEBUG="error"
export WINE_MONO_TRACE="E:System.NotImplementedException"
@@ -142,7 +142,8 @@ check_variables WINEARCH "win64" # or "win32"
check_variables WH_WINE_USE "wine_x_tkg_10-0_amd64" # or system
check_variables WH_USE_CPCSP_PROXY "0"
check_variables CPCSP_PROXY_VER "0.6.1-alt1"
check_variables CPCSP_PROXY_X86_64_VER "0.6.1-alt1"
check_variables CPCSP_PROXY_WOW64_VER "0.7.3-alt5-wow64"
check_variables WH_USE_EXTRA_FONTS "0"
check_variables EXTRA_FONTS_VER "01"
@@ -460,9 +461,12 @@ try_copy_wine_dll_to_pfx_64 () {
}
try_copy_wine_dll_to_pfx_32() {
if [[ -d "$WINEDIR/lib/wine/i386-windows" ]]
then WINE_BUILD_DLL_32="$WINEDIR/lib/wine/i386-windows"
else WINE_BUILD_DLL_32="$WINEDIR/lib/wine"
if [[ -d "$WINEDIR/lib/wine/i386-windows" ]] ; then
WINE_BUILD_DLL_32="$WINEDIR/lib/wine/i386-windows"
elif [[ -d "$WINEDIR/lib64/wine/i386-windows" ]] ; then
WINE_BUILD_DLL_32="$WINEDIR/lib64/wine/i386-windows"
else
WINE_BUILD_DLL_32="$WINEDIR/lib/wine"
fi
if [[ "$WINEARCH" == "win64" ]] ; then
cmp -s "$WINE_BUILD_DLL_32/$1" "${WINEPREFIX}/drive_c/windows/syswow64/$1" && return 0
@@ -873,6 +877,10 @@ init_wine_ver () {
fi
[[ ! -f "$WINEDIR/version" ]] && echo "$WH_WINE_USE" > "$WINEDIR/version"
if [[ $WH_WINE_USE =~ wow64 ]]
then export WH_WINE_WOW64="1"
else export WH_WINE_WOW64="0"
fi
export WINE="$WINEDIR/bin/wine"
export WINELOADER="$WINEDIR/bin/wine"
@@ -907,21 +915,32 @@ init_wine_ver () {
fi
fi
if [[ $WH_USE_CPCSP_PROXY == "1" ]] \
&& ! grep -q "$CPCSP_PROXY_VER" "$WINEDIR/cpcsp_proxy.ver"
then
CPCSP_PROXY_NAME="wine-cpcsp_proxy-$CPCSP_PROXY_VER"
CPCSP_PROXY_URL="$CLOUD_URL/$CPCSP_PROXY_NAME.tar.xz"
try_download cloud "$CPCSP_PROXY_URL" "$WH_TMP_DIR/$CPCSP_PROXY_NAME.tar.xz" check256sum
unpack "$WH_TMP_DIR/$CPCSP_PROXY_NAME.tar.xz" "$WH_TMP_DIR"
cp -fr "$WH_TMP_DIR/$CPCSP_PROXY_NAME/"i386-* "$WINEDIR/lib/wine/"
if [[ -d "$WINEDIR/lib64" ]] ; then
cp -fr "$WH_TMP_DIR/$CPCSP_PROXY_NAME/"x86_64-* "$WINEDIR/lib64/wine/"
if [[ $WH_USE_CPCSP_PROXY == "1" ]] ; then
local cpcsp_proxy_ver
if [[ $WH_WINE_WOW64 == "1" ]]
then cpcsp_proxy_ver="$CPCSP_PROXY_WOW64_VER"
else cpcsp_proxy_ver="$CPCSP_PROXY_X86_64_VER"
fi
if [[ ! -f "$WINEDIR/cpcsp_proxy.ver" ]] \
|| ! grep -q "$cpcsp_proxy_ver" "$WINEDIR/cpcsp_proxy.ver"
then
CPCSP_PROXY_NAME="wine-cpcsp_proxy-$cpcsp_proxy_ver"
CPCSP_PROXY_URL="$CLOUD_URL/$CPCSP_PROXY_NAME.tar.xz"
try_download cloud "$CPCSP_PROXY_URL" "$WH_TMP_DIR/$CPCSP_PROXY_NAME.tar.xz" check256sum
unpack "$WH_TMP_DIR/$CPCSP_PROXY_NAME.tar.xz" "$WH_TMP_DIR"
if [[ $WH_WINE_WOW64 == "1" ]] ; then
cp -fr "$WH_TMP_DIR/$CPCSP_PROXY_NAME/"* "$WINEDIR/lib64/wine/"
else
cp -fr "$WH_TMP_DIR/$CPCSP_PROXY_NAME/"i386-* "$WINEDIR/lib/wine/"
if [[ -d "$WINEDIR/lib64" ]] ; then
cp -fr "$WH_TMP_DIR/$CPCSP_PROXY_NAME/"x86_64-* "$WINEDIR/lib64/wine/"
fi
fi
try_remove_dir "$WH_TMP_DIR/$CPCSP_PROXY_NAME"
echo "$cpcsp_proxy_ver" > "$WINEDIR/cpcsp_proxy.ver"
fi
try_remove_dir "$WH_TMP_DIR/$CPCSP_PROXY_NAME"
echo "$CPCSP_PROXY_VER" > "$WINEDIR/cpcsp_proxy.ver"
fi
else
# use system WINE
@@ -1247,38 +1266,70 @@ init_wineprefix () {
# настраиваем префикс для работы с cpcsp_proxy
if [[ $WH_USE_CPCSP_PROXY == "1" ]] ; then
for cpcsp_proxy_file in "cpcsp_proxy.dll" "cpcsp_proxy_setup.exe" ; do
try_copy_wine_dll_to_pfx_64 "$cpcsp_proxy_file"
try_copy_wine_dll_to_pfx_32 "$cpcsp_proxy_file"
done
local cades_ver="release_2_0_14892"
local url_cades_dll="https://cryptopro.ru/sites/default/files/products/cades/$cades_ver"
if [[ ! -d "$DRIVE_C/Program Files (x86)/Common Files/Crypto Pro/Shared/" ]]
then
local msi_cades32="cades-win32.msi"
try_download cloud "$url_cades_dll/$msi_cades32" "$WH_TMP_DIR/$msi_cades32"
print_info "Установка КриптоПро ЭЦП Runtime ($msi_cades32)"
WINEDLLOVERRIDES="msxml3=b" wine_run "$WH_TMP_DIR/$msi_cades32" /q
fi
if [[ "$WINEARCH" == "win64" ]] \
&& [[ ! -d "$DRIVE_C/Program Files/Common Files/Crypto Pro/Shared" ]]
then
local msi_cades64="cades-x64.msi"
try_download cloud "$url_cades_dll/$msi_cades64" "$WH_TMP_DIR/$msi_cades64"
print_info "Установка КриптоПро ЭЦП Runtime ($msi_cades64)"
WINEDLLOVERRIDES="msxml3=b" wine_run "$WH_TMP_DIR/$msi_cades64" /q
fi
if ! grep -q "cpcsp_proxy.dll" "$WINEPREFIX/system.reg" ; then
if [[ "$WINEARCH" == "win32" ]]
then cpcsp_proxy_cmd=("$WINELOADER" "cpcsp_proxy_setup.exe")
else cpcsp_proxy_cmd=("${WINELOADER}64" "cpcsp_proxy_setup.exe")
print_info "Запускаем настройку cpcsp_proxy..."
CPCSP_PROXY_OK="0"
try_copy_wine_dll_to_pfx_64 "cpcsp_proxy.dll"
try_copy_wine_dll_to_pfx_32 "cpcsp_proxy.dll"
if [[ $WH_WINE_WOW64 == "1" ]] ; then
env WINEDEBUG="fixme-all" "$WINE" "C:\\windows\\system32\\regsvr32.exe" \
/s /n /i cpcsp_proxy.dll 2>&1 | tee "$WINEPREFIX/cpcsp_setup.log"
env WINEDEBUG="fixme-all" "$WINE" "C:\\windows\\syswow64\\regsvr32.exe" \
/s /n /i cpcsp_proxy.dll 2>&1 | tee -a "$WINEPREFIX/cpcsp_setup.log"
else
try_copy_wine_dll_to_pfx_64 "cpcsp_proxy_setup.exe"
try_copy_wine_dll_to_pfx_32 "cpcsp_proxy_setup.exe"
if [[ "$WINEARCH" == "win32" ]]
then cpcsp_proxy_cmd=("$WINELOADER" "cpcsp_proxy_setup.exe")
else cpcsp_proxy_cmd=("${WINELOADER}64" "cpcsp_proxy_setup.exe")
fi
set -o pipefail
for ((i=2; i < 6; i++)) ; do
"${cpcsp_proxy_cmd[@]}" | tee "$WINEPREFIX/cpcsp_setup.log"
[[ "${PIPESTATUS[0]}" == "0" ]] && break
print_warning "Попытка $i из 5..."
wait_wineserver
done
fi
print_info "Запускаем настройку cpcsp_proxy..."
unset CPCSP_PROXY_OK
set -o pipefail
for ((i=2; i < 6; i++)) ; do
"${cpcsp_proxy_cmd[@]}" | tee "$WINEPREFIX/cpcsp_setup.log"
local CPCSP_EXIT_STATUS="${PIPESTATUS[0]}"
if grep -q "failed to load /opt/cprocsp/" "$WINEPREFIX/cpcsp_setup.log" ; then
fatal "Проверьте правильность установки КриптоПро в системе.\n Инструкция: https://www.altlinux.org/CryptoPro"
fi
if [[ $CPCSP_EXIT_STATUS == "0" ]] ; then
print_info "Настройка cpcsp_proxy успешно завершена."
CPCSP_PROXY_OK="1"
break
fi
print_warning "Попытка $i из 5..."
wait_wineserver
done
wait_wineserver
if grep -q "failed to load /opt/cprocsp/" "$WINEPREFIX/cpcsp_setup.log" ; then
print_error "Проверьте правильность установки КриптоПро в системе.\n Инструкция: https://www.altlinux.org/CryptoPro"
else
CPCSP_PROXY_OK="1"
fi
try_remove_file "$WINEPREFIX/cpcsp_setup.log"
[[ $CPCSP_PROXY_OK != "1" ]] && fatal "Ошибка во время настройки cpcsp_proxy."
wait_wineserver
if [[ $CPCSP_PROXY_OK == "1" ]]
then print_info "Настройка cpcsp_proxy успешно завершена."
else fatal "Ошибка во время настройки cpcsp_proxy."
fi
fi
fi
@@ -1895,13 +1946,16 @@ create_base_pfx () {
users_dir="$drive_c_dir/users"
archive_path="$WH_TMP_DIR/pfx/new_${PREFIX_NAME}.tar.xz"
# создаем резернвую копию каталога с префиксом
try_copy_dir "$prefix_dir" "${prefix_dir}_bak"
create_new_dir "$WH_TMP_DIR/pfx/"
# удаляем лишнюю информацию из winetricks.log
for wtlog in workaround isolate internal winxp win2 win7 win10
do sed -i "/$wtlog/d" "$prefix_dir/winetricks.log"
done
# переносим пользовательский каталог в общий для всех "xuser"
if [[ -d "$users_dir/$USER" ]] \
&& [[ ! -L "$users_dir/$USER" ]]
then
@@ -1912,6 +1966,7 @@ create_base_pfx () {
cp -fr "$users_dir/$USER"/* "$users_dir/xuser/"
fi
# удаляем всё ненужное для переноса префикса
try_remove_file "$prefix_dir/.update-timestamp"
try_remove_file "$prefix_dir/.firstboot"
try_remove_file "$prefix_dir/last.conf"
@@ -1922,9 +1977,14 @@ create_base_pfx () {
try_remove_dir "$drive_c_dir/windows/temp/"
try_remove_dir "$drive_c_dir/windows/Installer/"
# удаляем кэш установщика .net
rm -fr "$drive_c_dir/windows/Microsoft.NET"/*/*/SetupCache/
# удаляем все симлинки внутри каталога windows
find "$drive_c_dir/windows/" -type l -delete
cd "$prefix_dir"
# запускаем сжатие префикса
if tar --no-xattrs -c -I 'xz --memlimit=8000MiB -9 -T0' -f "$archive_path" ./* ; then
print_ok "Архив создан по пути: $archive_path"
xdg-open "$(dirname "$archive_path")" &