So there is another guide on how to make league work on Linux, but it seems a bit outdated, so I decided to make a new one, using the previous how to and the winehq how to:
previous one: http://na.leagueoflegends.com/board/showthread.php?t=1946188
winehq: http://appdb.winehq.org/objectManager.php?sClass=version&iId=19141
Any feedback is welcome.
Last update 14/05/2012: PlayonLinux now offers a compiled wine patched with the latest fixes.
I. Getting the good version of wine to run LoL
As most probably know, LoL doesn't work anymore with default builds of wine, we need to patch it to make it work. There are two ways I know of to get a working version of wine. I advise the easy way, since the result will be the same and it doesn't require to compile wine yourself.
A. Getting wine, the hard way
The hard way consists of compiling wine yourself after applying the patches. I won't describe everything, because I'm far from being an expert on this domain.
Get the source of wine here (I recommend using the latest version possible, 1.5.3 as I am writing this): http://sourceforge.net/projects/wine/files/Source/
Get the patches:
Ranma42 provided us with two necessary patches here: http://uz.sns.it/~ranma42/iLoL/spectator-fix-v3/
0001-ntdll-Improve-performace-of-heap-allocation-v2.patch will allow you to get good fps
0002-imm32-Avoid-deadlock-when-destroying-thread-data-v2.patch will allow you not to crash during loading of a game
It seems that for most of us, the store is crashing the game. I just found on winehq 3 patches from Adam Martinson that make the store kind of work (sometimes the store doesn't load and I just have a black screen, it has some graphics glitches and the runes part is really long to load, but I was able to unlock a champion):
http://bugs.winehq.org/attachment.cgi?id=39446
http://bugs.winehq.org/attachment.cgi?id=39447
http://bugs.winehq.org/attachment.cgi?id=39449
Compile wine (I can't help you much here, you should check winehq website or use the easy way below).
B. Getting wine, the easy way
The easy way to get wine is to get an already compiled and patched build of wine. Your distribution won't provide it, but PlayonLinux http://www.playonlinux.com/en/ will.
PlayonLinux is a really nice tool that allows you to do some sweet things, but the main point is that it has a wine version manager that allows you to download any version you want and keep as many as you want without altering the one from your distribution.
And we can request a specific build of wine with specific patches!
So install PoL (it is probably in your repositories). Open it, clic on Tools > Manage wine versions.
You'll see a lot of versions, for 32bits and 64bits. Even if your system is 64bits, take the 32bits versions. The one you want is the 1.5.3-LeagueOfLegends. Install it. That version contains the 5 patches mentioned earlier and should run LoL without any problems
Every version you install will be installed in ~/.PlayonLinux/wine/<architecture>/<version>/ You can install as many as you want so that you can use a different version for every windows game you have, that's why PoL is great.
II. Install LoL
A. Create a wineprefix and install all the needed stuff
A wineprefix is a wine environment that contains a virtual windows drive and it's registry and wine's configuration. The default one is ~/.wine
I personally like to use a different wineprefix for every game I have instead of using the same ~/.wine for every game, since they often require specific dll and configs. Using a specific wineprefix for LoL will ensure that installing another game won't mess up you LoL's installation.
More information on wineprefixes here: http://wiki.jswindle.com/index.php/Wine_Prefixes
So just create an empty directory that will be your wineprefix where you want your LoL's install.
Download winetricks from here: http://wiki.winehq.org/winetricks and save the script somewhere
Open your favorite terminal and run those two commands commands:
export WINEPREFIX=/path/to/your/wineprefix/
export WINE=/home/<user>/.PlayOnLinux/wine/linux-x86/1.5.3-LeagueOfLegends/bin/wine (or adapt to the path of your wine if you compiled it yourself)
The first command tells wine to use the specified wineprefix instead of the default ~/.wine.
The second tells the winetricks to use the specified wine instead of the default one in /usr/bin/. This is especially useful for 64 bits users. Not doing so will let winetricks use the 64 bits wine from your distribution's repository to create a 64 bits wineprefix and will prevent you to install the game later.
IMPORTANT NOTE: those two commands are modifying environment variables, and are only valid for your current terminal and until you close it. They are forgotten as soon as you close your terminal.
You need to have the WINEPREFIX variable set every time you launch one of the commands below in sections II. and III. A.
You need to have the WINE variable set for the rest of this section.
In doubt, launch the commands again before you do something, that won't hurt.
Now let's use winetricks to actually create the wineprefix and install all the needed stuff:
cd /path/to/where/you/saved/winetricks/
Launch winetricks with
sh ./winetricks
In the new window, select the default wineprefix > OK
Check that the title of the window now display the good wineprefix (if not, you probably failed to launch the export WINEPREFIX command (and maybe the export WINE too), close winetricks and go back to the start of this section).
Install a windows dll or component > OK
check d3dx9, vcrun2005 and wininet > OK (you don't need adobeair and ie6, they come with the game)
Winetricks will install all that's needed for LoL to work.
B. Install LoL
Donwload the game from here: http://signup.leagueoflegends.com/en/signup/redownload
From your terminal, be sure that WINEPREFIX is set (launch the export WINEPREFIX command again if in doubt) and
cd /path/to/where/you/saved/LeagueofLegends.exe
Launch the installation with the good version of wine, by using that command:
/home/<username>/.PlayOnLinux/wine/linux-x86/<version>/bin/wine ./LeagueofLegends.exe (adapt the path if you compiled wine yourself and put it somewhere else).
Follow the installation, keep the default install folder (it will be in the wineprefix you specified). You're nearly good to go!
Note: you can install the game in another location, even outside of your wineprefix if you want, it will work, you'll just have to adapt the paths accordingly. It may be useful for some people who may want to keep the wineprefix and the game directory separated. If you want to test some things about your wine settings or the windows components installed through winetricks, you can just save your wineprefix, test what you want and restore the saved one.
If you install the game outside of your wineprefix, your save will be around ~200 MB, if the wineprefix contains the installation directory, it will be ~4GB. If you don't plan to, I see no point in installing the game not at the default location.
III. Configure wine, your system, and play
A. configure wine and your system
From your terminal (again, be sure WINEPREFIX is set), launch winecfg with
/home/<username>/.PlayOnLinux/wine/linux-x86/<version>/bin/winecfg (again, adapt if needed).
In the applications tab, put your windows version to windows 7
In the graphics tab check the 4 top boxes. The virtual desktop will let you alt-tab and ctrl-alt-right/left without problems.
If you define its size as the same as your screen, it will create a borderless virtual desktop taking exactly the whole screen, allowing you to play in fullscreen.
Your window manager can make a huge difference in performance. the best one is xfmw4 (form xfce4, install it if you don't have it and need more fps) that will give you 15~20 fps more than compiz for example.
When you want to play LoL (and any games through wine actually) you should switch to it. You don't need to log out then in xfce, you can just change your window manager from within your gnome/kde/whatever session. I use fusion-icon for that to switch between compiz and xfmw4.
B. Play LoL
To play LoL, you need to launch a series of commands. You should create a launching script in order to launch the game in one click/command. A simple one would be this one lol_launch.sh (adapt it for your wineprefix, wine version and preferences):
Make it executable, and use "lol_launch.sh" to start LoL
Quote:
#!/bin/bash
echo "Starting League of Legends"
export WINEPREFIX=/path/to/your/wineprefix/
export WINEDEBUG=-all
cd /path/to/your/wineprefix/drive_c/Riot\ Games/League\ of\ Legends/rads/system/
/home/<user>/.PlayOnLinux/wine/linux-x86/<version>/bin/wine "rads_user_kernel.exe" run lol_launcher $(ls ../projects/lol_launcher/releases/) LoLLauncher.exe
And now, go teach windows users that gnu/linux users do play games and are as good as them!
LAST NOTE: new LoL patches may break the game at any time, since wine is not perfect, like it did with the spectator patch. When a new patch is released, it is strongly advised to try a custom game to see if the game is still working fine.
During the spectator patch, everything was working fine, even spectating a game but a bug in wine made it so that the game was always crashing during the loading screen, if you were trying to play, not to spectate. Some users got bans for leaving ranked games, so be careful!
IV. Known bugs
This is the list of bugs I encountered with wine 1.5.3, the 5 patches mentioned with Nvidia proprietary drivers. If you have some others, tell me (and your configuration), I'll add them.
- The launcher is sometimes stuck at 0 or 33%. Just closing it and relaunching it (a few times sometimes) solves the problem.
- pvp has a few graphical glitches, but nothing much.
- Modifying the rune pages in the profile doesn't work very well and often crash the game, so save them often when you modify them. The only way I found to add/remove runes is to double click them (right click and drag and drop don't work).
- The store sometimes don't load and display a black page. Switching to the profile page then to the store again usually loads it.
- The runes part in the store is awfully long to load, and I mean up to 7 minutes in my case, but it eventually loads.
- An ATI user reported lots of graphical glitches in game