From 285b2f770a8bb89e9e4133ab85fc334932b27e0a Mon Sep 17 00:00:00 2001 From: VHSgunzo Date: Thu, 4 Jan 2024 00:44:54 +0300 Subject: [PATCH] v0.78.2.3 --- CHANGELOG.md | 2 + lutris-wine | 2 +- lux-wine | 2 +- lwpkg/RunDir/Run.sh | 14 ---- lwrap/lwrap | 30 ++++---- {lwpkg => lwrun-pkg}/RunDir/Run | 0 lwrun-pkg/RunDir/Run.sh | 71 +++++++++++++++++++ {lwpkg => lwrun-pkg}/RunDir/lwrun.tar.zst | 0 .../RunDir/static/.binaries_version | 5 ++ {lwpkg => lwrun-pkg}/RunDir/static/.version | 0 {lwpkg => lwrun-pkg}/RunDir/static/bash | 0 .../mkdir => lwrun-pkg/RunDir/static/cat | 0 .../static/tar => lwrun-pkg/RunDir/static/cp | 0 .../zstd => lwrun-pkg/RunDir/static/mkdir | 0 lwpkg/lwrun => lwrun-pkg/RunDir/static/mv | 0 .../RunDir/static/tar | 0 lwrun-pkg/RunDir/static/zstd | 0 {lwpkg => lwrun-pkg}/build.sh | 14 ++-- lwrun-pkg/lwrun | 0 lwrun-pkg/runtime-fuse2-all | 0 20 files changed, 107 insertions(+), 33 deletions(-) delete mode 100755 lwpkg/RunDir/Run.sh rename {lwpkg => lwrun-pkg}/RunDir/Run (100%) create mode 100755 lwrun-pkg/RunDir/Run.sh rename {lwpkg => lwrun-pkg}/RunDir/lwrun.tar.zst (100%) rename {lwpkg => lwrun-pkg}/RunDir/static/.binaries_version (85%) rename {lwpkg => lwrun-pkg}/RunDir/static/.version (100%) rename {lwpkg => lwrun-pkg}/RunDir/static/bash (100%) rename lwpkg/RunDir/static/mkdir => lwrun-pkg/RunDir/static/cat (100%) rename lwpkg/RunDir/static/tar => lwrun-pkg/RunDir/static/cp (100%) rename lwpkg/RunDir/static/zstd => lwrun-pkg/RunDir/static/mkdir (100%) rename lwpkg/lwrun => lwrun-pkg/RunDir/static/mv (100%) mode change 100644 => 100755 rename lwpkg/runtime-fuse2-all => lwrun-pkg/RunDir/static/tar (100%) create mode 100755 lwrun-pkg/RunDir/static/zstd rename {lwpkg => lwrun-pkg}/build.sh (62%) create mode 100644 lwrun-pkg/lwrun create mode 100755 lwrun-pkg/runtime-fuse2-all diff --git a/CHANGELOG.md b/CHANGELOG.md index ee4f987..4e302ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # v0.78.2.3 * Update [lwrun](https://huggingface.co/lux-wine/lwrun/tree/main/releases/v0.39.1) packages +* Update `lwrap` +* Update [lw-runtime](https://github.com/VHSgunzo/lw-runtime/releases/tag/v0.0.2) `v0.0.2` * Reduce the size of the `lwrun` installer * Revert/replace `mesa-tkg-git` with `mesa` in `lwrun` * Fix prefix restore on first run with `-init` diff --git a/lutris-wine b/lutris-wine index 61fb383..96f0b0f 100755 --- a/lutris-wine +++ b/lutris-wine @@ -1 +1 @@ -LW_VERSION="0.78.2.2" +LW_VERSION="0.78.2.3" diff --git a/lux-wine b/lux-wine index cde4e5a..07f208b 100755 --- a/lux-wine +++ b/lux-wine @@ -1,6 +1,6 @@ #!/usr/bin/env bash -export LW_VERSION="0.78.2.2" +export LW_VERSION="0.78.2.3" export LW_DEVELOPERS="VHSgunzo" export RED='\033[1;91m' diff --git a/lwpkg/RunDir/Run.sh b/lwpkg/RunDir/Run.sh deleted file mode 100755 index fbeb03d..0000000 --- a/lwpkg/RunDir/Run.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -[ ! -d "$RUNDIR" ] && \ -RUNDIR="$(dirname "$(realpath "$0" 2>/dev/null)" 2>/dev/null)" -export PATH="$RUNDIR/static:$PATH" - -LW_DIR="$HOME/.local/share/LuxWine" -LWBIN_DIR="$LW_DIR/bin" -LWRUN="$LWBIN_DIR/lwrun" - -mkdir -p "$LWBIN_DIR" -tar -I 'zstd -T0 --progress' -xf "$RUNDIR/lwrun.tar.zst" -C "$LWBIN_DIR" - -exec "$LWRUN" -init diff --git a/lwrap/lwrap b/lwrap/lwrap index 6a6f865..e6183ad 100755 --- a/lwrap/lwrap +++ b/lwrap/lwrap @@ -235,6 +235,20 @@ is_not_pts_home() { } try_install_lwrun() { + finalize_install() { + chmod u+x "$LWRUN" + ln_lwrun + info_msg "lwrun installed!" + if [ ! -n "$TMP_LWRUN" ] && \ + is_net_conn + then + update_lwrap + LWRUN_INSTALLED=1 \ + "$LWRAP" --install + fi + try_shutdown_lw && \ + return 0||return 1 + } if is_not_pts_home then REALP_LWRUN="$(readrealpath "$LWRUN")" @@ -245,19 +259,7 @@ try_install_lwrun() { info_msg "Installing lwrun..." mkdir -p "$LWBIN_DIR" if mv_lwrun "$RUNSRCRPTH" "$LWRUN" - then - chmod u+x "$LWRUN" - ln_lwrun - info_msg "lwrun installed!" - if [ ! -n "$TMP_LWRUN" ] && \ - is_net_conn - then - update_lwrap - LWRUN_INSTALLED=1 \ - "$LWRAP" --install - fi - try_shutdown_lw && \ - return 0||return 1 + then finalize_install else error_msg "Failed to install lwrun!" is_lwrun && \ @@ -269,6 +271,8 @@ try_install_lwrun() { ln -sf "$RUNSRCRPTH" "$LWRUN" ln_lwrun return 0 + elif [[ ! -n "$TMP_LWRUN" && "$LWRUN_PKG" == 1 ]] + then finalize_install fi fi } diff --git a/lwpkg/RunDir/Run b/lwrun-pkg/RunDir/Run similarity index 100% rename from lwpkg/RunDir/Run rename to lwrun-pkg/RunDir/Run diff --git a/lwrun-pkg/RunDir/Run.sh b/lwrun-pkg/RunDir/Run.sh new file mode 100755 index 0000000..b6d8723 --- /dev/null +++ b/lwrun-pkg/RunDir/Run.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash + +which_exe() { command -v "$@" ; } + +try_mv_nvdrv() { + mkdir -p "$NVIDIA_DRIVERS_DIR" + if [ -w "$1" ] + then mv -f "$1" "$NVIDIA_DRIVERS_DIR/" 2>/dev/null + else cp -rf "$1" "$NVIDIA_DRIVERS_DIR/" 2>/dev/null + fi +} + +if [[ -n "$RUNOFFSET" && -n "$ARGV0" ]] + then + RUNSTATIC="$RUNDIR/static" + [ "$SYS_TOOLS" == 1 ] && \ + export PATH="$PATH:$RUNSTATIC"||\ + export PATH="$RUNSTATIC:$PATH" + if [ ! -n "$RUNIMAGE" ] # KDE Neon, CachyOS, Puppy Linux bug + then + if [ -x "$(realpath "$ARGV0" 2>/dev/null)" ] + then RUNIMAGE="$(realpath "$ARGV0" 2>/dev/null)" + elif [ -x "$(realpath "$(which_exe "$ARGV0")" 2>/dev/null)" ] + then RUNIMAGE="$(realpath "$(which_exe "$ARGV0")" 2>/dev/null)" + else RUNIMAGE="$ARGV0" + fi + fi + PRUNDIR="$(dirname "$RUNIMAGE" 2>/dev/null)" + else + [ ! -d "$RUNDIR" ] && \ + RUNDIR="$(dirname "$(realpath "$0" 2>/dev/null)" 2>/dev/null)" + RUNSTATIC="$RUNDIR/static" + [ "$SYS_TOOLS" == 1 ] && \ + export PATH="$PATH:$RUNSTATIC"||\ + export PATH="$RUNSTATIC:$PATH" + PRUNDIR="$(realpath "$RUNDIR/../" 2>/dev/null)" +fi + +export LWRUN_PKG=1 +LW_DIR="$HOME/.local/share/LuxWine" +LWBIN_DIR="$LW_DIR/bin" +LWRUN="$LWBIN_DIR/lwrun" +NVIDIA_DRIVERS_DIR="$LW_DIR/bin/nvidia-drivers" + +mkdir -p "$LWBIN_DIR" +tar -I 'zstd -T0 --progress' -xf "$RUNDIR/lwrun.tar.zst" -C "$LWBIN_DIR" + +if [[ "$SANDBOX_HOME" != 1 && \ + "$SANDBOX_HOME_DL" != 1 && \ + ! -d "$SANDBOXHOMEDIR/lwrap" && \ + "$PORTABLE_HOME" != 1 && \ + "$TMP_HOME" != 1 && \ + "$TMP_HOME_DL" != 1 && \ + ! -d "$PORTABLEHOMEDIR/lwrap" ]] + then + nvidia_version="$(cat /sys/module/nvidia/version 2>/dev/null)" + if [ -n "$nvidia_version" ] + then + if [[ ! -d "$NVIDIA_DRIVERS_DIR/$nvidia_version" && \ + ! -f "$NVIDIA_DRIVERS_DIR/$nvidia_version.nv.drv" ]] + then + if [ -d "$PRUNDIR/$nvidia_version" ] + then try_mv_nvdrv "$PRUNDIR/$nvidia_version" + elif [ -f "$PRUNDIR/$nvidia_version.nv.drv" ] + then try_mv_nvdrv "$PRUNDIR/$nvidia_version.nv.drv" + fi + fi + fi +fi + +exec "$LWRUN" -init diff --git a/lwpkg/RunDir/lwrun.tar.zst b/lwrun-pkg/RunDir/lwrun.tar.zst similarity index 100% rename from lwpkg/RunDir/lwrun.tar.zst rename to lwrun-pkg/RunDir/lwrun.tar.zst diff --git a/lwpkg/RunDir/static/.binaries_version b/lwrun-pkg/RunDir/static/.binaries_version similarity index 85% rename from lwpkg/RunDir/static/.binaries_version rename to lwrun-pkg/RunDir/static/.binaries_version index 587a94e..cd9661c 100644 --- a/lwpkg/RunDir/static/.binaries_version +++ b/lwrun-pkg/RunDir/static/.binaries_version @@ -1,5 +1,10 @@ [coreutils](https://github.com/VHSgunzo/coreutils-static) 9.3 (musl): + cat + cp + dirname mkdir + mv + realpath (musl): [tar](https://github.com/VHSgunzo/tar-static) 1.34 [bash](https://github.com/robxu9/bash-static) 5.2.015-1.2.3-2 diff --git a/lwpkg/RunDir/static/.version b/lwrun-pkg/RunDir/static/.version similarity index 100% rename from lwpkg/RunDir/static/.version rename to lwrun-pkg/RunDir/static/.version diff --git a/lwpkg/RunDir/static/bash b/lwrun-pkg/RunDir/static/bash similarity index 100% rename from lwpkg/RunDir/static/bash rename to lwrun-pkg/RunDir/static/bash diff --git a/lwpkg/RunDir/static/mkdir b/lwrun-pkg/RunDir/static/cat similarity index 100% rename from lwpkg/RunDir/static/mkdir rename to lwrun-pkg/RunDir/static/cat diff --git a/lwpkg/RunDir/static/tar b/lwrun-pkg/RunDir/static/cp similarity index 100% rename from lwpkg/RunDir/static/tar rename to lwrun-pkg/RunDir/static/cp diff --git a/lwpkg/RunDir/static/zstd b/lwrun-pkg/RunDir/static/mkdir similarity index 100% rename from lwpkg/RunDir/static/zstd rename to lwrun-pkg/RunDir/static/mkdir diff --git a/lwpkg/lwrun b/lwrun-pkg/RunDir/static/mv old mode 100644 new mode 100755 similarity index 100% rename from lwpkg/lwrun rename to lwrun-pkg/RunDir/static/mv diff --git a/lwpkg/runtime-fuse2-all b/lwrun-pkg/RunDir/static/tar similarity index 100% rename from lwpkg/runtime-fuse2-all rename to lwrun-pkg/RunDir/static/tar diff --git a/lwrun-pkg/RunDir/static/zstd b/lwrun-pkg/RunDir/static/zstd new file mode 100755 index 0000000..e69de29 diff --git a/lwpkg/build.sh b/lwrun-pkg/build.sh similarity index 62% rename from lwpkg/build.sh rename to lwrun-pkg/build.sh index 77ef8ae..5114339 100755 --- a/lwpkg/build.sh +++ b/lwrun-pkg/build.sh @@ -6,10 +6,16 @@ RUNTIME='runtime-fuse2-all' RUNTIMESIZE=($(du -sb "$RUNTIME" 2>/dev/null)) # RunDir/static -# bash # https://github.com/robxu9/bash-static -# mkdir # https://github.com/VHSgunzo/coreutils-static -# tar # https://github.com/VHSgunzo/tar-static -# zstd # https://github.com/VHSgunzo/zstd-static +# bash https://github.com/robxu9/bash-static +# coreutils https://github.com/VHSgunzo/coreutils-static : +# cat +# cp +# dirname +# mkdir +# mv +# realpath +# tar https://github.com/VHSgunzo/tar-static +# zstd https://github.com/VHSgunzo/zstd-static # https://github.com/VHSgunzo/Run-wrapper # RunDir/Run diff --git a/lwrun-pkg/lwrun b/lwrun-pkg/lwrun new file mode 100644 index 0000000..e69de29 diff --git a/lwrun-pkg/runtime-fuse2-all b/lwrun-pkg/runtime-fuse2-all new file mode 100755 index 0000000..e69de29