Skip to content

Commit

Permalink
v0.78.2.9 (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
VHSgunzo authored Feb 24, 2024
1 parent 919bbee commit 8c91773
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 26 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# v0.78.2.9

* Add `[EXE_NAMES].lwdb` DB script with custom EXE names
* Fix set `WINE_VERSION` from DB scripts for `System` Wine
* Fix wait for `lwrun` container processes exit
* Add check for duplicate exe arguments
* Minor fixes

# v0.78.2.8

* Add pseudo CD-ROM for fix old games CD-ROM check (`Road Rash` and others)
Expand Down
12 changes: 12 additions & 0 deletions db/[EXE_NAMES].lwdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
case "${EXE_NAME,,}" in
*'league of legends'*)
EXE_LWDBFL="$LW_DB_DIR/LeagueClient.lwdb" ;;
gog_galaxy*)
EXE_LWDBFL="$LW_DB_DIR/setup.lwdb" ;;
wemod-*)
EXE_LWDBFL="$LW_DB_DIR/WeMod.lwdb" ;;
zonasetup*)
EXE_LWDBFL="$LW_DB_DIR/Zona.lwdb" ;;
'direct commander setup'*)
EXE_LWDBFL="$LW_DB_DIR/Direct Commander.lwdb" ;;
esac
2 changes: 1 addition & 1 deletion lutris-wine
Original file line number Diff line number Diff line change
@@ -1 +1 @@
LW_VERSION="0.78.2.8"
LW_VERSION="0.78.2.9"
94 changes: 71 additions & 23 deletions lux-wine
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

export LW_VERSION="0.78.2.8"
export LW_VERSION="0.78.2.9"
export LW_DEVELOPERS="VHSgunzo"

export RED='\033[1;91m'
Expand Down Expand Up @@ -2188,14 +2188,16 @@ shrt_loop() {
)
find_wpfxlnk() { find "$@" -type f -iname "*.lnk" 2>/dev/null|sort -u ; }
find_wpfxurl() { find "$@" -type f -iname "*.url" 2>/dev/null|sort -u ; }
export pfxshrtname="$(basename "$WINEPREFIX")"
[ -f "/tmp/.lwshrt.$pfxshrtname" ] && \
local pfxshrtname="$(basename "$WINEPREFIX")"
local lwshrt="$LW_DEF_TMP/lwshrt.$pfxshrtname"
[ -f "$lwshrt" ] && \
! pidof wineserver &>/dev/null && \
rm -f "/tmp/.lwshrt.$pfxshrtname"
if [ ! -f "/tmp/.lwshrt.$pfxshrtname" ]
rm -f "$lwshrt"
if [ ! -f "$lwshrt" ]
then
(IFS=$'\n'
touch "/tmp/.lwshrt.$pfxshrtname"
mkdir -p "$LW_DEF_TMP"
touch "$lwshrt"
wait_wpids=100
while [ "$wait_wpids" -gt 0 ] && \
! pidof wineserver &>/dev/null
Expand All @@ -2220,7 +2222,7 @@ shrt_loop() {
check_tray
[ "$FORCE_TRAY" != 1 ] && \
check_shrt
done; rm -f "/tmp/.lwshrt.$pfxshrtname")
done; rm -f "$lwshrt")
fi
}

Expand All @@ -2239,8 +2241,8 @@ lu_run() {
echo_dbg|& tee -a "$LOG_FILE" ; "${LU_EXEC[@]}"|& tee -a "$LOG_FILE"
}
export -f exec_wine echo_dbg exec_with_log
shrt_loop &
pre_launch 2>/dev/null
shrt_loop &
dis_displ_sw 2>/dev/null
lu_tray
loadbar_cover 2>/dev/null
Expand Down Expand Up @@ -2327,7 +2329,6 @@ lu_run() {
fi
fi
wait
sleep 2
}

lu_prestart() {
Expand Down Expand Up @@ -2435,25 +2436,26 @@ check_db_script() {
elif [ -f "$LW_PATH_LWDB" ]
then export EXE_LWDBFL="$LW_PATH_LWDB"
else
case "${EXE_NAME,,}" in
*'league of legends'*) export EXE_LWDBFL="$LW_DB_DIR/LeagueClient.lwdb" ;;
gog_galaxy*) export EXE_LWDBFL="$LW_DB_DIR/setup.lwdb" ;;
wemod-*) export EXE_LWDBFL="$LW_DB_DIR/WeMod.lwdb" ;;
zonasetup*) export EXE_LWDBFL="$LW_DB_DIR/Zona.lwdb" ;;
'direct commander setup'*) export EXE_LWDBFL="$LW_DB_DIR/Direct Commander.lwdb" ;;
esac
local dbexes="$LW_DB_DIR/[EXE_NAMES].lwdb"
if [ -f "$dbexes" ]
then
set -a
source "$dbexes"
set +a
fi
fi
fi
if [ -f "$EXE_LWDBFL" ]
then
print_info notify "Found EXE DB script!"
print_info "Path: '$EXE_LWDBFL'"
local old_wine_version="$WINE_VERSION"
OLD_WINE_VERSION="$WINE_VERSION"
set -a
source "$EXE_LWDBFL"
set +a
if [ "$old_wine_version" != "$WINE_VERSION" ]
if [ "$OLD_WINE_VERSION" != "$WINE_VERSION" ]
then
NEW_WINE_VERSION="$WINE_VERSION"
if [[ ! -d "$LW_WINE_DIR/$WINE_VERSION" && \
"$WINE_VERSION" != 'System' ]]
then
Expand Down Expand Up @@ -5939,6 +5941,16 @@ check_videodrv() {
fi
}

