kyechou / leagueoflegends

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

Replays were incorrectly merged! #66

Closed BeetMacol closed 2 years ago

BeetMacol commented 2 years ago

Hi, yesterday you merged my replay PR (#65).

Before merging, you made a few changes and one of them breaks the replay command (at least for me)! The League of Legends game EXE does not work when started from outside its directory - that's why I added the pushd and popd lines.

The issue

After running leagueoflegends replay replay.rofl, League of Legends logs the following error, and a popup is displayed before crashing.

League of Legends.exe(00000144): ALWAYS| Wrote soft repair file to Z:\home\macol\documents\League of Legends\Replays/../SOFT_REPAIR. This will cause the patcher to repair your installation.
League of Legends.exe(00000144):  ERROR| ALE-18967991 FATAL ERROR - Installation is corrupt. WadFile mount failed.
 - WadFile: DATA/FINAL/Bootstrap.windows.wad.client
 - Problem: Missing

Suggested change

The line 354:

    wine "$(winepath -w "$GAME_EXE")" "$(winepath -w "$1")"

should be changed back to my original code:

    replayPath=$(winepath -w "$1")
    pushd "$GAME_EXE_DIR"
    exec wine "$(winepath -w "$GAME_EXE")" "$replayPath"
    popd
kyechou commented 2 years ago

Thank you @BeetMacol! I wanted the script to wait for the wine processes to terminate gracefully, and to suppress unnecessary logging. Anyway, I pushed a new commit just now. Please let me know if it works!

BeetMacol commented 2 years ago

It's almost fine now. This time though, relative replay paths will not work correctly as you change the directory before $(winepath -w "$1")... It should be perfectly fine for absolute paths.

kyechou commented 2 years ago

I don't have a setup to test with, so thanks a lot for letting me know! Hope it's fixed now.

BeetMacol commented 2 years ago

Yeah, seems to be fine now. Sorry for late reply. Thank you for adding the feature!