kyechou / leagueoflegends

League of Legends install and launch wrapper for Linux
https://www.leagueoflegends.com
GNU General Public License v3.0
290 stars 23 forks source link

cannot find 'Z:\home\user\.local\share\leagueoflegends\LOL\LeagueClient.exe #3

Closed S7uX closed 4 years ago

S7uX commented 4 years ago

Hi, I get this error after installation when I run "leagueoflegends launch"

kyechou commented 4 years ago

Hi @S7uX, can you verify if the file ("/home/user/.local/share/leagueoflegends/LOL/LeagueClient.exe") exists? If it does exist, is the script you're using of the latest release? I got a similar error a few days ago and this commit (f9cfda1) fixed the issue that I had.

S7uX commented 4 years ago

Thank you for your quick response! The file exists. I installed the aur package today.

kyechou commented 4 years ago

Ok, thanks for verifying. I'll try to install from the AUR package as soon as I can and see if I can reproduce the error.

kyechou commented 4 years ago

Hi @S7uX, I can't seem to reproduce the issue. I tried on a new, vanilla Arch setup, and the game launched successfully after the install. If you still have the issue, please provide the "/usr/bin/leagueoflegends" script and the log output when you launch the game, with something like leagueoflegends launch | tee launch.log, since copy-pasting may mess up some invisible characters in the log. Thanks.

S7uX commented 4 years ago

Hi, thank you for your efforts!

launch.log:

000b:fixme:winediag:start_process Wine Staging 5.6 is a testing version containing experimental patches.
000b:fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org.
INFO: Starting game
'ine: cannot find 'Z:\home\user\.local\share\leagueoflegends\LOL\LeagueClient.exe

/usr/bin/leagueoflegends:

#!/bin/bash
set -e

############################################################
## Logging functions
############################################################
INFO() { echo "INFO: $*"; }
WARN() { echo "WARN: $*"; }
ERRO() { echo "ERRO: $*"; exit 1; }

############################################################
## Ask question to user
############################################################
function askQ () {
  count=1
  first_arg="$2"
  echo
  echo "    $1"
  for var in "${@:2}"
  do
    echo "    #$count - $2"
    ((count++))
    shift
  done
  echo
}

############################################################
## Check dependencies
############################################################
deps=("wine" "wineboot" "winetricks" "winepath" "winecfg" "wineserver" "wget")
check_dep() { command -v "$1" >/dev/null 2>&1 || ERRO "Missing $1"; }
for dep in ${deps[@]}; do
    check_dep "$dep"
done

############################################################
## Preset default variable values
############################################################
export PATH="/opt/wine-lol/bin:$PATH"
export CONF="/etc/leagueoflegends.conf"
export USER_CONF="$HOME/.config/leagueoflegends.conf"
export REGFILE="/usr/share/doc/leagueoflegends/leagueoflegends.reg"
export CACHE_DIR="$HOME/.cache/leagueoflegends"
export LOL_CLIENT_BIN="LeagueClient.exe"
export WINEARCH=win32
export WINEDLLOVERRIDES="msvcp140=n,b"
export WINE_REQ_MOD=("d3dx9" "corefonts" "vcrun2017" "win7")
export BASE_DIR="$HOME/.local/share/leagueoflegends"
export WINEPREFIX="$BASE_DIR/wine.$WINEARCH"
export INSTALL_PATH="$BASE_DIR/LOL"
export CLIENT_PATH="$(find "$INSTALL_PATH" -name "$LOL_CLIENT_BIN" 2>/dev/null \
                    | sort | head -n1)"
export PREFIXCOMMAND
export MESA_GLTHREAD=true
export __GL_THREADED_OPTIMIZATIONS=0

############################################################
## Load configuration files
############################################################
source "$CONF" >/dev/null 2>&1 || ERRO "Missing $CONF"
[ -f "$USER_CONF" ] && source "$USER_CONF"