exe_args_add() {
if [ -n "$EXE_ARGS" ]
then
for arg in "$@"
do [[ "${EXE_ARGS[@]}" =~ "$arg" ]]||EXE_ARGS+=("$arg")
done
else EXE_ARGS=("$@")
fi
}

exeargs_parse() {
sed_arg_quotes() { sed "s|^\"||;s|\"$||;s|^'||;s|'$||" ; }
local char
Expand All @@ -5965,19 +5977,19 @@ exeargs_parse() {
elif [[ "$char" == ' ' ]]
then
char=''
EXE_ARGS+=("$(sed_arg_quotes<<<"$result")")
exe_args_add "$(sed_arg_quotes<<<"$result")"
result=''
fi
fi
result+="$char"
done
[ -n "$result" ] && \
EXE_ARGS+=("$(sed_arg_quotes<<<"$result")")
exe_args_add "$(sed_arg_quotes<<<"$result")"
}

check_exe_args() {
[ -n "$1" ] && \
EXE_ARGS+=("$@")
exe_args_add "$@"
[ -n "$EXEARGS" ] && \
exeargs_parse
}
Expand Down Expand Up @@ -6017,12 +6029,12 @@ export_all_functions() {
check_reset_pulse export_all_functions check_win_version check_hold_terminal dll_manager check_dll_symlink try_ln check_git_release cleanrun \
runtime_manager upd_battleye is_exe_exist which_exe try_ln_wine_build_dll find_vk_icd btntls_run get_app_exe check_driprime greptardlurl get_wlu_releases \
upd_d3d_extras upd_dgvoodoo2 upd_dxvk upd_dxvk_nvapi upd_vkd3d upd_all is_loadbar lu_runapp lu_lsapp set_wine_version get_pge_releases get_wge_releases \
check_wined3d check_vkbasalt_eff check_luwine_wcfg_cenv check_videodrv check_startfile check_def_config get_wk4_releases is_app_exist \
check_wined3d check_vkbasalt_eff check_luwine_wcfg_cenv check_videodrv check_startfile check_def_config get_wk4_releases is_app_exist exe_args_add \
settingbar initbar check_network_status print_question print_input loadbar_cover check_first_run check_eac check_loadbar_cover installrun_nupkg_exe \
check_db_script stop_loadbar check_wmonover wmonover_upd check_exe_wcfg_cenv lu_appcfg try_fix_wrtx try_shutdown_wine check_steamapps is_winepfx \
check_display check_restore_resol resol_sw check_restore_gamma dis_displ_sw restore_resol check_virt_desktop check_vkbasalt_cfg check_exe_args \
check_wine_nvml check_resizable_bar check_latencyflex get_proton_d3dlib makesquash_zstd makesquash_xz lu_pfxbackup lu_pfxrestore lu_backupmnt lu_backupunmnt \
check_dxvk_async check_vsync get_wine_git_lst try_dl_install_wine
check_dxvk_async check_vsync get_wine_git_lst try_dl_install_wine exeargs_parse
}

initbar() {
Expand Down Expand Up @@ -6602,6 +6614,41 @@ if [[ "$EUID" == 0 && "$ALLOW_ROOT" != 1 ]]
print_error yad "Don't run Lux Wine as root!"
exit 1
else
(if [[ "$RUNSRC" =~ "lwrun" ]]
then
find_processes() {
processes="$(ls -l /proc/*/exe 2>/dev/null|grep ' ->')"
for ps in "${IGNPS[@]}"
do processes="$(grep -wv "$ps"<<<"$processes")"
done
}
[ -f "/tmp/.lwait.$RUNPID" ] && \
! kill -0 $RUNPID &>/dev/null && \
rm -f "/tmp/.lwait.$RUNPID"
if [ ! -f "/tmp/.lwait.$RUNPID" ]
then
IGNPS=('sleep' 'gamemoded' 'bash' 'grep' 'tee' 'ls' 'shellsrv')
find_processes
wait_lwpids=100
while [[ "$wait_lwpids" -gt 0 && \
! -n "$processes" ]]
do
wait_lwpids="$(( $wait_lwpids - 1 ))"
sleep 0.01 2>/dev/null
find_processes
done
touch "/tmp/.lwait.$RUNPID"
while [[ -n "$processes" && \
-f "/tmp/.lwait.$RUNPID" ]]
do
sleep 0.5
find_processes
done
rm -f "/tmp/.lwait.$RUNPID"
sleep 0.5
fi
fi) &
lwait_pid=$!
lite_init "$@"
case $1 in
-init) full_init "$@" ;;
Expand Down Expand Up @@ -6641,3 +6688,4 @@ if [[ "$EUID" == 0 && "$ALLOW_ROOT" != 1 ]]
*) lu_start "$@" ;;
esac
fi
wait "$lwait_pid" &>/dev/null
2 changes: 1 addition & 1 deletion lwrap/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pkgname='lwrap'
pkgver='0.78.2'
pkgrel='8'
pkgrel='9'
pkgdesc='Lux Wine wrapper for RunImage container'
arch=('x86_64')
url='https://github.com/VHSgunzo/lux-wine'
Expand Down
2 changes: 1 addition & 1 deletion lwrap/lwrap
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ LWRAP_DIR='/opt/lwrap'
LWRUNTIME="$LWRAP_DIR/runtime.tar.zst"
HLWDIRLN="$HOME/LuxWine"
OLD_HLWDIRLN="$HOME/LutrisWine"
LWRPIDFL='/tmp/.lwrpid'
LWRPIDFL="$XDG_RUNTIME_DIR/lwrpid"
LWEXEC="$LWBIN_DIR/lwexec"
HICOLOR_SIZES=(
"512x512" "256x256" "192x192" "128x128"
Expand Down

0 comments on commit 8c91773

Please sign in to comment.