League of Legends 3.17 KB
Newer Older
1
#!/usr/bin/env bash
2 3
#Author: xuser
#LeagueClient.exe
4
#RiotClientServices.exe
5
#Install League of Legends ru.exe
6
#Install League of Legends na.exe
7
#Install League of Legends euw.exe
8
#live.na.exe
9 10
#Rating=1-5
#####################examples###########################
11 12
export TEXT_OPSSL=""
[[ -z `which openssl` ]] && export TEXT_OPSSL="Install openssl in your system!!!\n"
castro-fidel's avatar
castro-fidel committed
13
export PW_COMMENT_DB="${TEXT_OPSSL}Dwnload and start League of Legends can take a long time"
Mikhail Tergoev's avatar
Mikhail Tergoev committed
14
export WINEDLLOVERRIDES="mscoree,mshtml="
fidel's avatar
fidel committed
15
export LAUNCH_PARAMETERS="--launch-product=league_of_legends --launch-patchline=live"              # Additional launch options
Mikhail Tergoev's avatar
Mikhail Tergoev committed
16
export PW_WINE_USE=WINE_LOL_GE_7.0-5
castro-fidel's avatar
castro-fidel committed
17 18 19 20 21 22 23
export PW_VULKAN_USE=1
export PW_MUST_HAVE_DLL=""
export PW_PREFIX_NAME="LEAGUE_OF_LEGENDS"
export PW_NO_FSYNC=1
export PW_NO_ESYNC=1
export PW_DISABLED_CREATE_DB=1
export PW_USE_D3D_EXTRAS=1
Mikhail Tergoev's avatar
Mikhail Tergoev committed
24
export DXVK_STABLE_VER="1.10.2"
castro-fidel's avatar
castro-fidel committed
25
##export PW_GUI_DISABLED_CS=1                     # 1 = disabled GUI
26

27
check_download_wine_ver_for_lol () {
castro-fidel's avatar
castro-fidel committed
28 29 30 31 32
    if [ ! -d "${PORT_WINE_PATH}/data/dist/${PW_WINE_USE}" ] ; then
        if try_download "github.com/Castro-Fidel/wine_builds/releases/download/${PW_WINE_USE}/${PW_WINE_USE}.tar.xz" \
        "${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz" ; then
            if unpack_tar_xz "${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz" "${PORT_WINE_PATH}/data/dist/" ; then
                try_remove_file "${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz"
33 34
                UNPACK_STATUS=0
            else
castro-fidel's avatar
castro-fidel committed
35 36
                try_remove_file "${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz"
                try_remove_dir "${PORT_WINE_PATH}/data/dist/${PW_WINE_USE}"
37 38 39 40 41 42 43
            fi
        fi
        [[ "${UNPACK_STATUS}" != 0 ]] && exit 1
    fi
}
check_download_wine_ver_for_lol

Mikhail Tergoev's avatar
Mikhail Tergoev committed
44
# check_port_for_lol () { 
castro-fidel's avatar
castro-fidel committed
45 46 47
#     "${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 4>&1 &
#     PW_YAD_PID_LOL="$!"
Mikhail Tergoev's avatar
Mikhail Tergoev committed
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
#     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}
castro-fidel's avatar
castro-fidel committed
67
#     kill -s SIGUSR1 "${PW_YAD_PID_LOL}"
Mikhail Tergoev's avatar
Mikhail Tergoev committed
68
# }
69

70
add_in_start_portwine () {
fidel's avatar
fidel committed
71 72
    echo ""
    # if [ "$(cat /proc/sys/abi/vsyscall32)" -ne 0 ] ; then
castro-fidel's avatar
castro-fidel committed
73
    #     pw_stop_progress_bar
fidel's avatar
fidel committed
74 75 76 77 78
    #     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
Mikhail Tergoev's avatar
Mikhail Tergoev committed
79
    # check_port_for_lol &
80
}