From 51355dd1fa03e5ed86047a8a6e341fc493332e80 Mon Sep 17 00:00:00 2001 From: VHSgunzo Date: Thu, 25 Apr 2024 22:04:33 +0300 Subject: [PATCH] v0.78.4.6 --- CHANGELOG.md | 18 ++++++++ README.md | 2 + db/Caliber.lwdb | 1 - db/CaliberSetup.lwdb | 8 ---- db/CaliberStart.lwdb | 1 - db/LeagueClient.lwdb | 2 +- db/[EXE_NAMES].lwdb | 2 - db/launcher.lwdb | 5 --- db/setup.lwdb | 5 --- db/speed.lwdb | 8 ++-- lux-wine | 103 +++++++++++++++++++++++++++++++++---------- lwrap/PKGBUILD | 4 +- lwrap/lwrap | 84 ++++++++++++++++++++++++++--------- 13 files changed, 171 insertions(+), 72 deletions(-) delete mode 120000 db/Caliber.lwdb delete mode 100644 db/CaliberSetup.lwdb delete mode 120000 db/CaliberStart.lwdb delete mode 100644 db/setup.lwdb diff --git a/CHANGELOG.md b/CHANGELOG.md index 74373ca..c7aecd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +# v0.78.4.6 + +* Update [lwrun](https://huggingface.co/lux-wine/lwrun/tree/main/releases/v0.39.1) packages +* Update [GE-Proton](https://github.com/VHSgunzo/ge-proton-lw/releases/tag/v9.4) `v9.4` +* Update `wine-staging` (System) in container to `v9.6` +* Remove DB script for `Caliber` +* Remove DB script for `setup` +* Update DB script for `Need for Speed Underground` +* Update DB script for `Need for Speed Underground 2` +* Update DB script for `Need for Speed Most Wanted` +* Update DB script for `Need for Speed Carbon` +* Add install LW from container if couldn't download from the internet +* Fix install with `wget2` +* Fix install with `aria2` if user config exist +* Add `Controllermap` to `Settings` +* Add `SDL_GAMECONTROLLERCONFIG` to `Settings` +* Add `Gamescope` to `Settings` + # v0.78.4.5 * HotFix menu apps LW categories icon diff --git a/README.md b/README.md index 3025ff4..3c9eab4 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,8 @@ lwrun --uninstall - [x] AMD FidelityFX Contrast Adaptive Sharpening settings (depends on [VkBasalt](https://github.com/DadSchoorse/vkBasalt/releases)) - [x] [Gstreamer](https://github.com/GStreamer/gstreamer) (if Wine support) - [x] [GameMode](https://github.com/FeralInteractive/gamemode/releases) +- [x] [Gamescope](https://github.com/ValveSoftware/gamescope) +- [x] [controllermap](https://aur.archlinux.org/packages/controllermap) - [x] Esync - [x] Fsync (if linux kernel support) - [x] Vsync settings diff --git a/db/Caliber.lwdb b/db/Caliber.lwdb deleted file mode 120000 index 2c79e75..0000000 --- a/db/Caliber.lwdb +++ /dev/null @@ -1 +0,0 @@ -CaliberSetup.lwdb \ No newline at end of file diff --git a/db/CaliberSetup.lwdb b/db/CaliberSetup.lwdb deleted file mode 100644 index e134489..0000000 --- a/db/CaliberSetup.lwdb +++ /dev/null @@ -1,8 +0,0 @@ -#DB# Caliber # DB_EXES=('CaliberSetup.exe' 'Caliber.exe' 'CaliberStart.exe' 'launcher.exe') - -WIN_VER=10 -WINEARCH=win64 -WINE_VERSION=System -USE_DEFPFX_BACKUP=1 -MUST_HAVE_DLL=Disabled -WPREFIX_NAME=syswinepfx diff --git a/db/CaliberStart.lwdb b/db/CaliberStart.lwdb deleted file mode 120000 index 2c79e75..0000000 --- a/db/CaliberStart.lwdb +++ /dev/null @@ -1 +0,0 @@ -CaliberSetup.lwdb \ No newline at end of file diff --git a/db/LeagueClient.lwdb b/db/LeagueClient.lwdb index 55713fb..cac993e 100644 --- a/db/LeagueClient.lwdb +++ b/db/LeagueClient.lwdb @@ -14,7 +14,7 @@ EXE_ARGS=(--launch-product=league_of_legends --launch-patchline=live) pfxsetupfl="$LW_DEF_WPFXS_DIR/$WPREFIX_NAME/.setup" if [ ! -f "$pfxsetupfl" ] then - source "$LW_DB_DIR/setup.lwdb" + WINE_VERSION=System pre_launch() { touch "$pfxsetupfl" (if [ "$EXE_NAME" == "LeagueClient" ] diff --git a/db/[EXE_NAMES].lwdb b/db/[EXE_NAMES].lwdb index 1be9140..97bf618 100644 --- a/db/[EXE_NAMES].lwdb +++ b/db/[EXE_NAMES].lwdb @@ -1,8 +1,6 @@ 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*) diff --git a/db/launcher.lwdb b/db/launcher.lwdb index c037f82..dda4ac8 100644 --- a/db/launcher.lwdb +++ b/db/launcher.lwdb @@ -1,6 +1,5 @@ #DB# Crossout # DB_EXES=('launcher.exe') #DB# Dark Sector # DB_EXES=('DS.exe' 'launcher.exe') -#DB# Caliber # DB_EXES=('CaliberSetup.exe' 'Caliber.exe' 'CaliberStart.exe' 'launcher.exe') #DB# Honkai: Star Rail # DB_EXES=('launcher.exe') !'StarRail.exe' srlauncher() { @@ -53,7 +52,3 @@ pre_launch() { } WIN_VER=10 - -case "$EXE_DIR" in - Caliber) source "$LW_DB_DIR/CaliberSetup.lwdb" ;; -esac diff --git a/db/setup.lwdb b/db/setup.lwdb deleted file mode 100644 index 9f2f022..0000000 --- a/db/setup.lwdb +++ /dev/null @@ -1,5 +0,0 @@ -#DB# Setup # DB_EXES=('setup.exe') -#DB# GOG Galaxy # DB_EXES=('gog_galaxy.*.exe') -#DB# League of Legends # DB_EXES=('live.na.exe' 'LeagueClient.exe' 'RiotClientServices.exe' '.*league of legends.*') - -WINE_VERSION=System diff --git a/db/speed.lwdb b/db/speed.lwdb index d254fdf..fa4f1e4 100644 --- a/db/speed.lwdb +++ b/db/speed.lwdb @@ -15,8 +15,8 @@ set_syswine() { } case "$EXE_DIR" in - 'Need for Speed Most Wanted'|\ - 'Need for Speed Carbon') set_syswine ;; - 'Need for Speed Underground'|\ - 'Need for Speed Underground 2') set_syswine ; WD3DMODE=WineD3D ;; + 'Need for Speed'*'Most Wanted'|\ + 'Need for Speed'*'Carbon') set_syswine ;; + 'Need for Speed'*'Underground'|\ + 'Need for Speed'*'Underground 2') set_syswine ; WD3DMODE=WineD3D ;; esac diff --git a/lux-wine b/lux-wine index 4b11c12..ecce3c1 100755 --- a/lux-wine +++ b/lux-wine @@ -1,6 +1,6 @@ #!/usr/bin/env bash -export LW_VERSION="0.78.4.5" +export LW_VERSION="0.78.4.6" export LW_DEVELOPERS="VHSgunzo" export RED='\033[1;91m' @@ -2262,7 +2262,7 @@ lu_run() { [[ "$E_EXE_ARGS" =~ ^declare ]] && eval "$E_EXE_ARGS" [[ "$E_EXE_WRAPPER" =~ ^declare ]] && eval "$E_EXE_WRAPPER" $RUN_VKCAPTURE $RUN_FPSLIMIT $RUN_GAMEMODE $RUN_MANGOHUD $RUN_CPU_LIMIT \ - "$WINE" $RUN_VDESKTOP "${EXE_WRAPPER[@]}" "${LU_EXEC[@]}" "${EXE_ARGS[@]}" + $RUN_GAMESCOPE "$WINE" $RUN_VDESKTOP "${EXE_WRAPPER[@]}" "${LU_EXEC[@]}" "${EXE_ARGS[@]}" } exec_wine_with_dbg_log() { echo_dbg|& tee -a "$LOG_FILE" ; exec_wine|& tee -a "$LOG_FILE" ; } exec_wine_with_log() { echo_dbg ; exec_wine|& tee -a "$LOG_FILE" ; } @@ -2780,6 +2780,7 @@ full_init() { check_themes check_cpu_limit check_fps_limit + check_gamescope check_us_switcher check_restore_gamma check_restore_resol @@ -2882,6 +2883,7 @@ lu_config() { MANGOHUDLST="Enabled \n DLSYM \n Disabled" VKCAPTURELST="Vulkan \n OpenGL \n Disabled" GTKTHEMELST="Adwaita:dark \n Adwaita \n $(ls -1 "$HOME/.themes" 2>/dev/null)" + GAMESCOPEARGSLST="Disabled \n -f \n -W 1920 -H 1080 -f \n -w 2560 -h 1440 -W 1920 -H 1080 -F fsr -f" lwconfig_save() { LWCFGVAR="WINE_VERSION WIN_VER WINEARCH WINEPREFIX WINE_THEME WDLLOVER WMONOVER WD3DMODE DISABLE_NVAPI WINE_DXGI D3D_EXTRAS DGVOODOO2 \ DXVK_VERSION VKD3D_VERSION DXVK_NVAPI_VERSION D3D_EXTRAS_VERSION DGVOODOO2_VERSION WINE_NVML_VERSION VKD3DCFG MUST_HAVE_DLL \ @@ -2891,7 +2893,7 @@ lu_config() { LOADBAR LOADBARGIF CHKSTEAMAPPS LW_STEAMAPPS_DIR CHECK_LW_APPS GTK_THEME LOG DEBUG SYS_WINETRICKS CPU_LIMIT CMPRSS_METHOD ZSTD_CMPRSS_LVL \ DIS_OTH_DISPL RESTORE_RESOL RESTORE_GAMMA DIS_COPMOSITOR RESET_PULSE PULSE_LTCY TERMINAL HOLD_TERMINAL LW_TERM_APP \ LW_DOWNLOADER AUTOSTART_TRAY US_LAYOUT VKBASALT VKBASALT_FFX_CAS VKICDFILES GAMEMODE LWMANGOHUD MANGOHUD_USER_CONF FPS_LIMIT \ - VSYNC LWVKCAPTURE NVPRIME DRIPRIME" + VSYNC LWVKCAPTURE NVPRIME DRIPRIME SDL_GAMECONTROLLERCONFIG GAMESCOPEARG" WCFGOUT="$(while read CFGVAR <&3 && read CFGPARAM <&4 do [ -n "$(echo "$CFGPARAM"|sed "s|''||")" ] && \ @@ -3065,6 +3067,8 @@ lu_config() { --field="OBS-VkCapture::CB" "$(cfg_items "$LWVKCAPTURE" "$VKCAPTURELST")" \ --field="NVIDIA Prime Render Offload:CHK" "$NVPRIME" \ --field="DRI_PRIME:CHK" "$DRIPRIME" \ + --field="SDL GAMECONTROLLER CONFIG:CBE" "$SDL_GAMECONTROLLERCONFIG" \ + --field="Gamescope arguments:CBE" "$(cfg_items "$GAMESCOPEARG" "$GAMESCOPEARGSLST")" \ --file-filter="All Files | *.*" \ 1> /tmp/syssett$LWCFGKEY & @@ -3148,6 +3152,7 @@ lu_config() { --field="Kill SHELL:FBTN" "$LWSHELL -c 'lu_killshell'" \ --field="Kill tray:FBTN" "$LWSHELL -c 'lu_killtray'" \ --field="Force Exit:FBTN" "$LWSHELL -c 'lu_exit'" \ + --field="Controllermap:FBTN" "$LWSHELL -c 'btn_tools controllermap'" \ &>/dev/null & check_exes @@ -3254,25 +3259,63 @@ lu_config() { SETTBTN="$(cat "/tmp/settbtn$LWCFGKEY")" try_rm "/tmp/settbtn$LWCFGKEY" case $SETTBTN in - winemgr) lu_winemgr - btntls_run ;; - - clearpfx) lu_clearpfx - sleep 0.5 - btntls_run ;; - - update) lu_update - btntls_run ;; - - winetricks) btntls_run -winetricks ;; - - init) btntls_run -init ;; - - pfxbackup) btntls_run -pfxbackup ;; - - pfxrestore) btntls_run -pfxrestore ;; - - appcfg) LU_EXE= lu_appcfg ;; + winemgr) + lu_winemgr + btntls_run + ;; + clearpfx) + lu_clearpfx + sleep 0.5 + btntls_run + ;; + update) + lu_update + btntls_run + ;; + winetricks) + btntls_run -winetricks + ;; + init) + btntls_run -init + ;; + pfxbackup) + btntls_run -pfxbackup + ;; + pfxrestore) + btntls_run -pfxrestore + ;; + appcfg) + LU_EXE= lu_appcfg + ;; + controllermap) + if [ "$(ls /dev/input/js* 2>/dev/null)" ] + then + if is_exe_exist controllermap + then + print_info yad \ +"Press the buttons on your controller when indicated +(Your controller may look different than the picture) +If you want to correct a mistake, press backspace or the back button on your device +To skip a button, press SPACE or click/touch the screen +To exit, press ESC" + controllermap="$(SDL_GAMECONTROLLERCONFIG= controllermap)" + if [ "$controllermap" ] + then + if grep -q '^SDL_GAMECONTROLLERCONFIG' "$LW_CFG" + then + if print_question 'Add to the previous SDL GAMECONTROLLERCONFIG configuration?' + then sed -i "s|^SDL_GAMECONTROLLERCONFIG='|SDL_GAMECONTROLLERCONFIG='$controllermap|g" "$LW_CFG" + else sed -i "s|^SDL_GAMECONTROLLERCONFIG.*|SDL_GAMECONTROLLERCONFIG='$controllermap'|g" "$LW_CFG" + fi + else echo "SDL_GAMECONTROLLERCONFIG='$controllermap'" >> "$LW_CFG" + fi + fi + else print_error yad "controllermap is not found!" + fi + else print_error yad "Game controller is not found!" + fi + btntls_run + ;; esac fi } @@ -5838,6 +5881,20 @@ check_cpu_limit() { fi } +check_gamescope() { + [ -n "$1" ] && export GAMESCOPEARG="$1" + if [[ -n "$GAMESCOPEARG" && "$GAMESCOPEARG" != 'Disabled' ]] + then + print_info "GAMESCOPE is enabled!" + unset __GL_THREADED_OPTIMIZATIONS + if [ "$VKBASALT" == 1 ] + then export RUN_GAMESCOPE="env -u ENABLE_VKBASALT gamescope $GAMESCOPEARG -- env ENABLE_VKBASALT=1" + else export RUN_GAMESCOPE="gamescope $GAMESCOPEARG --" + fi + else unset RUN_GAMESCOPE + fi +} + check_vkd3dconfig() { [ -n "$1" ] && export VKD3DCFG="$1" if [[ -n "$VKD3DCFG" && "$VKD3DCFG" != "Disabled" ]] @@ -6208,7 +6265,7 @@ export_all_functions() { 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 exeargs_parse try_add_reg_cdrom shrt_loop shrt_from_url shrt_from_lnk check_shrt \ - get_shrt_data check_autostart_tray check_config_only + get_shrt_data check_autostart_tray check_config_only check_gamescope } initbar() { diff --git a/lwrap/PKGBUILD b/lwrap/PKGBUILD index 4afa03b..0feb4d4 100644 --- a/lwrap/PKGBUILD +++ b/lwrap/PKGBUILD @@ -2,7 +2,7 @@ pkgname='lwrap' pkgver='0.78.4' -pkgrel='5' +pkgrel='6' pkgdesc='Lux Wine wrapper for RunImage container' arch=('x86_64') url='https://github.com/VHSgunzo/lux-wine' @@ -33,7 +33,7 @@ depends=( 'dos2unix' 'lw-runtime' 'wine-gecko' 'wine-mono' 'libdvdread' 'a52dec' 'wavpack' 'lib32-wavpack' 'libmpeg2' 'twolame' 'lib32-twolame' 'gst-plugin-msdk' 'lib32-libdv' 'libdv' 'GE-Proton' 'xxd-standalone' 'obs-vkcapture-lw' 'lib32-obs-vkcapture-lw' 'egl-wayland' 'gstreamer-vaapi' - 'moninfo' 'perl-image-exiftool' 'xorg-xlsfonts' 'firefox' + 'moninfo' 'perl-image-exiftool' 'xorg-xlsfonts' 'firefox' 'controllermap' ) optdepends=( 'xf86-video-amdgpu' 'xf86-video-intel' 'llvm' diff --git a/lwrap/lwrap b/lwrap/lwrap index 5daee01..b7eddc2 100755 --- a/lwrap/lwrap +++ b/lwrap/lwrap @@ -395,6 +395,17 @@ try_dl_lwzip() { } install_lw() { + install_local_lw() { + if [ -d "/opt/lwrap" ] + then + info_msg "Installing Lux Wine from container..." + (mkdir -p "$TMP_LW" && \ + cp -rf "/opt/lwrap"/!(runtime.tar.zst|prefix_backups) "$TMP_LW" && \ + cd "$TMP_LW" && \ + make_install "$1" + rm_tmplw) + fi + } rm_tmplw() { [[ -d "$TMP_LW" || -f "$TMP_LW.zip" ]] && rm -rf "$TMP_LW"* ; } TMP_LW="/tmp/lux-wine.$RANDOM" if [ "$1" != "local" ] && \ @@ -407,15 +418,9 @@ install_lw() { cd "$TMP_LW/lux-wine-main" && \ make_install "$1" rm_tmplw) + else install_local_lw "$1" fi - elif [ -d "/opt/lwrap" ] - then - info_msg "Installing Lux Wine from container..." - (mkdir -p "$TMP_LW" && \ - cp -rf "/opt/lwrap"/!(runtime.tar.zst|prefix_backups) "$TMP_LW" && \ - cd "$TMP_LW" && \ - make_install "$1" - rm_tmplw) + else install_local_lw "$1" fi if is_lw then info_msg "Lux Wine installed!" @@ -770,6 +775,7 @@ try_dl() { fi if is_url "$URL" then + WGET_ARGS=(-q --no-check-certificate --content-disposition -t 3 -T 5 -w 0.5 "$URL" -O "$FILEDIR/$FILENAME") [ ! -d "$FILEDIR" ] && \ mkdir -p "$FILEDIR" if [[ "$NOT_TERM" == 1 && "$NO_DL_GUI" != 1 ]] && \ @@ -793,26 +799,62 @@ try_dl() { else return 1 fi } + dl_progress_pulsate() { + local ret=1 + [[ "$URL" =~ '&key=' ]] && \ + local URL="$(echo "$URL"|sed "s|\&key=.*||g")" + [[ "$URL" =~ '&' && ! "$URL" =~ '&' ]] && \ + local URL="$(echo "$URL"|sed "s|\&|\&|g")" + if is_exe_exist yad + then + local yad_args=( + --progress --pulsate --text="Download:\t$FILENAME\n$URL" + --width=650 --height=40 --undecorated --skip-taskbar + --no-buttons --text-align center --auto-close --auto-kill + --center --fixed --on-top --no-escape --selectable-labels + ) + "$@" & + local exec_pid="$!" + if [[ -n "$exec_pid" && -d "/proc/$exec_pid" ]] + then + (while [ -d "/proc/$exec_pid" ] + do echo -e "#\n" ; sleep 0.1 2>/dev/null + done)|yad "${yad_args[@]}" &>/dev/null & + local yad_pid="$!" + wait "$exec_pid" &>/dev/null + ret="$?" + kill "$yad_pid" &>/dev/null + fi + elif is_exe_exist zenity + then + "$@"|zenity --progress --pulsate --text="$URL" --width=650 --height=40 \ + --auto-close --no-cancel --title="Download: $FILENAME" + ret="$?" + fi + return "$ret" + } if [ "$NO_ARIA2C" != 1 ] && \ is_exe_exist aria2c then - aria2c -R -x 13 -s 13 --allow-overwrite --summary-interval=1 -o \ + aria2c --no-conf -R -x 13 -s 13 --allow-overwrite --summary-interval=1 -o \ "$FILENAME" -d "$FILEDIR" "$URL"|grep --line-buffered 'ETA'|\ sed -u 's|(.*)| &|g;s|(||g;s|)||g;s|\[||g;s|\]||g'|\ awk '{print$3"\n#Downloading at "$3,$2,$5,$6;system("")}'|\ dl_progress - elif is_exe_exist wget - then - wget --no-check-certificate --content-disposition -t 3 -T 5 \ - -w 0.5 "$URL" -O "$FILEDIR/$FILENAME"|& tr '\r' '\n'|\ - sed -u 's/.* \([0-9]\+%\)\ \+\([0-9,.]\+.\) \(.*\)/\1\n#Downloading at \1\ ETA: \3/; s/^20[0-9][0-9].*/#Done./'|\ - dl_progress elif is_exe_exist curl then curl -R --progress-bar --insecure --fail -L "$URL" -o \ "$FILEDIR/$FILENAME" |& tr '\r' '\n'|\ sed -ur 's|[# ]+||g;s|.*=.*||g;s|.*|#Downloading at &\n&|g'|\ dl_progress + elif is_exe_exist wget2 + then + dl_progress_pulsate wget2 "${WGET_ARGS[@]}" + elif is_exe_exist wget + then + wget "${WGET_ARGS[@]}"|& tr '\r' '\n'|\ + sed -u 's/.* \([0-9]\+%\)\ \+\([0-9,.]\+.\) \(.*\)/\1\n#Downloading at \1\ ETA: \3/; s/^20[0-9][0-9].*/#Done./'|\ + dl_progress else err_no_downloader fi @@ -820,14 +862,16 @@ try_dl() { else if [ "$NO_ARIA2C" != 1 ] && is_exe_exist aria2c then - aria2c -R -x 13 -s 13 --allow-overwrite -d "$FILEDIR" -o "$FILENAME" "$URL" - elif is_exe_exist wget - then - wget -q --show-progress --no-check-certificate --content-disposition \ - -t 3 -T 5 -w 0.5 "$URL" -O "$FILEDIR/$FILENAME" + aria2c --no-conf -R -x 13 -s 13 --allow-overwrite -d "$FILEDIR" -o "$FILENAME" "$URL" elif is_exe_exist curl then curl -R --progress-bar --insecure --fail -L "$URL" -o "$FILEDIR/$FILENAME" + elif is_exe_exist wget2 + then + wget2 --force-progress "${WGET_ARGS[@]}" + elif is_exe_exist wget + then + wget --show-progress "${WGET_ARGS[@]}" else err_no_downloader fi