Commit 71cad8a5 authored by Mikhail Tergoev's avatar Mikhail Tergoev

fix TPM for backup

parent d4c95b2e
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
----------------------------------------- -----------------------------------------
История изменений: История изменений:
* исправлено отображение версии PROTON_LG и WINE_LG при отсутствии файла настроек (спасибо Htylol)
* добавлена возможность запуска из терминала: portproton --debug (спасибо Boria138 и Htylol)
###Scripts version 2314### Дата: 11.07.2024 / Размер скачиваемого обновления: 4 мегабайта ###Scripts version 2314### Дата: 11.07.2024 / Размер скачиваемого обновления: 4 мегабайта
* HOTFIX - создание нескольких ярлыков при распаковке резервной копии префикса * HOTFIX - создание нескольких ярлыков при распаковке резервной копии префикса
* исправлено полное отключение CAS в меню vkBasalt (0 в меню равно -1 в переменной) * исправлено полное отключение CAS в меню vkBasalt (0 в меню равно -1 в переменной)
......
...@@ -4876,15 +4876,15 @@ pw_create_prefix_backup () { ...@@ -4876,15 +4876,15 @@ pw_create_prefix_backup () {
else TMP_ALL_PATH="LD_LIBRARY_PATH=\"${PW_LD_LIBRARY_PATH}\"" else TMP_ALL_PATH="LD_LIBRARY_PATH=\"${PW_LD_LIBRARY_PATH}\""
fi fi
chmod -R u+w "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}" chmod -R u+w "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}"
cat << EOF > "${PW_TMPFS_PATH}"/pp_pfx_backup.sh cat << EOF > "${PORT_WINE_TMP_PATH}"/pp_pfx_backup.sh
#!/usr/bin/env bash #!/usr/bin/env bash
${TMP_ALL_PATH} mksquashfs "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}" \ ${TMP_ALL_PATH} mksquashfs "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}" \
"${PW_PREFIX_TO_BACKUP}/${PW_PREFIX_NAME}.ppack.part" -comp zstd \ "${PW_PREFIX_TO_BACKUP}/${PW_PREFIX_NAME}.ppack.part" -comp zstd \
|| rm -f "${PW_PREFIX_TO_BACKUP}/${PW_PREFIX_NAME}.ppack.part" || rm -f "${PW_PREFIX_TO_BACKUP}/${PW_PREFIX_NAME}.ppack.part"
EOF EOF
chmod u+x "${PW_TMPFS_PATH}"/pp_pfx_backup.sh chmod u+x "${PORT_WINE_TMP_PATH}"/pp_pfx_backup.sh
${pw_runtime} ${PW_TERM} "${PW_TMPFS_PATH}"/pp_pfx_backup.sh ${pw_runtime} ${PW_TERM} "${PORT_WINE_TMP_PATH}"/pp_pfx_backup.sh
try_remove_file "${PW_TMPFS_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 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" mv -f "${PW_PREFIX_TO_BACKUP}/${PW_PREFIX_NAME}.ppack.part" "${PW_PREFIX_TO_BACKUP}/${PW_PREFIX_NAME}.ppack"
yad_info "$(gettext "Backup has been successfully created for prefix:") $PW_PREFIX_NAME" yad_info "$(gettext "Backup has been successfully created for prefix:") $PW_PREFIX_NAME"
......
...@@ -312,20 +312,20 @@ if [[ ! -z $(basename "${portwine_exe}" | grep .ppack) ]] ; then ...@@ -312,20 +312,20 @@ if [[ ! -z $(basename "${portwine_exe}" | grep .ppack) ]] ; then
else TMP_ALL_PATH="LD_LIBRARY_PATH=\"${PW_LD_LIBRARY_PATH}\"" else TMP_ALL_PATH="LD_LIBRARY_PATH=\"${PW_LD_LIBRARY_PATH}\""
fi fi
PW_PREFIX_NAME=$(basename "$1" | awk -F'.' '{print $1}') PW_PREFIX_NAME=$(basename "$1" | awk -F'.' '{print $1}')
cat << EOF > "${PW_TMPFS_PATH}"/pp_pfx_unpack.sh cat << EOF > "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh
#!/usr/bin/env bash #!/usr/bin/env bash
${TMP_ALL_PATH} unsquashfs -f -d "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}" "$1" \ ${TMP_ALL_PATH} unsquashfs -f -d "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}" "$1" \
|| echo "ERROR" > "${PW_TMPFS_PATH}"/pp_pfx_unpack_error || echo "ERROR" > "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack_error
EOF EOF
chmod u+x "${PW_TMPFS_PATH}"/pp_pfx_unpack.sh chmod u+x "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh
${pw_runtime} ${PW_TERM} "${PW_TMPFS_PATH}"/pp_pfx_unpack.sh ${pw_runtime} ${PW_TERM} "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh
if grep "ERROR" "${PW_TMPFS_PATH}"/pp_pfx_unpack_error &>/dev/null ; then if grep "ERROR" "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack_error &>/dev/null ; then
try_remove_file "${PW_TMPFS_PATH}"/pp_pfx_unpack_error try_remove_file "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack_error
try_remove_file "${PW_TMPFS_PATH}"/pp_pfx_unpack.sh try_remove_file "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh
yad_error "$(gettext "Unpack has FAILED for prefix:") <b>\"${PW_PREFIX_NAME}\"</b>." yad_error "$(gettext "Unpack has FAILED for prefix:") <b>\"${PW_PREFIX_NAME}\"</b>."
exit 1 exit 1
else else
try_remove_file "${PW_TMPFS_PATH}"/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 if [[ -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.create_shortcut" ]] ; then
while IFS= read -r line while IFS= read -r line
do do
......
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