Commit 2bd3ad04 authored by Mikhail Tergoev's avatar Mikhail Tergoev

Merge branch 'use-tmpfs' of github.com:Htylol/PortWINE into Htylol-use-tmpfs

parents 28da36d0 c049535a
...@@ -1731,7 +1731,7 @@ start_portwine () { ...@@ -1731,7 +1731,7 @@ start_portwine () {
print_info "Used wineboot $@ for prefix: ${PW_PREFIX_NAME}" print_info "Used wineboot $@ for prefix: ${PW_PREFIX_NAME}"
${pw_runtime} GST_PLUGIN_SYSTEM_PATH_1_0="" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" \ ${pw_runtime} GST_PLUGIN_SYSTEM_PATH_1_0="" LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}:${WINE_LIBRARY_PATH}" \
WINEDEBUG="fixme-all,err+loaddll,err+dll,err+file,err+reg" \ WINEDEBUG="fixme-all,err+loaddll,err+dll,err+file,err+reg" \
"${WINELOADER}" wineboot $@ &>>"${PORT_WINE_TMP_PATH}/update_pfx_log" "${WINELOADER}" wineboot $@ &>>"${PW_TMPFS_PATH}/update_pfx_log"
wait_wineserver wait_wineserver
print_info "The prefix has been updated." print_info "The prefix has been updated."
} }
...@@ -2512,11 +2512,11 @@ start_portwine () { ...@@ -2512,11 +2512,11 @@ start_portwine () {
if [[ "${USE_WT_FROM_DB}" == "1" ]] ; then if [[ "${USE_WT_FROM_DB}" == "1" ]] ; then
pw_update_pfx_cover_gui pw_update_pfx_cover_gui
update_winetricks update_winetricks
echo "START WINETRICKS..." >> "${PORT_WINE_TMP_PATH}/update_pfx_log" echo "START WINETRICKS..." >> "${PW_TMPFS_PATH}/update_pfx_log"
echo "Try to install DLL in prefix: ${PW_DLL_NEED_INSTALL}" >> "${PORT_WINE_TMP_PATH}/update_pfx_log" echo "Try to install DLL in prefix: ${PW_DLL_NEED_INSTALL}" >> "${PW_TMPFS_PATH}/update_pfx_log"
print_info "Try to install DLL in prefix: ${PW_DLL_NEED_INSTALL}" print_info "Try to install DLL in prefix: ${PW_DLL_NEED_INSTALL}"
${pw_runtime} LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \ ${pw_runtime} LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \
"${PORT_WINE_TMP_PATH}/winetricks" -q -r -f ${PW_DLL_NEED_INSTALL} | tee -a "${PORT_WINE_TMP_PATH}/update_pfx_log" "${PORT_WINE_TMP_PATH}/winetricks" -q -r -f ${PW_DLL_NEED_INSTALL} | tee -a "${PW_TMPFS_PATH}/update_pfx_log"
wait_wineserver wait_wineserver
kill_portwine kill_portwine
fi fi
...@@ -2773,7 +2773,7 @@ pw_run () { ...@@ -2773,7 +2773,7 @@ pw_run () {
if [[ "${PW_LOG}" == 1 ]] ; then if [[ "${PW_LOG}" == 1 ]] ; then
echo "WINEDLLOVERRIDES=${WINEDLLOVERRIDES}" >> "${PW_LOG_TO_FILE}" echo "WINEDLLOVERRIDES=${WINEDLLOVERRIDES}" >> "${PW_LOG_TO_FILE}"
echo "------------------------------------" >> "${PW_LOG_TO_FILE}" echo "------------------------------------" >> "${PW_LOG_TO_FILE}"
[[ -f "${PORT_WINE_TMP_PATH}/update_pfx_log" ]] && cat "${PORT_WINE_TMP_PATH}/update_pfx_log" >> "${PW_LOG_TO_FILE}" [[ -f "${PW_TMPFS_PATH}/update_pfx_log" ]] && cat "${PW_TMPFS_PATH}/update_pfx_log" >> "${PW_LOG_TO_FILE}"
echo "-" >> "${PW_LOG_TO_FILE}" echo "-" >> "${PW_LOG_TO_FILE}"
echo "Log WINE:" >> "${PW_LOG_TO_FILE}" echo "Log WINE:" >> "${PW_LOG_TO_FILE}"
echo "" echo ""
...@@ -2808,7 +2808,7 @@ pw_run () { ...@@ -2808,7 +2808,7 @@ pw_run () {
${PW_DISPLAY} \ ${PW_DISPLAY} \
"${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[@]} &>>"${PW_LOG_TO_FILE}" "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[@]} &>>"${PW_LOG_TO_FILE}"
print_info "Update prefix log:" print_info "Update prefix log:"
[[ -f "${PORT_WINE_TMP_PATH}/update_pfx_log" ]] && cat "${PORT_WINE_TMP_PATH}/update_pfx_log" [[ -f "${PW_TMPFS_PATH}/update_pfx_log" ]] && cat "${PW_TMPFS_PATH}/update_pfx_log"
echo echo
print_info "Log from RUNTIME and WINE:" print_info "Log from RUNTIME and WINE:"
cat "${PW_LOG_TO_FILE}" cat "${PW_LOG_TO_FILE}"
...@@ -2818,7 +2818,7 @@ pw_run () { ...@@ -2818,7 +2818,7 @@ pw_run () {
if [[ "${PW_LOG}" == 1 ]] ; then if [[ "${PW_LOG}" == 1 ]] ; then
echo "WINEDLLOVERRIDES=${WINEDLLOVERRIDES}" >> "${PW_LOG_TO_FILE}" echo "WINEDLLOVERRIDES=${WINEDLLOVERRIDES}" >> "${PW_LOG_TO_FILE}"
echo "------------------------------------" >> "${PW_LOG_TO_FILE}" echo "------------------------------------" >> "${PW_LOG_TO_FILE}"
[[ -f "${PORT_WINE_TMP_PATH}/update_pfx_log" ]] && cat "${PORT_WINE_TMP_PATH}/update_pfx_log" >> "${PW_LOG_TO_FILE}" [[ -f "${PW_TMPFS_PATH}/update_pfx_log" ]] && cat "${PW_TMPFS_PATH}/update_pfx_log" >> "${PW_LOG_TO_FILE}"
echo "-" >> "${PW_LOG_TO_FILE}" echo "-" >> "${PW_LOG_TO_FILE}"
echo "Log WINE:" >> "${PW_LOG_TO_FILE}" echo "Log WINE:" >> "${PW_LOG_TO_FILE}"
echo "" echo ""
...@@ -2836,7 +2836,7 @@ pw_run () { ...@@ -2836,7 +2836,7 @@ pw_run () {
wait_wineserver wait_wineserver
else else
print_info "Update prefix log:" print_info "Update prefix log:"
[[ -f "${PORT_WINE_TMP_PATH}/update_pfx_log" ]] && cat "${PORT_WINE_TMP_PATH}/update_pfx_log" [[ -f "${PW_TMPFS_PATH}/update_pfx_log" ]] && cat "${PW_TMPFS_PATH}/update_pfx_log"
echo "" echo ""
echo "Log WINE:" > "${PW_LOG_TO_FILE}" echo "Log WINE:" > "${PW_LOG_TO_FILE}"
print_info "Log WINE:" print_info "Log WINE:"
...@@ -3038,7 +3038,7 @@ pw_update_pfx_cover_gui () { ...@@ -3038,7 +3038,7 @@ pw_update_pfx_cover_gui () {
PW_GIF_FILE="${COVERS_PATH}/update_prefix_${LANGUAGE_GIF}.gif" PW_GIF_FILE="${COVERS_PATH}/update_prefix_${LANGUAGE_GIF}.gif"
PW_GIF_SIZE_X=$(file "${PW_GIF_FILE}" | awk '{print $7 + 20}') PW_GIF_SIZE_X=$(file "${PW_GIF_FILE}" | awk '{print $7 + 20}')
PW_GIF_SIZE_Y=$(file "${PW_GIF_FILE}" | awk '{print $9 + 65}') PW_GIF_SIZE_Y=$(file "${PW_GIF_FILE}" | awk '{print $9 + 65}')
echo "UPDATE PREFIX..." > "${PORT_WINE_TMP_PATH}/update_pfx_log" echo "UPDATE PREFIX..." > "${PW_TMPFS_PATH}/update_pfx_log"
export PW_TIMER=0 export PW_TIMER=0
while read -r line || [[ ! -z $(pgrep -a yad | grep "yad_gui_pp --notebook --key=$PW_KEY_PROGRESS_BAR_UP" | awk '{print $1}') ]] ; do while read -r line || [[ ! -z $(pgrep -a yad | grep "yad_gui_pp --notebook --key=$PW_KEY_PROGRESS_BAR_UP" | awk '{print $1}') ]] ; do
sleep 0.005 sleep 0.005
...@@ -3052,7 +3052,7 @@ pw_update_pfx_cover_gui () { ...@@ -3052,7 +3052,7 @@ pw_update_pfx_cover_gui () {
sleep 3 sleep 3
PW_TIMER=1 PW_TIMER=1
fi fi
done < "${PORT_WINE_TMP_PATH}/update_pfx_log" | "${pw_yad}" --plug=$PW_KEY_PROGRESS_BAR_UP --tabnum=$TAB_N2 --text-info --tail 2>/dev/null & done < "${PW_TMPFS_PATH}/update_pfx_log" | "${pw_yad}" --plug=$PW_KEY_PROGRESS_BAR_UP --tabnum=$TAB_N2 --text-info --tail 2>/dev/null &
"${pw_yad}" --plug=$PW_KEY_PROGRESS_BAR_UP --tabnum=$TAB_N1 --picture --filename="${PW_GIF_FILE}" 2>/dev/null & "${pw_yad}" --plug=$PW_KEY_PROGRESS_BAR_UP --tabnum=$TAB_N1 --picture --filename="${PW_GIF_FILE}" 2>/dev/null &
"${pw_yad}" --notebook --key="$PW_KEY_PROGRESS_BAR_UP" $TAB_PLACE --no-buttons \ "${pw_yad}" --notebook --key="$PW_KEY_PROGRESS_BAR_UP" $TAB_PLACE --no-buttons \
...@@ -4572,61 +4572,61 @@ pw_prefix_manager () { ...@@ -4572,61 +4572,61 @@ pw_prefix_manager () {
fi fi
pw_start_progress_bar_block "$(gettext "Starting prefix manager:") $PW_PREFIX_NAME" pw_start_progress_bar_block "$(gettext "Starting prefix manager:") $PW_PREFIX_NAME"
"${PORT_WINE_TMP_PATH}/winetricks" dlls list | awk -F'(' '{print $1}' 1> "${PORT_WINE_TMP_PATH}/dll_list" "${PORT_WINE_TMP_PATH}/winetricks" dlls list | awk -F'(' '{print $1}' 1> "${PW_TMPFS_PATH}/dll_list"
"${PORT_WINE_TMP_PATH}/winetricks" fonts list | awk -F'(' '{print $1}' 1> "${PORT_WINE_TMP_PATH}/fonts_list" "${PORT_WINE_TMP_PATH}/winetricks" fonts list | awk -F'(' '{print $1}' 1> "${PW_TMPFS_PATH}/fonts_list"
"${PORT_WINE_TMP_PATH}/winetricks" settings list | awk -F'(' '{print $1}' 1> "${PORT_WINE_TMP_PATH}/settings_list" "${PORT_WINE_TMP_PATH}/winetricks" settings list | awk -F'(' '{print $1}' 1> "${PW_TMPFS_PATH}/settings_list"
gui_prefix_manager () { gui_prefix_manager () {
unset SET_FROM_PFX_MANAGER_TMP SET_FROM_PFX_MANAGER unset SET_FROM_PFX_MANAGER_TMP SET_FROM_PFX_MANAGER
old_IFS=$IFS old_IFS=$IFS
IFS=$'\n' IFS=$'\n'
try_remove_file "${PORT_WINE_TMP_PATH}/dll_list_tmp" try_remove_file "${PW_TMPFS_PATH}/dll_list_tmp"
while read PW_BOOL_IN_DLL_LIST ; do while read PW_BOOL_IN_DLL_LIST ; do
if [[ -z $(echo "${PW_BOOL_IN_DLL_LIST}" | grep -E 'd3d|directx9|dont_use|dxvk|vkd3d|galliumnine|faudio1|Foundation') ]] ; then if [[ -z $(echo "${PW_BOOL_IN_DLL_LIST}" | grep -E 'd3d|directx9|dont_use|dxvk|vkd3d|galliumnine|faudio1|Foundation') ]] ; then
if grep "^$(echo "${PW_BOOL_IN_DLL_LIST}" | awk '{print $1}')$" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/winetricks.log" ; then if grep "^$(echo "${PW_BOOL_IN_DLL_LIST}" | awk '{print $1}')$" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/winetricks.log" ; then
echo -e "true\n$(echo "${PW_BOOL_IN_DLL_LIST}" | awk '{print $1}')\n$(echo ${PW_BOOL_IN_DLL_LIST} | awk '{ $1 = ""; print substr($0, 2) }')" >> "${PORT_WINE_TMP_PATH}/dll_list_tmp" echo -e "true\n$(echo "${PW_BOOL_IN_DLL_LIST}" | awk '{print $1}')\n$(echo ${PW_BOOL_IN_DLL_LIST} | awk '{ $1 = ""; print substr($0, 2) }')" >> "${PW_TMPFS_PATH}/dll_list_tmp"
else else
echo -e "false\n$(echo "${PW_BOOL_IN_DLL_LIST}" | awk '{print $1}')\n$(echo ${PW_BOOL_IN_DLL_LIST} | awk '{ $1 = ""; print substr($0, 2) }')" >> "${PORT_WINE_TMP_PATH}/dll_list_tmp" echo -e "false\n$(echo "${PW_BOOL_IN_DLL_LIST}" | awk '{print $1}')\n$(echo ${PW_BOOL_IN_DLL_LIST} | awk '{ $1 = ""; print substr($0, 2) }')" >> "${PW_TMPFS_PATH}/dll_list_tmp"
fi fi
fi fi
done < "${PORT_WINE_TMP_PATH}/dll_list" done < "${PW_TMPFS_PATH}/dll_list"
try_remove_file "${PORT_WINE_TMP_PATH}/fonts_list_tmp" try_remove_file "${PW_TMPFS_PATH}/fonts_list_tmp"
while read PW_BOOL_IN_FONTS_LIST ; do while read PW_BOOL_IN_FONTS_LIST ; do
if [[ -z $(echo "${PW_BOOL_IN_FONTS_LIST}" | grep -E 'dont_use') ]] ; then if [[ -z $(echo "${PW_BOOL_IN_FONTS_LIST}" | grep -E 'dont_use') ]] ; then
if grep "^$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{print $1}')$" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/winetricks.log" ; then if grep "^$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{print $1}')$" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/winetricks.log" ; then
echo -e "true\n$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{print $1}')\n$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{ $1 = ""; print substr($0, 2) }')" >> "${PORT_WINE_TMP_PATH}/fonts_list_tmp" echo -e "true\n$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{print $1}')\n$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{ $1 = ""; print substr($0, 2) }')" >> "${PW_TMPFS_PATH}/fonts_list_tmp"
else else
echo -e "false\n$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{print $1}')\n$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{ $1 = ""; print substr($0, 2) }')" >> "${PORT_WINE_TMP_PATH}/fonts_list_tmp" echo -e "false\n$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{print $1}')\n$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{ $1 = ""; print substr($0, 2) }')" >> "${PW_TMPFS_PATH}/fonts_list_tmp"
fi fi
fi fi
done < "${PORT_WINE_TMP_PATH}/fonts_list" done < "${PW_TMPFS_PATH}/fonts_list"
try_remove_file "${PORT_WINE_TMP_PATH}/settings_list_tmp" try_remove_file "${PW_TMPFS_PATH}/settings_list_tmp"
while read PW_BOOL_IN_FONTS_LIST ; do while read PW_BOOL_IN_FONTS_LIST ; do
if [[ -z $(echo "${PW_BOOL_IN_FONTS_LIST}" | grep -E 'vista|alldlls|autostart_|bad|good|win|videomemory|vd=|isolate_home') ]] ; then if [[ -z $(echo "${PW_BOOL_IN_FONTS_LIST}" | grep -E 'vista|alldlls|autostart_|bad|good|win|videomemory|vd=|isolate_home') ]] ; then
if grep "^$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{print $1}')$" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/winetricks.log" ; then if grep "^$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{print $1}')$" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/winetricks.log" ; then
echo -e "true\n$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{print $1}')\n$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{ $1 = ""; print substr($0, 2) }')" >> "${PORT_WINE_TMP_PATH}/settings_list_tmp" echo -e "true\n$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{print $1}')\n$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{ $1 = ""; print substr($0, 2) }')" >> "${PW_TMPFS_PATH}/settings_list_tmp"
else else
echo -e "false\n$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{print $1}')\n$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{ $1 = ""; print substr($0, 2) }')" >> "${PORT_WINE_TMP_PATH}/settings_list_tmp" echo -e "false\n$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{print $1}')\n$(echo "${PW_BOOL_IN_FONTS_LIST}" | awk '{ $1 = ""; print substr($0, 2) }')" >> "${PW_TMPFS_PATH}/settings_list_tmp"
fi fi
fi fi
done < "${PORT_WINE_TMP_PATH}/settings_list" done < "${PW_TMPFS_PATH}/settings_list"
pw_stop_progress_bar pw_stop_progress_bar
KEY_EDIT_MANAGER_GUI=$RANDOM KEY_EDIT_MANAGER_GUI=$RANDOM
"${pw_yad}" --plug=$KEY_EDIT_MANAGER_GUI --tabnum=1 --list --checklist \ "${pw_yad}" --plug=$KEY_EDIT_MANAGER_GUI --tabnum=1 --list --checklist \
--gui-type-layout=${WINETRICKS_GUI_TYPE_LAYOUT} --gui-type-text=${WINETRICKS_GUI_TYPE_TEXT} \ --gui-type-layout=${WINETRICKS_GUI_TYPE_LAYOUT} --gui-type-text=${WINETRICKS_GUI_TYPE_TEXT} \
--text="$(gettext 'Select components to install in prefix:') <b>\"${PW_PREFIX_NAME}\"</b>, $(gettext 'using wine:') <b>\"${PW_WINE_USE}\"</b>" \ --text="$(gettext 'Select components to install in prefix:') <b>\"${PW_PREFIX_NAME}\"</b>, $(gettext 'using wine:') <b>\"${PW_WINE_USE}\"</b>" \
--column=set --column=dll --column=info < "${PORT_WINE_TMP_PATH}/dll_list_tmp" 1>> "${PORT_WINE_TMP_PATH}/to_winetricks" 2>/dev/null & --column=set --column=dll --column=info < "${PW_TMPFS_PATH}/dll_list_tmp" 1>> "${PW_TMPFS_PATH}/to_winetricks" 2>/dev/null &
"${pw_yad}" --plug=$KEY_EDIT_MANAGER_GUI --tabnum=2 --list --checklist \ "${pw_yad}" --plug=$KEY_EDIT_MANAGER_GUI --tabnum=2 --list --checklist \
--gui-type-layout=${WINETRICKS_GUI_TYPE_LAYOUT} --gui-type-text=${WINETRICKS_GUI_TYPE_TEXT} \ --gui-type-layout=${WINETRICKS_GUI_TYPE_LAYOUT} --gui-type-text=${WINETRICKS_GUI_TYPE_TEXT} \
--text="$(gettext 'Select fonts to install in prefix:') <b>\"${PW_PREFIX_NAME}\"</b>, $(gettext 'using wine:') <b>\"${PW_WINE_USE}\"</b>" \ --text="$(gettext 'Select fonts to install in prefix:') <b>\"${PW_PREFIX_NAME}\"</b>, $(gettext 'using wine:') <b>\"${PW_WINE_USE}\"</b>" \
--column=set --column=dll --column=info < "${PORT_WINE_TMP_PATH}/fonts_list_tmp" 1>> "${PORT_WINE_TMP_PATH}/to_winetricks" 2>/dev/null & --column=set --column=dll --column=info < "${PW_TMPFS_PATH}/fonts_list_tmp" 1>> "${PW_TMPFS_PATH}/to_winetricks" 2>/dev/null &
"${pw_yad}" --plug=$KEY_EDIT_MANAGER_GUI --tabnum=3 --list --checklist \ "${pw_yad}" --plug=$KEY_EDIT_MANAGER_GUI --tabnum=3 --list --checklist \
--gui-type-layout=${WINETRICKS_GUI_TYPE_LAYOUT} --gui-type-text=${WINETRICKS_GUI_TYPE_TEXT} \ --gui-type-layout=${WINETRICKS_GUI_TYPE_LAYOUT} --gui-type-text=${WINETRICKS_GUI_TYPE_TEXT} \
--text="$(gettext 'Change config for prefix:') <b>\"${PW_PREFIX_NAME}\"</b>" \ --text="$(gettext 'Change config for prefix:') <b>\"${PW_PREFIX_NAME}\"</b>" \
--column=set --column=dll --column=info < "${PORT_WINE_TMP_PATH}/settings_list_tmp" 1>> "${PORT_WINE_TMP_PATH}/to_winetricks" 2>/dev/null & --column=set --column=dll --column=info < "${PW_TMPFS_PATH}/settings_list_tmp" 1>> "${PW_TMPFS_PATH}/to_winetricks" 2>/dev/null &
"${pw_yad}" --key=$KEY_EDIT_MANAGER_GUI --notebook \ "${pw_yad}" --key=$KEY_EDIT_MANAGER_GUI --notebook \
--width=700 --height=700 --expand \ --width=700 --height=700 --expand \
...@@ -4645,26 +4645,26 @@ pw_prefix_manager () { ...@@ -4645,26 +4645,26 @@ pw_prefix_manager () {
/usr/bin/env bash -c ${pw_full_command_line[*]} & /usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0 exit 0
fi fi
try_remove_file "${PORT_WINE_TMP_PATH}/dll_list_tmp" try_remove_file "${PW_TMPFS_PATH}/dll_list_tmp"
try_remove_file "${PORT_WINE_TMP_PATH}/fonts_list_tmp" try_remove_file "${PW_TMPFS_PATH}/fonts_list_tmp"
try_remove_file "${PORT_WINE_TMP_PATH}/settings_list_tmp" try_remove_file "${PW_TMPFS_PATH}/settings_list_tmp"
for STPFXMNG in $(<"${PORT_WINE_TMP_PATH}/to_winetricks") ; do for STPFXMNG in $(<"${PW_TMPFS_PATH}/to_winetricks") ; do
grep $(echo ${STPFXMNG} | awk -F'|' '{print $2}') "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/winetricks.log" &>/dev/null grep $(echo ${STPFXMNG} | awk -F'|' '{print $2}') "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/winetricks.log" &>/dev/null
if [ "$?" == "1" ] ; then if [ "$?" == "1" ] ; then
[[ ! -z "${STPFXMNG}" ]] && SET_FROM_PFX_MANAGER+="$(echo "${STPFXMNG}" | awk -F'|' '{print $2}') " [[ ! -z "${STPFXMNG}" ]] && SET_FROM_PFX_MANAGER+="$(echo "${STPFXMNG}" | awk -F'|' '{print $2}') "
fi fi
done done
IFS=${old_IFS} IFS=${old_IFS}
try_remove_file "${PORT_WINE_TMP_PATH}/to_winetricks" try_remove_file "${PW_TMPFS_PATH}/to_winetricks"
if [[ ! -z ${SET_FROM_PFX_MANAGER} ]] ; then if [[ ! -z ${SET_FROM_PFX_MANAGER} ]] ; then
pw_update_pfx_cover_gui "winetricks" pw_update_pfx_cover_gui "winetricks"
echo "START WINETRICKS..." >> "${PORT_WINE_TMP_PATH}/update_pfx_log" echo "START WINETRICKS..." >> "${PW_TMPFS_PATH}/update_pfx_log"
echo "Try to install DLL in prefix: ${SET_FROM_PFX_MANAGER}" >> "${PORT_WINE_TMP_PATH}/update_pfx_log" echo "Try to install DLL in prefix: ${SET_FROM_PFX_MANAGER}" >> "${PW_TMPFS_PATH}/update_pfx_log"
print_info "Try to install DLL in prefix: ${SET_FROM_PFX_MANAGER}" print_info "Try to install DLL in prefix: ${SET_FROM_PFX_MANAGER}"
${pw_runtime} LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \ ${pw_runtime} LD_LIBRARY_PATH="${PW_LD_LIBRARY_PATH}" GST_PLUGIN_SYSTEM_PATH_1_0="" \
"${PORT_WINE_TMP_PATH}/winetricks" -q -r -f ${SET_FROM_PFX_MANAGER} | tee -a "${PORT_WINE_TMP_PATH}/update_pfx_log" "${PORT_WINE_TMP_PATH}/winetricks" -q -r -f ${SET_FROM_PFX_MANAGER} | tee -a "${PW_TMPFS_PATH}/update_pfx_log"
wait_wineserver wait_wineserver
kill_portwine kill_portwine
pw_stop_progress_bar pw_stop_progress_bar
...@@ -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 > "${PORT_WINE_TMP_PATH}"/pp_pfx_backup.sh cat << EOF > "${PW_TMPFS_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 "${PORT_WINE_TMP_PATH}"/pp_pfx_backup.sh chmod u+x "${PW_TMPFS_PATH}"/pp_pfx_backup.sh
${pw_runtime} ${PW_TERM} "${PORT_WINE_TMP_PATH}"/pp_pfx_backup.sh ${pw_runtime} ${PW_TERM} "${PW_TMPFS_PATH}"/pp_pfx_backup.sh
try_remove_file "${PORT_WINE_TMP_PATH}"/pp_pfx_backup.sh try_remove_file "${PW_TMPFS_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"
......
...@@ -153,7 +153,7 @@ export USER_CONF="${PORT_WINE_PATH}/data/user.conf" ...@@ -153,7 +153,7 @@ export USER_CONF="${PORT_WINE_PATH}/data/user.conf"
check_user_conf check_user_conf
check_variables PW_LOG "0" check_variables PW_LOG "0"
try_remove_file "${PORT_WINE_TMP_PATH}/update_pfx_log" try_remove_file "${PW_TMPFS_PATH}/update_pfx_log"
# shellcheck source=/dev/null # shellcheck source=/dev/null
source "${USER_CONF}" source "${USER_CONF}"
...@@ -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 > "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh cat << EOF > "${PW_TMPFS_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" > "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack_error || echo "ERROR" > "${PW_TMPFS_PATH}"/pp_pfx_unpack_error
EOF EOF
chmod u+x "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh chmod u+x "${PW_TMPFS_PATH}"/pp_pfx_unpack.sh
${pw_runtime} ${PW_TERM} "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh ${pw_runtime} ${PW_TERM} "${PW_TMPFS_PATH}"/pp_pfx_unpack.sh
if grep "ERROR" "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack_error &>/dev/null ; then if grep "ERROR" "${PW_TMPFS_PATH}"/pp_pfx_unpack_error &>/dev/null ; then
try_remove_file "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack_error try_remove_file "${PW_TMPFS_PATH}"/pp_pfx_unpack_error
try_remove_file "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh try_remove_file "${PW_TMPFS_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 "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh try_remove_file "${PW_TMPFS_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