Skip to content

Instantly share code, notes, and snippets.

@HoKim98
Last active May 30, 2019 08:33
Show Gist options
  • Save HoKim98/92b3c8dd1ab4d6bec57a66390162f477 to your computer and use it in GitHub Desktop.
Save HoKim98/92b3c8dd1ab4d6bec57a66390162f477 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Fix: League of Legends 9.10 Crash after champ select
# Reddit: https://www.reddit.com/r/leagueoflinux/comments/bpjxg0/a_proofofconcept_hack_makes_post910_playable_again/
# WineHQ: https://bugs.winehq.org/show_bug.cgi?id=47198
# Assert no files *here*
PWD=`pwd`
if [ "$(ls -al | wc -l)" -gt "4" ]
then
echo "Please make current directory clean (no files)"
echo "Current directory : ${PWD}"
echo "Or, make an empty directory"
exit 1
fi
# Download glibc
git clone git://sourceware.org/git/glibc.git ./glibc-source
cd glibc-source
# Apply patch to glibc
curl -o poc-glibc.diff https://bugs.winehq.org/attachment.cgi?id=64482
git apply poc-glibc.diff
# Build & install glibc
mkdir build
cd build
../configure --prefix=/usr/local
make -j4 && make install
cd ../..
# Download wine-staging
git clone https://github.com/wine-compholio/wine-staging ./wine-staging-source
cd wine-staging-source
git clone git://source.winehq.org/git/wine.git ./wine-source
# Apply patches to wine
# ** It does not seem to work properly **
./patches/patchinstall.sh DESTDIR="./wine-source" --all
cd wine-source
curl -o poc-wine.diff https://bugs.winehq.org/attachment.cgi?id=64481
git apply poc-wine.diff
# Build & install wine-staging
mkdir build
cd build
../configure --prefix=/usr/local --enable-win64
make -j4 && make install
# Symlink wine from wine64
cd /usr/local/bin
ln -s wine64 wine
# Clean
cd ${PWD}
rm -rf glibc-source
rm -rf wine-staging-source
@HoKim98
Copy link
Author

HoKim98 commented May 18, 2019

@Iyashi
Copy link

Iyashi commented May 30, 2019

$ ./patches/patchinstall.sh DESTDIR="./wine-source" --all
Applying /media/gaming/lol/wine-staging-source/patches/Compiler_Warnings/0009-ws2_32-tests-Work-around-an-incorrect-detection-in-G.patch
Applying /media/gaming/lol/wine-staging-source/patches/Compiler_Warnings/0018-Appease-the-blessed-version-of-gcc-4.5-when-Werror-i.patch
Applying /media/gaming/lol/wine-staging-source/patches/Compiler_Warnings/0019-dsound-Avoid-implicit-cast-of-interface-pointer.patch
error: Anwendung des Patches fehlgeschlagen: dlls/dsound/primary.c:626
error: dlls/dsound/primary.c: Patch konnte nicht angewendet werden
ERROR: Failed to apply patch, aborting!

Well, you said so in the comment, but it was still worth a try .. I'm not a wine-pro but already invested days for RIOT, that was my last try, I guess.

Anyway thanks for the script. It may have worked 12 days ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment