From cb69e50c20821d78a3802cc9722a882135379e77 Mon Sep 17 00:00:00 2001 From: VHSgunzo Date: Mon, 20 Feb 2023 21:20:32 +0300 Subject: [PATCH] v0.75.8 --- PKGBUILD | 2 +- db/#LeagueClient.lwdb | 2 +- db/GenshinImpact.lwdb | 2 +- lutris-wine | 42 +++++++++++++++++++++++++----------------- 4 files changed, 28 insertions(+), 20 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 4bf5874..ff681d9 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: VHSgunzo pkgname='lutris-wine-git' -pkgver='0.75.7' +pkgver='0.75.8' pkgrel='1' pkgdesc='Easy launch of your Windows applications and games with Wine/Proton' arch=('x86_64') diff --git a/db/#LeagueClient.lwdb b/db/#LeagueClient.lwdb index 9553b94..8762fbc 100644 --- a/db/#LeagueClient.lwdb +++ b/db/#LeagueClient.lwdb @@ -25,7 +25,7 @@ final_check() { helper_pkexec() { if [ "$ENABLE_HOSTEXEC" == 1 ] then - hostexec pkexec sh -c "$1"||return 1 + hostexec -su sh -c "$1"||return 1 else pkexec sh -c "$1"||return 1 fi diff --git a/db/GenshinImpact.lwdb b/db/GenshinImpact.lwdb index 1ff9cfc..c799dcb 100644 --- a/db/GenshinImpact.lwdb +++ b/db/GenshinImpact.lwdb @@ -32,7 +32,7 @@ check_gi_patch() { helper_pkexec() { if [ "$ENABLE_HOSTEXEC" == 1 ] then - hostexec pkexec sh -c "$1"||return 1 + hostexec -su sh -c "$1"||return 1 else pkexec sh -c "$1"||return 1 fi diff --git a/lutris-wine b/lutris-wine index e149e4a..cc24765 100755 --- a/lutris-wine +++ b/lutris-wine @@ -1,6 +1,6 @@ #!/usr/bin/env bash -export LW_VERSION="0.75.7" +export LW_VERSION="0.75.8" export LW_DEVELOPERS="VHSgunzo" export RED='\033[1;91m' @@ -150,10 +150,10 @@ print_error() { --text="$2" --center --on-top --fixed --timeout="30" --timeout-indicator="top" --selectable-labels Lutris Wine elif [[ "$1" == "notify" && -n "$2" && -n "$3" && "$NO_NOTIFY" != 1 && "$NOT_TERM" == 1 ]] then - notify-send -i "$LW_DEF_ICO" -a 'Lutris Wine' "$2" "$3" + notify-send -i "$LW_DEF_ICO" -a 'Lutris Wine' "$2" "$3" & elif [[ "$1" == "notify" && -n "$2" && ! -n "$3" && "$NO_NOTIFY" != 1 && "$NOT_TERM" == 1 ]] then - notify-send -i "$LW_DEF_ICO" -a 'Lutris Wine' "$2" + notify-send -i "$LW_DEF_ICO" -a 'Lutris Wine' "$2" & fi } @@ -177,10 +177,10 @@ print_info() { --text="$2" --center --on-top --fixed --timeout="30" --timeout-indicator="top" --selectable-labels Lutris Wine elif [[ "$1" == "notify" && -n "$2" && -n "$3" && "$NO_NOTIFY" != 1 && "$NOT_TERM" == 1 ]] then - notify-send -i "$LW_DEF_ICO" -a 'Lutris Wine' "$2" "$3" + notify-send -i "$LW_DEF_ICO" -a 'Lutris Wine' "$2" "$3" & elif [[ "$1" == "notify" && -n "$2" && ! -n "$3" && "$NO_NOTIFY" != 1 && "$NOT_TERM" == 1 ]] then - notify-send -i "$LW_DEF_ICO" -a 'Lutris Wine' "$2" + notify-send -i "$LW_DEF_ICO" -a 'Lutris Wine' "$2" & fi } @@ -214,21 +214,25 @@ check_lupid() { } check_wine_pids() { - unset WINE_PIDS CHK_WINE_PIDS + unset WINE_PIDS CHK_WINE_PIDS PROC_EXES + if [ "$ENABLE_HOSTEXEC" == 1 ] + then PROC_EXES="$(echo 'ls -l /proc/*/exe 2>/dev/null'|hostexec)" + else PROC_EXES="$(ls -l /proc/*/exe 2>/dev/null)" + fi if [[ "$WINE_VERSION" == "System" && "$NEW_WINE_VERSION" != "System" ]] \ || [[ "$OLD_WINE_VERSION" == "System" && "$NEW_WINE_VERSION" != "System" ]] then - export CHK_WINE_PIDS="$(ls -l /proc/*/exe 2>/dev/null|\ + export CHK_WINE_PIDS="$(echo "$PROC_EXES"|\ grep -ie "$(dirname "$SYS_WINE")"|\ grep -E 'wine(64)?-preloader|wineserver'|\ awk -F/ '{print $3}')" elif [[ -n "$OLD_WINE_VERSION" && "$OLD_WINE_VERSION" != "System" ]] then - export CHK_WINE_PIDS="$(ls -l /proc/*/exe 2>/dev/null|\ + export CHK_WINE_PIDS="$(echo "$PROC_EXES"|\ grep -ie "$(readlink -f "$LW_WINE_DIR/$OLD_WINE_VERSION")"|\ grep -E 'wine(64)?-preloader|wineserver'|awk -F/ '{print $3}')" else - export CHK_WINE_PIDS="$(ls -l /proc/*/exe 2>/dev/null|\ + export CHK_WINE_PIDS="$(echo "$PROC_EXES"|\ grep -ie "$(readlink -f "$LW_WINE_DIR/$WINE_VERSION")"|\ grep -E 'wine(64)?-preloader|wineserver'|awk -F/ '{print $3}')" fi @@ -257,8 +261,12 @@ check_luwine_sh_pid() { } check_exes() { - unset EXE_PIDS CHK_EXES RUN_EXES RUN_EXE - RUN_EXES="$(ps -o pid=,cmd= -p $(ls -l /proc/*/exe 2>/dev/null|\ + unset EXE_PIDS CHK_EXES RUN_EXES RUN_EXE PROC_EXES + if [ "$ENABLE_HOSTEXEC" == 1 ] + then PROC_EXES="$(echo 'ls -l /proc/*/exe 2>/dev/null'|hostexec)" + else PROC_EXES="$(ls -l /proc/*/exe 2>/dev/null)" + fi + RUN_EXES="$(ps -o pid=,cmd= -p $(echo "$PROC_EXES"|\ grep -E 'wine(64)?-preloader|wineserver'|awk -F/ '{print $3}') \ 2>/dev/null|grep -v 'winedevice'|grep -v 'windows.sys.*'|\ grep -v 'wineserver'|grep -Pv '\d+ start.exe /exec')" @@ -459,7 +467,7 @@ download_dll_release() { then if [[ -n "$LATESTVERS" && -d "$LW_RUNTIME_DIR/$1/v$dll_version" ]] then - print_info notify "Latest $1 v$dll_version dlls already installed!" & + print_info notify "Latest $1 v$dll_version dlls already installed!" touch "$(find "$LW_RUNTIME_DIR/$1" -type d -name "v$dll_version" -print 2>/dev/null)" unset LATESTVERS FORCE_DLL_UPDATE dll_manager "$1" "v$dll_version" @@ -497,7 +505,7 @@ download_dll_release() { fi elif [ -d "$LW_RUNTIME_DIR/$1/v$dll_version" ] then - print_info notify "$1 v$dll_version dlls already installed!" & + print_info notify "$1 v$dll_version dlls already installed!" touch "$(find "$LW_RUNTIME_DIR/$1" -type d -name "v$dll_version" -print 2>/dev/null)" unset LATESTVERS FORCE_DLL_UPDATE dll_manager "$1" "v$dll_version" @@ -3111,7 +3119,7 @@ lu_exit() { kill $(pgrep -fa 'Winetricks'|awk '{print$1}') 2>/dev/null pkill winetricks 2>/dev/null kill $(pgrep -fa 'aria2c'|grep 'LutrisWine'|awk '{print$1}') 2>/dev/null - print_info notify "Lutris Wine successfully killed!" & + print_info notify "Lutris Wine successfully killed!" sleep 2 try_rm /tmp/FORCE_EXIT /tmp/envbackup* /tmp/syssett* /tmp/winesett* /tmp/ressett* /tmp/settbtn* &>/dev/null kill $(pgrep -fa "$LW_NAME"|awk '{print$1}') @@ -3150,7 +3158,7 @@ lu_killshell() { break fi done - print_info notify "Lutris Wine SHELL processes successfully killed!" & + print_info notify "Lutris Wine SHELL processes successfully killed!" else print_error yad "SHELL Killer" "Lutris Wine SHELL processes not found!" & fi @@ -3183,7 +3191,7 @@ lu_killwine() { then echo 1 > /tmp/FORCE_EXIT kill -9 $WINE_PIDS 2>/dev/null - print_info notify "Wine processes successfully killed!" & + print_info notify "Wine processes successfully killed!" try_rm /tmp/FORCE_EXIT else print_error yad "Lutris Wine Killer" "Wine processes not found!" & @@ -3199,7 +3207,7 @@ lu_killexe() { then echo 1 > /tmp/FORCE_EXIT kill -9 $EXE_PIDS 2>/dev/null - print_info notify "EXE processes successfully killed!" & + print_info notify "EXE processes successfully killed!" try_rm /tmp/FORCE_EXIT else print_error yad "Lutris Wine EXE Killer" "Lutris Wine EXE processes not found!" &