Scripts version 2105

This commit is contained in:
castro-fidel
2022-05-06 15:08:59 +03:00
parent e99a88355a
commit 6b7621b251
11 changed files with 212 additions and 174 deletions

View File

@ -11,35 +11,15 @@
export TEXT_OPSSL=""
[[ -z `which openssl` ]] && export TEXT_OPSSL="Install openssl in your system!!!\n"
export PW_COMMENT_DB="${TEXT_OPSSL}Dwnload and start League of Legends can take a long time"
##export PW_WINDOWS_VER=10 # Set windows version 10, 7 or XP
##export PW_DLL_INSTALL="vcrun2017" # Install DDL in port prefix (used winetricks)
export WINEDLLOVERRIDES="mscoree,mshtml="
export LAUNCH_PARAMETERS="--launch-product=league_of_legends --launch-patchline=live" # Additional launch options
export PW_WINE_USE=WINE_LOL_GE_7.0-1
# export LAUNCH_PARAMETERS="--launch-product=league_of_legends --launch-patchline=live" # Additional launch options
export PW_WINE_USE=WINE_LOL_GE_7.0-2
export PW_VULKAN_USE=1
export PW_MUST_HAVE_DLL=""
export PW_PREFIX_NAME="LEAGUE_OF_LEGENDS"
##export PW_USE_DXR10=1
##export PW_VULKAN_NO_ASYNC=1 # Disabled ASYNC for VULKAN
##export PW_USE_NVAPI_AND_DLSS=0
##export PW_OLD_GL_STRING=1
##export PW_HIDE_NVIDIA_GPU=1
##export PW_FORCE_USE_VSYNC=0 # Vsync: 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT
##export PW_VIRTUAL_DESKTOP=1
##export VKD3D_CONFIG=force_bindless_texel_buffer,multi_queue
##export ENABLE_VKBASALT=1
##export PW_VKBASALT_EFFECTS="FakeHDR:cas" # Use Reshade in others games (dx9-12 to vulkan only)
##export PW_VKBASALT_FFX_CAS="0.75" # FidelityFX Contrast Adaptive Sharpening (min 0 - max 1)
export PW_NO_FSYNC=1 # Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no FUTEX_WAIT_MULTIPLE support.
export PW_NO_ESYNC=1 # Do not use eventfd-based in-process synchronization primitives
##export PULSE_LATENCY_MSEC=60 # Fix crackling audio in games
##export PW_NO_WRITE_WATCH=1 # Disable support for memory write watches in ntdll. This is a very dangerous hack and should only be applied if you have verified that the game can operate without write watches. This improves performance for some very specific games (e.g. CoreRT-based games).
##export PW_HEAP_DELAY_FREE=1
##export PW_WINE_ALLOW_XIM=1 # Disable XIM support until libx11 >= 1.7 is widespread
##export WINEARCH=win32 # defaut = win64
##export WINEPREFIX="${PORT_WINE_PATH}/data/pfx_lol"
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_USE_TERMINAL=1 # Force run in terminal
export PW_NO_FSYNC=1
export PW_NO_ESYNC=1
export PW_DISABLED_CREATE_DB=1
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
check_download_wine_ver_for_lol () {
@ -59,38 +39,39 @@ check_download_wine_ver_for_lol () {
}
check_download_wine_ver_for_lol
check_port_for_lol () {
"${pw_yad}" --progress --progress-text="Loading and start League of Legends. Please wait. It can take a long time!" \
--pulsate --no-buttons --undecorated --center --skip-taskbar --image="${PW_GUI_ICON_PATH}/covers/lol_cover.jpg" --image-on-top > /dev/null 2>&1 &
PW_YAD_PID_LOL="$!"
process=LeagueClientUx.exe
while [[ -z `pidof ${process}` ]] ; do
echo "PID ${process} not found"
sleep 1
done
uxpid=`pidof ${process}`
echo "LeagueClientUx pid: ${uxpid}"
port=$(xargs -0 < /proc/${uxpid}/cmdline | sed -n 's/.*--app-port=\([[:digit:]]*\).*/\1/p')
if [ ! -n $port ]; then
echo "Could not find port"
exit 1
fi
echo "Waiting for port ${port}"
kill -STOP ${uxpid}
timeout 200m /usr/bin/env bash -c "
until openssl s_client -connect :${port} <<< Q > /dev/null 2>&1 ; do
sleep 1
done"
kill -CONT ${uxpid}
kill -s SIGUSR1 "${PW_YAD_PID_LOL}"
}
# check_port_for_lol () {
# "${pw_yad}" --progress --progress-text="Loading and start League of Legends. Please wait. It can take a long time!" \
# --pulsate --no-buttons --undecorated --center --skip-taskbar --image="${PW_GUI_ICON_PATH}/covers/lol_cover.jpg" --image-on-top > /dev/null 2>&1 &
# PW_YAD_PID_LOL="$!"
# process=LeagueClientUx.exe
# while [[ -z `pidof ${process}` ]] ; do
# echo "PID ${process} not found"
# sleep 1
# done
# uxpid=`pidof ${process}`
# echo "LeagueClientUx pid: ${uxpid}"
# port=$(xargs -0 < /proc/${uxpid}/cmdline | sed -n 's/.*--app-port=\([[:digit:]]*\).*/\1/p')
# if [ ! -n $port ]; then
# echo "Could not find port"
# exit 1
# fi
# echo "Waiting for port ${port}"
# kill -STOP ${uxpid}
# timeout 200m /usr/bin/env bash -c "
# until openssl s_client -connect :${port} <<< Q > /dev/null 2>&1 ; do
# sleep 1
# done"
# kill -CONT ${uxpid}
# kill -s SIGUSR1 "${PW_YAD_PID_LOL}"
# }
add_in_start_portwine () {
if [ "$(cat /proc/sys/abi/vsyscall32)" -ne 0 ] ; then
pw_stop_progress_bar
zenity --question --title="Fix for LoL anti-cheat" \
--text='Root rights are required to execute the command: \n"sysctl -w abi.vsyscall32=0"' --no-wrap
[ "$?" = 1 ] && exit 0
pkexec /usr/bin/env bash -c 'sysctl -w abi.vsyscall32=0'
fi
check_port_for_lol &
# check_port_for_lol &
}