forked from CastroFidel/PortWINE
###Scripts version 2065###
This commit is contained in:
parent
9be06fb174
commit
96b5d84e86
@ -2,6 +2,9 @@ You can help us in the development of the project on the website: https://boosty
|
|||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
Changelog:
|
Changelog:
|
||||||
|
|
||||||
|
###Scripts version 2065###
|
||||||
|
* HOTFIX - correcting the termination of the yad and yad_new processes
|
||||||
|
|
||||||
###Scripts version 2064###
|
###Scripts version 2064###
|
||||||
* added notification to the user about possible problems when starting in a Wayland session (once and only under Wayland)
|
* added notification to the user about possible problems when starting in a Wayland session (once and only under Wayland)
|
||||||
* added display of the current session type in debug
|
* added display of the current session type in debug
|
||||||
|
@ -10,6 +10,9 @@
|
|||||||
* добавить выбор языка в PortProton и about us
|
* добавить выбор языка в PortProton и about us
|
||||||
* заниматься только развитием проекта за счет вашей подписки на https://boosty.to/portwine-linux.ru
|
* заниматься только развитием проекта за счет вашей подписки на https://boosty.to/portwine-linux.ru
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
###Scripts version 2065###
|
||||||
|
* HOTFIX - корректировка завершения процессов yad и yad_new
|
||||||
|
|
||||||
###Scripts version 2064###
|
###Scripts version 2064###
|
||||||
* добавлено уведомление пользователю о возможных проблемах при запуске в Wayland сессии (один раз и только под Wayland)
|
* добавлено уведомление пользователю о возможных проблемах при запуске в Wayland сессии (один раз и только под Wayland)
|
||||||
* в debug добавлено отображение текущего типа сессии
|
* в debug добавлено отображение текущего типа сессии
|
||||||
|
@ -9,20 +9,24 @@ pw_ping_test () {
|
|||||||
print_error () {
|
print_error () {
|
||||||
echo "ERROR: $@"
|
echo "ERROR: $@"
|
||||||
}
|
}
|
||||||
|
export -f print_error
|
||||||
|
|
||||||
zenity_error () {
|
zenity_error () {
|
||||||
echo "ERROR: $@"
|
echo "ERROR: $@"
|
||||||
zenity --error --no-wrap --text "$@" 2> /dev/null
|
zenity --error --no-wrap --text "$@" 2> /dev/null
|
||||||
}
|
}
|
||||||
|
export -f zenity_error
|
||||||
|
|
||||||
print_info () {
|
print_info () {
|
||||||
echo "INFO: $@"
|
echo "INFO: $@"
|
||||||
}
|
}
|
||||||
|
export -f print_info
|
||||||
|
|
||||||
zenity_info () {
|
zenity_info () {
|
||||||
echo "INFO: $@"
|
echo "INFO: $@"
|
||||||
zenity --info --no-wrap --text "$@" 2> /dev/null
|
zenity --info --no-wrap --text "$@" 2> /dev/null
|
||||||
}
|
}
|
||||||
|
export -f zenity_info
|
||||||
|
|
||||||
print_var () {
|
print_var () {
|
||||||
for vp in $@ ; do echo "${vp}=${!vp}" ; done
|
for vp in $@ ; do echo "${vp}=${!vp}" ; done
|
||||||
@ -40,6 +44,7 @@ try_copy_file () {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
export -f try_copy_file
|
||||||
|
|
||||||
try_copy_dir () {
|
try_copy_dir () {
|
||||||
if [ ! -d "$1" ] ; then print_info "directory $1 not found for copy"
|
if [ ! -d "$1" ] ; then print_info "directory $1 not found for copy"
|
||||||
@ -50,6 +55,7 @@ try_copy_dir () {
|
|||||||
fi
|
fi
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
export -f try_copy_dir
|
||||||
|
|
||||||
try_remove_file () {
|
try_remove_file () {
|
||||||
if [ -f "$1" ] ; then
|
if [ -f "$1" ] ; then
|
||||||
@ -58,6 +64,7 @@ try_remove_file () {
|
|||||||
fi
|
fi
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
export -f try_remove_file
|
||||||
|
|
||||||
try_remove_dir () {
|
try_remove_dir () {
|
||||||
if [ -d "$1" ] ; then
|
if [ -d "$1" ] ; then
|
||||||
@ -66,6 +73,7 @@ try_remove_dir () {
|
|||||||
fi
|
fi
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
export -f try_remove_dir
|
||||||
|
|
||||||
try_force_link_file () {
|
try_force_link_file () {
|
||||||
if [ ! -f "$1" ] ; then print_info "file $1 not found for link"
|
if [ ! -f "$1" ] ; then print_info "file $1 not found for link"
|
||||||
@ -76,6 +84,7 @@ try_force_link_file () {
|
|||||||
fi
|
fi
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
export -f try_force_link_file
|
||||||
|
|
||||||
check_symlink () {
|
check_symlink () {
|
||||||
CHK_SYMLINK_FILE=`file "$1"`
|
CHK_SYMLINK_FILE=`file "$1"`
|
||||||
@ -89,6 +98,7 @@ check_symlink () {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
export -f check_symlink
|
||||||
|
|
||||||
try_force_link_dir () {
|
try_force_link_dir () {
|
||||||
if [ ! -d "$1" ] ; then print_info "directory $1 not found for link"
|
if [ ! -d "$1" ] ; then print_info "directory $1 not found for link"
|
||||||
@ -99,10 +109,12 @@ try_force_link_dir () {
|
|||||||
fi
|
fi
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
export -f try_force_link_dir
|
||||||
|
|
||||||
check_process () {
|
check_process () {
|
||||||
[ ! -n "`ps cax | grep "$1" | awk '{print $1}'`" ] && return 0 || return 1
|
[ ! -n "`ps cax | grep "$1" | awk '{print $1}'`" ] && return 0 || return 1
|
||||||
}
|
}
|
||||||
|
export -f check_process
|
||||||
|
|
||||||
try_download () {
|
try_download () {
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
@ -350,6 +362,7 @@ pw_start_progress_bar_cover () {
|
|||||||
PW_GIF_SIZE_Y=`file "${PW_GIF_FILE}" | awk '{print $9 + 20}'`
|
PW_GIF_SIZE_Y=`file "${PW_GIF_FILE}" | awk '{print $9 + 20}'`
|
||||||
"${pw_yad}" --picture --filename="${PW_GIF_FILE}" --close-on-unfocus --no-buttons --undecorated --center \
|
"${pw_yad}" --picture --filename="${PW_GIF_FILE}" --close-on-unfocus --no-buttons --undecorated --center \
|
||||||
--skip-taskbar --width=$PW_GIF_SIZE_X --height=$PW_GIF_SIZE_Y > /dev/null 2>&1 &
|
--skip-taskbar --width=$PW_GIF_SIZE_X --height=$PW_GIF_SIZE_Y > /dev/null 2>&1 &
|
||||||
|
export PW_YAD_PID_PROGRESS_BAR_COVER="$!"
|
||||||
}
|
}
|
||||||
|
|
||||||
pw_update_pfx_cover_gui () {
|
pw_update_pfx_cover_gui () {
|
||||||
@ -368,28 +381,24 @@ pw_update_pfx_cover_gui () {
|
|||||||
|
|
||||||
"${pw_yad_new}" --notebook --key="$PW_KEY_PROGRESS_BAR" --tab=LOGO --tab=TERMINAL --no-buttons --undecorated \
|
"${pw_yad_new}" --notebook --key="$PW_KEY_PROGRESS_BAR" --tab=LOGO --tab=TERMINAL --no-buttons --undecorated \
|
||||||
--center --auto-close --skip-taskbar --width=$PW_GIF_SIZE_X --height=$PW_GIF_SIZE_Y --tab-pos=bottom &
|
--center --auto-close --skip-taskbar --width=$PW_GIF_SIZE_X --height=$PW_GIF_SIZE_Y --tab-pos=bottom &
|
||||||
echo ""
|
export PW_YAD_PID_PFX_COVER_UI="$!"
|
||||||
}
|
}
|
||||||
|
|
||||||
pw_start_progress_bar_cs () {
|
pw_start_progress_bar_cs () {
|
||||||
"${pw_yad}" --progress --progress-text="$@" --pulsate --close-on-unfocus \
|
"${pw_yad}" --progress --progress-text="$@" --pulsate --close-on-unfocus \
|
||||||
--no-buttons --undecorated --center --skip-taskbar --width=500 --wrap-width=500 > /dev/null 2>&1 &
|
--no-buttons --undecorated --center --skip-taskbar --width=500 --wrap-width=500 > /dev/null 2>&1 &
|
||||||
echo ""
|
export PW_YAD_PID_PROGRESS_BAR_CS="$!"
|
||||||
}
|
}
|
||||||
|
|
||||||
pw_start_progress_bar_block () {
|
pw_start_progress_bar_block () {
|
||||||
"${pw_yad}" --progress --progress-text="$@" --pulsate \
|
"${pw_yad}" --progress --progress-text="$@" --pulsate \
|
||||||
--no-buttons --undecorated --center --skip-taskbar --width=500 --wrap-width=500 > /dev/null 2>&1 &
|
--no-buttons --undecorated --center --skip-taskbar --width=500 --wrap-width=500 > /dev/null 2>&1 &
|
||||||
echo ""
|
export PW_YAD_PID_PROGRESS_BAR_BLOCK="$!"
|
||||||
}
|
}
|
||||||
|
|
||||||
pw_stop_progress_bar () {
|
pw_stop_progress_bar () {
|
||||||
if [[ ! -z "`pgrep -a yad | grep "progress" | awk '{print $1}' `" ]] ; then
|
kill -s SIGUSR1 "$PW_YAD_PID_PROGRESS_BAR_BLOCK" "$PW_YAD_PID_PROGRESS_BAR_CS" \
|
||||||
kill -s SIGTERM `pgrep -a yad | grep "progress" | awk '{print $1}'` > /dev/null 2>&1
|
"$PW_YAD_PID_PFX_COVER_UI""$PW_YAD_PID_PROGRESS_BAR_COVER""$PW_YAD_PID_TRAY" > /dev/null 2>&1
|
||||||
fi
|
|
||||||
if [[ ! -z "`pgrep -a yad | grep key=$PW_KEY_PROGRESS_BAR | awk '{print $1}' `" ]] ; then
|
|
||||||
kill -s SIGTERM "`pgrep -a yad | grep key=$PW_KEY_PROGRESS_BAR | awk '{print $1}' `" > /dev/null 2>&1
|
|
||||||
fi
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
export -f pw_stop_progress_bar
|
export -f pw_stop_progress_bar
|
||||||
@ -399,6 +408,7 @@ wait_wineserver () {
|
|||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
export -f wait_wineserver
|
||||||
|
|
||||||
kill_portwine () {
|
kill_portwine () {
|
||||||
wine_pids="`ls -l /proc/*/exe 2>/dev/null | grep -ie ${portname} | grep -E 'wine(64)?-preloader|wineserver' | awk -F/ '{print $3}'`"
|
wine_pids="`ls -l /proc/*/exe 2>/dev/null | grep -ie ${portname} | grep -E 'wine(64)?-preloader|wineserver' | awk -F/ '{print $3}'`"
|
||||||
@ -439,9 +449,9 @@ pw_kill_autostart () {
|
|||||||
rm -f "${WINEPREFIX}"/drive_c/*.tmp
|
rm -f "${WINEPREFIX}"/drive_c/*.tmp
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
export -f pw_kill_autostart
|
||||||
|
|
||||||
stop_portwine () {
|
stop_portwine () {
|
||||||
wait_wineserver &&
|
|
||||||
add_in_stop_portwine
|
add_in_stop_portwine
|
||||||
if [ "$int_xneur" = "1" ]; then
|
if [ "$int_xneur" = "1" ]; then
|
||||||
xneur &
|
xneur &
|
||||||
@ -453,19 +463,17 @@ stop_portwine () {
|
|||||||
try_remove_file "${PORT_SCRIPTS_PATH}/0"
|
try_remove_file "${PORT_SCRIPTS_PATH}/0"
|
||||||
try_remove_file "${PORT_SCRIPTS_PATH}/1"
|
try_remove_file "${PORT_SCRIPTS_PATH}/1"
|
||||||
kill_portwine &&
|
kill_portwine &&
|
||||||
if [ ! -z "`pgrep -a yad_new | grep "\-\-notification" | awk '{print $1}'`" ]
|
kill -s SIGUSR1 "$PW_YAD_PID_TRAY" > /dev/null 2>&1
|
||||||
then kill -s SIGUSR1 "`pgrep -a yad_new | grep "\-\-notification" | awk '{print $1}'`" > /dev/null 2>&1
|
|
||||||
fi
|
|
||||||
if [ ! -z "`ls "${WINEPREFIX}"/drive_c/users/steamuser/Temp/ | head -n 1`" ] ; then
|
if [ ! -z "`ls "${WINEPREFIX}"/drive_c/users/steamuser/Temp/ | head -n 1`" ] ; then
|
||||||
chmod -R 755 "${WINEPREFIX}"/drive_c/users/steamuser/Temp/
|
chmod -R 755 "${WINEPREFIX}"/drive_c/users/steamuser/Temp/
|
||||||
rm -fr "${WINEPREFIX}"/drive_c/users/steamuser/Temp/*
|
rm -fr "${WINEPREFIX}"/drive_c/users/steamuser/Temp/*
|
||||||
fi
|
fi
|
||||||
try_remove_dir "${PW_WINELIB}/var"
|
try_remove_dir "${PW_WINELIB}/var"
|
||||||
find "${WINEPREFIX}/drive_c/" -maxdepth 1 -type f -name "*.tmp" -delete
|
find "${WINEPREFIX}/drive_c/" -maxdepth 1 -type f -name "*.tmp" -delete
|
||||||
if [[ ! -z "`pgrep -a start.sh | grep -i portproton | awk '{print $1}'`" ]]
|
kill -n 9 `pgrep -a start.sh | grep '/PortProton/' | awk '{print $1}'` > /dev/null 2>&1
|
||||||
then kill -s KILL `pgrep -a start.sh | grep -i portproton | awk '{print $1}'` > /dev/null 2>&1
|
exit 0
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
export -f stop_portwine
|
||||||
|
|
||||||
pw_download_libs () {
|
pw_download_libs () {
|
||||||
if [ ! -z "`ls ${PORT_WINE_TMP_PATH} | grep libs_v | grep -v libs${PW_LIBS_VER}`" ] ; then
|
if [ ! -z "`ls ${PORT_WINE_TMP_PATH} | grep libs_v | grep -v libs${PW_LIBS_VER}`" ] ; then
|
||||||
@ -585,10 +593,8 @@ pw_tray_icon () {
|
|||||||
tray_icon_click_exit() {
|
tray_icon_click_exit() {
|
||||||
pw_stop_progress_bar
|
pw_stop_progress_bar
|
||||||
kill_portwine
|
kill_portwine
|
||||||
if [ ! -z "`pgrep -a yad_new | grep "\-\-notification" | awk '{print $1}'`" ]
|
kill -s SIGUSR1 "$PW_YAD_PID_TRAY" > /dev/null 2>&1
|
||||||
then kill -s SIGUSR1 "`pgrep -a yad_new | grep "\-\-notification" | awk '{print $1}'`" > /dev/null 2>&1
|
stop_portwine
|
||||||
fi
|
|
||||||
kill -n 9 `pgrep -a start.sh | awk '/PortWINE/ && /PortProton/' | awk '{print $1}'` > /dev/null 2>&1
|
|
||||||
}
|
}
|
||||||
export -f tray_icon_click_exit
|
export -f tray_icon_click_exit
|
||||||
|
|
||||||
@ -601,6 +607,7 @@ pw_tray_icon () {
|
|||||||
<<< WINEFILE >>>!bash -c pw_tray_winefile!"$PW_GUI_ICON_PATH/port_winefile.png"| \
|
<<< WINEFILE >>>!bash -c pw_tray_winefile!"$PW_GUI_ICON_PATH/port_winefile.png"| \
|
||||||
<<< CHANGE LOG >>>!bash -c open_changelog!"$PW_GUI_ICON_PATH/port_changelog.png"| \
|
<<< CHANGE LOG >>>!bash -c open_changelog!"$PW_GUI_ICON_PATH/port_changelog.png"| \
|
||||||
<<< FORCE EXIT >>>!bash -c tray_icon_click_exit!"$PW_GUI_ICON_PATH/port_exit.png"|" &
|
<<< FORCE EXIT >>>!bash -c tray_icon_click_exit!"$PW_GUI_ICON_PATH/port_exit.png"|" &
|
||||||
|
export PW_YAD_PID_TRAY="$!"
|
||||||
}
|
}
|
||||||
|
|
||||||
pw_init_db () {
|
pw_init_db () {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#Author: Castro-Fidel (PortWINE-Linux.ru)
|
#Author: Castro-Fidel (PortWINE-Linux.ru)
|
||||||
#SCRIPTS_NEXT_VERSION=2064
|
#SCRIPTS_NEXT_VERSION=2065
|
||||||
#PORT_NEXT_VERSION=97
|
#PORT_NEXT_VERSION=97
|
||||||
########################################################################
|
########################################################################
|
||||||
export PW_MANGOHUD=1
|
export PW_MANGOHUD=1
|
||||||
|
Loading…
Reference in New Issue
Block a user