diff --git a/CHANGELOG.md b/CHANGELOG.md index fe4a446..52a1ecb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# v0.78.1.9 + +* Update [lwrun](https://huggingface.co/lux-wine/lwrun/tree/main/releases/v0.39.1) packages +* Update DB script for `The Honkers Railway` `v1.5.0` +* Fix passing environment variables for `lwrap` - `lwexec` +* Add ability exec command as args in SHELL mode from terminal + # v0.78.1.8 * Update [lwrun](https://huggingface.co/lux-wine/lwrun/tree/main/releases/v0.39.1) packages diff --git a/db/launcher.lwdb b/db/launcher.lwdb index cb121c1..58a2bd8 100644 --- a/db/launcher.lwdb +++ b/db/launcher.lwdb @@ -1,5 +1,5 @@ srlauncher() { - SR_PATCH_VER=v3.0.9 + SR_PATCH_VER=v3.0.11 SR_PATCH_DIR="$LW_DEF_TMP/srpatch_$SR_PATCH_VER" EXE_DRIVE="$(grep -oi '[a-z]:'<<<"$LU_EXE")" SRLAUNCHER="$EXE_DRIVE\\$(sed 's|.*/[a-z]:||i;s|\/|\\|g'<<<"$LU_EXE")" diff --git a/lutris-wine b/lutris-wine index a102cc4..eae6438 100755 --- a/lutris-wine +++ b/lutris-wine @@ -1 +1 @@ -LW_VERSION="0.78.1.8" +LW_VERSION="0.78.1.9" diff --git a/lux-wine b/lux-wine index 5b32c38..8f3c149 100755 --- a/lux-wine +++ b/lux-wine @@ -1,6 +1,6 @@ #!/usr/bin/env bash -export LW_VERSION="0.78.1.8" +export LW_VERSION="0.78.1.9" export LW_DEVELOPERS="VHSgunzo" export RED='\033[1;91m' @@ -148,8 +148,8 @@ done cpu_stats,cpu_temp,cpu_load_change,core_load_change,cpu_color=2e97cb,cpu_text=CPU,io_color=a491d3,vram,vram_color=ad64c1,ram,ram_color=c26693,fps,\ engine_version,engine_color=eb5b5b,gpu_name,gpu_color=2e9762,vulkan_driver,wine,wine_color=eb5b5b,arch,frame_timing=1,frametime_color=00ff00,\ resolution,vkbasalt,gamemode,background_alpha=0.4,background_color=020202,position=top-right,text_color=ffffff,toggle_hud=Shift_R+F12" -[ ! -n "$(tty|grep -v 'not a'|grep -Eo 'tty|pts')" ] && \ - NOT_TERM=1 +[[ ! -n "$NOT_TERM" && ! -n "$(tty|grep -v 'not a'|grep -Eo 'tty|pts')" ]] && \ + NOT_TERM=1||NOT_TERM=0 export LWPID=$BASHPID [ ! -n "$LWPPID" ] && \ @@ -2251,7 +2251,10 @@ lu_run() { elif [ -n "$LU_SHELL_PTH" ] then unset LU_SHELL_PTH TERMINAL LD_LIBRARY_PATH - $TERM_APP $LWSHELL + if [ -n "$1" ] + then $TERM_APP "$@" + else $TERM_APP $LWSHELL + fi else $TERM_APP $LWSHELL -c "echo -en '$(cat "$TMP_DBG" 2>/dev/null)\n$PRINT_VARS\n\n'|& tee -a '$LOG_FILE' ; \ $RUN_VKCAPTURE $RUN_FPSLIMIT $RUN_GAMEMODE $RUN_MANGOHUD $RUN_CPU_LIMIT '$WINE' $RUN_VDESKTOP '$@' $EXE_ARG|& tee -a '$LOG_FILE'" @@ -3240,20 +3243,36 @@ lu_shell() { export DEBUG=0 if [ -f "$2" ] then - if [[ -n "$(file "$2"|grep "script"|grep -o "executable")" || -n "$(file "$2"|grep "ELF"|grep -o "executable")" ]] + local file_info="$(file "$2")" + if [[ -n "$(grep "script"<<<"$file_info"|grep -o "executable")" || \ + -n "$(grep "ELF"<<<"$file_info"|grep -o "executable")" ]] then export LU_SHELL_EXE="$(readlink -f "$2")" lu_run "$LU_SHELL_EXE" else print_error yad "Lux Wine SHELL" "Unable to start Lux Wine for this file!" fi - elif [ -d "$2" ] - then - export LU_SHELL_PTH="$(readlink -f "$2")" - lu_run - else - export LU_SHELL_PTH="$HOME" + elif [ -d "$2" ] + then + export LU_SHELL_PTH="$(readlink -f "$2")" lu_run + else + shift + if [ "$NOT_TERM" == 1 ] + then + export LU_SHELL_PTH="$HOME" + lu_run "$@" + else + if [ -n "$1" ] + then + unset TERMINAL LOADBAR \ + DEBUG UNSET_CMPSTR_SW + "$@" + else + export LU_SHELL_PTH="$PWD" + lu_run + fi + fi fi } diff --git a/lwrap/PKGBUILD b/lwrap/PKGBUILD index 7007ce4..453d6fe 100644 --- a/lwrap/PKGBUILD +++ b/lwrap/PKGBUILD @@ -2,7 +2,7 @@ pkgname='lwrap' pkgver='0.78.1' -pkgrel='8' +pkgrel='9' pkgdesc='Lux Wine wrapper for RunImage container' arch=('x86_64') url='https://github.com/VHSgunzo/lux-wine' diff --git a/lwrap/lwexec b/lwrap/lwexec index 7cd27e5..289bdb1 100755 --- a/lwrap/lwexec +++ b/lwrap/lwexec @@ -79,9 +79,18 @@ if [[ -d "$LWEXECFLDIR" && -e "$JOBNUMFL" ]] if [ -n "$jobnum" ] then execjobdir="$LWEXECFLDIR/$jobnum" + execenvfl="$execjobdir/env" execjobfl="$execjobdir/exec" execjoboutfl="$execjobdir/out" execjobstatfl="$execjobdir/stat" + export -p|\ + grep -v 'SHELL='|\ + grep -v 'DISPLAY='|\ + grep -v 'XDG_DATA_DIRS='|\ + grep -v 'XDG_CONFIG_DIRS='|\ + grep -v 'XDG_RUNTIME_DIR='|\ + grep -v 'DBUS_SESSION_BUS_ADDRESS=' \ + > "$execenvfl" 2>/dev/null if [ -n "$1" ] then check_args_spaces "$@" diff --git a/lwrap/lwrap b/lwrap/lwrap index dd486b3..6a6f865 100755 --- a/lwrap/lwrap +++ b/lwrap/lwrap @@ -74,7 +74,7 @@ fi unset NO_EXT_LWRAP [ ! -n "$(tty|grep -v 'not a'|grep -Eo 'tty|pts')" ] && \ - NOT_TERM=1 + NOT_TERM=1||NOT_TERM=0 error_msg() { echo -e "${RED}[ ERROR ][$(date +"%Y.%m.%d %T")]: $@ $RESETCOLOR" @@ -915,17 +915,24 @@ if [[ -n "$RUNSRC" && -d "$RUNROOTFS" ]] do jobnum=$(( $jobnum + 1 )) execjobdir="$LWEXECFLDIR/$jobnum" + execenvfl="$execjobdir/env" execjobfl="$execjobdir/exec" execjoboutfl="$execjobdir/out" execjobstatfl="$execjobdir/stat" mkdir "$execjobdir" 2>/dev/null + mkfifo "$execenvfl" 2>/dev/null mkfifo "$execjobfl" 2>/dev/null mkfifo "$execjoboutfl" 2>/dev/null mkfifo "$execjobstatfl" 2>/dev/null tee <<<"$jobnum" "$JOBNUMFL" &>/dev/null if [ -e "$execjobfl" ] then - (cat "$execjobfl" 2>/dev/null|"$RUNSTATIC/bash" &>"$execjoboutfl" & + (OLD_PATH="$PATH" + OLD_LD_LIBRARY_PATH="$LD_LIBRARY_PATH" + source "$execenvfl" && cd "$PWD" + export PATH="$PATH:$OLD_PATH" + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$OLD_LD_LIBRARY_PATH" + cat "$execjobfl" 2>/dev/null|"$RUNSTATIC/bash" &>"$execjoboutfl" & execjobpid=$! tee <<<"$execjobpid" "$execjobstatfl" &>/dev/null wait $execjobpid 2>/dev/null @@ -953,7 +960,9 @@ if [[ -n "$RUNSRC" && -d "$RUNROOTFS" ]] try_set_lwrpid if [[ "$FORCE_UPDATE" != 1 && -x "$LWEXEC" && -x "$LWSRC" ]] && \ [[ -n "$lwrpid" && -f "/tmp/.bwinf.$lwrpid" && -d "/proc/$lwrpid" ]] - then LWEXECFLDIR="/tmp/.lwexec.$lwrpid" "$LWEXEC" "$LWSRC" "$@" + then + LWEXECFLDIR="/tmp/.lwexec.$lwrpid" \ + NOT_TERM="$NOT_TERM" "$LWEXEC" "$LWSRC" "$@" elif [ -x "$LWRUN_LN" ] then "$LWRUN_LN" "$@" elif is_lwrun