############################################################
## Check arguments
############################################################
case "$1" in
    launch)
        [ -z "$CLIENT_PATH" ] && ERRO "Game is not properly installed"
        CLIENT_PATH="$(winepath -w "$CLIENT_PATH")"
        INFO "Starting game"
        $PREFIXCOMMAND wine "$CLIENT_PATH"
        exit 0
        ;;
    install)
        [ -n "$CLIENT_PATH" ] && ERRO "Game has been installed"
        ;;
    uninstall)
        rm -rf "$USER_CONF" "$CACHE_DIR" "$BASE_DIR" "$WINEPREFIX" \
            "$INSTALL_PATH"
        exit 0
        ;;
    cleanup_logs)
        INFO "Removing log files"
        [ -d "$BASE_DIR" ] && {
            find -H "$BASE_DIR" -name "*.log" -delete -print
            [ -d "$INSTALL_PATH" ] && {
                find -H "$INSTALL_PATH" -name "*.log?" -delete -print
                [ -d "$INSTALL_PATH/Logs" ] && {
                    find -H "$INSTALL_PATH/Logs" -type f -delete -print
                    find -H "$INSTALL_PATH/Logs" -empty -delete -print
                }
            }
        }
        exit 0
        ;;
    winecfg|wineserver|winetricks)
        ARG="$1"; shift; exec "$ARG" "$@"
        ;;
    make_wineprefix|regen_wineprefix) : ;;
    *)
        echo "League of Legends - helper program"
        echo "Usage: $0 <command>"
        echo "Commands:"
        echo "    launch            - Launch LoL"
        echo "    install           - Install LoL"
        echo "    uninstall         - Uninstall LoL"
        echo "    cleanup_logs      - Remove log files"
        echo "    winecfg           - Run winecfg with WINEPREFIX"
        echo "    wineserver [...]  - Run wineserver with WINEPREFIX"
        echo "    winetricks [...]  - Run winetricks with WINEPREFIX"
        echo "    make_wineprefix   - Create WINEPREFIX only"
        echo "    regen_wineprefix  - Backup and recreate WINEPREFIX"
        exit 1
        ;;
esac

############################################################
## Create directories if needed
############################################################
[ ! -d "$BASE_DIR" ] && {
    INFO "Creating directory $BASE_DIR"
    mkdir -p "$BASE_DIR"
}
[ ! -d "$CACHE_DIR" ] && {
    INFO "Creating directory $CACHE_DIR"
    mkdir -p "$CACHE_DIR"
}
[ ! -d "$INSTALL_PATH" ] && {
    INFO "Creating directory $INSTALL_PATH"
    mkdir -p "$INSTALL_PATH"
}
[ ! -d "$WINEPREFIX" ] && {
    INFO "Creating and initializing $WINEPREFIX"
    env WINEDLLOVERRIDES="mscoree,mshtml=" wineboot -i >/dev/null 2>&1
}
INFO "Latest tested version: wine-3.21"
INFO "Your version: $(wine --version)"

############################################################
## Prepare the WINE environment
############################################################
if [ ! -f "$WINEPREFIX/winetricks.log" ]; then
    INFO "Installing verbs via winetricks"
    winetricks -q --optout "${WINE_REQ_MOD[@]}" \
        || ERRO "Failed to install required modules via winetricks"
fi
for link in "$WINEPREFIX/dosdevices"/*; do
    [[ "$link" =~ 'c:' ]] && continue # For default link to ../drive_c
    [[ "$link" =~ 'z:' ]] && continue # For default link to /
    INFO "Removing unnecessary device $link"
    rm -vf "$link"
done
INFO "Linking install path to $INSTALL_PATH"
ln -Tfsr "$INSTALL_PATH" "$WINEPREFIX/dosdevices/c:/Program Files/League of Legends"
INFO "Modifying WINE registry"
wine regedit "$REGFILE"

############################################################
## make_wineprefix ends here
############################################################
[ "$1" == "make_wineprefix" ] && exit 0

############################################################
## Install League of Legends
############################################################
askQ "Select your region" "North America" "EU West" "EU Nordic & East" "Latin America North" "Latin America South" "Brazil" "Turkey" "Russia" "Japan" "Oceania" "Republic of Korea"
read -p "    #: " answer

case "${answer}" in
    1)
        # North America
        export LANG_CODE="NA"
        ;;
    2)
        # EU West
        export LANG_CODE="EUW"
        ;;
    3)
        # EU Nordic & East
        export LANG_CODE="EUNE"
        ;;
    4)
        # Latin America North
        export LANG_CODE="LA1"
        ;;
    5)
        # Latin America South
        export LANG_CODE="LA2"
        ;;
    6)
        # Brazil
        export LANG_CODE="BR"
        ;;
    7)
        # Turkey
        export LANG_CODE="TR"
        ;;
    8)
        # Russia
        export LANG_CODE="RU"
        ;;
    9)
        # Japan
        export LANG_CODE="JP"
        ;;
    10)
        # Oceania
        export LANG_CODE="OC1"
        ;;
    11)
        # Republic of Korea
        export LANG_CODE="KR"
        ;;
esac

export INSTALLER="$CACHE_DIR/LoL_installer_$LANG_CODE.exe"

if [ "$LANG_CODE" = "KR" ]; then
    export INSTALLER_URL="https://riotgamespatcher-a.akamaihd.net/KR_CBT/installer/deploy/League of Legends installer KR.exe"
else
    export INSTALLER_URL="https://riotgamespatcher-a.akamaihd.net/releases/live/installer/deploy/League%20of%20Legends%20installer%20$LANG_CODE.exe"
fi

INFO "Downloading installer"
wget -cO "$INSTALLER" "$INSTALLER_URL"
[ -z "$CLIENT_PATH" ] && {
    INFO "Installing League of Legends"
    wine "$INSTALLER" \
        --license_agreement 1 \
        --mode unattended \
        --installdir "$INSTALL_PATH"
}
echo
INFO "League of Legends installed!"
INFO
INFO "The game is installed in $INSTALL_PATH"
INFO "with WINEPREFIX=$WINEPREFIX"
echo

############################################################
## regen_wineprefix ends here
############################################################
[ "$1" == "regen_wineprefix" ] && {
    [ -d "${WINEPREFIX}.backup" ] && \
        ERRO "Backup of ${WINEPREFIX} already exist"
    INFO "Backup prefix: ${WINEPREFIX}.backup"
    mv "${WINEPREFIX}" "${WINEPREFIX}.backup"
    INFO "Recreating wineprefix"
    exec "$0" make_wineprefix
}

############################################################
## Cleanup the wine-generated user menus
############################################################
rm -rf \
    ~/.config/menus/applications-merged/wine-Programs-League\ of\ Legends-* \
    ~/.local/share/applications/wine/Programs/League\ of\ Legends \
    ~/.local/share/applications/wine-extension-*.desktop \
    ~/.local/share/applications/mimeinfo.cache

# vim: set ts=4 sw=4 et:
kyechou commented 4 years ago

Hi @S7uX, so it seems that the package you're using is not updated. The script is of an older version. What's the package version in your setup (pacman -Q leagueoflegends-git)? Hope I didn't forget to update the AUR version. And could you try to update or reinstall the AUR package and then launch the game again please? That should solve the problem.

S7uX commented 4 years ago

It works!

pacman -Q leagueoflegends-git: leagueoflegends-git 0.13.r35.g6aea994-1

After the reinstallation: leagueoflegends-git v0.10.12.r0.gc44d767-1

Warning in German about a downgrade: Warnung: Downgrade des Paketes leagueoflegends-git (0.13.r35.g6aea994-1 => v0.10.12.r0.gc44d767-1)

I think pacman did not want to update your package because it interpreted 0.13.r35.g6aea994-1 as a newer version.

kyechou commented 4 years ago

Ah I see. I did change the version scheme last year to follow the LoL official patch versions when I started managing the AUR package. I'll leave a comment in the AUR comment section. Thanks!