Commit ad74fbd7 authored by Mikhail Tergoev's avatar Mikhail Tergoev

fix pack and unpack prefixes

parent 42786978
......@@ -2,6 +2,11 @@
-----------------------------------------
История изменений:
* исправлено скачивание необходимых версий WINE из игрового режима SteamDeck
* улучшены функции связанные c работой flatpak (спасибо Boria138)
* исправлено создание и распаковка префиксов
* добавлен выбор версии MESA_GL_VERSION_OVERRIDE в настройки при запуске .exe файлов (спасибо Htylol)
###Scripts version 2281### Дата: 18.04.2024 / Размер скачиваемого обновления: 15 мегабайт
* обновлено окно обновления скриптов PortProton
* иконки для интерфейса переведены из png в svg (спасибо Dervart)
......
......@@ -3463,15 +3463,15 @@ pw_create_prefix_backup () {
else TMP_ALL_PATH="env PATH=\"${PATH}\" LD_LIBRARY_PATH=\"${PW_LD_LIBRARY_PATH}\""
fi
chmod -R u+w "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}"
cat << EOF > /tmp/pp_pfx_backup.sh
cat << EOF > "${PORT_WINE_TMP_PATH}"/pp_pfx_backup.sh
#!/usr/bin/env bash
${TMP_ALL_PATH} mksquashfs "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}" \
"${PW_PREFIX_TO_BACKUP}/${PW_PREFIX_NAME}.ppack.part" -comp zstd \
|| rm -f "${PW_PREFIX_TO_BACKUP}/${PW_PREFIX_NAME}.ppack.part"
EOF
chmod u+x /tmp/pp_pfx_backup.sh
${pw_runtime} ${PW_TERM} /tmp/pp_pfx_backup.sh
try_remove_file /tmp/pp_pfx_backup.sh
chmod u+x "${PORT_WINE_TMP_PATH}"/pp_pfx_backup.sh
${pw_runtime} ${PW_TERM} "${PORT_WINE_TMP_PATH}"/pp_pfx_backup.sh
try_remove_file "${PORT_WINE_TMP_PATH}"/pp_pfx_backup.sh
if [[ -f "${PW_PREFIX_TO_BACKUP}/${PW_PREFIX_NAME}.ppack.part" ]] ; then
mv -f "${PW_PREFIX_TO_BACKUP}/${PW_PREFIX_NAME}.ppack.part" "${PW_PREFIX_TO_BACKUP}/${PW_PREFIX_NAME}.ppack"
yad_info "$PW_PFX_BACKUP_SUCCESS $PW_PREFIX_NAME"
......
......@@ -224,20 +224,20 @@ if [[ ! -z $(basename "${portwine_exe}" | grep .ppack) ]] ; then
else TMP_ALL_PATH="env PATH=\"${PATH}\" LD_LIBRARY_PATH=\"${PW_LD_LIBRARY_PATH}\""
fi
export PW_PREFIX_NAME=$(basename "$1" | awk -F'.' '{print $1}')
cat << EOF > /tmp/pp_pfx_unpack.sh
cat << EOF > "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh
#!/usr/bin/env bash
${TMP_ALL_PATH} unsquashfs -f -d "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}" "$1" \
|| echo "ERROR" >/tmp/pp_pfx_unpack_error
|| echo "ERROR" > "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack_error
EOF
chmod u+x /tmp/pp_pfx_unpack.sh
${pw_runtime} ${PW_TERM} /tmp/pp_pfx_unpack.sh
if grep "ERROR" /tmp/pp_pfx_unpack_error &>/dev/null ; then
try_remove_file /tmp/pp_pfx_unpack_error
try_remove_file /tmp/pp_pfx_unpack.sh
chmod u+x "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh
${pw_runtime} ${PW_TERM} "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh
if grep "ERROR" "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack_error &>/dev/null ; then
try_remove_file "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack_error
try_remove_file "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh
yad_error "Unpack has FAILED for prefix: <b>\"${PW_PREFIX_NAME}\"</b>."
exit 1
else
try_remove_file /tmp/pp_pfx_unpack.sh
try_remove_file "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh
if [[ -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.create_shortcut" ]] ; then
orig_IFS="$IFS"
IFS=$'\n'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment