Linux wine国服LOL英雄联盟,完美运行!!
Tofloor
poster avatar
zhtengw
deepin
2013-03-20 21:26
Author
Linux下玩国服LOL,国服哦。
网络上随处都可以搜到wine美服LOL的教程,但腾讯运营的国服客户端跟美服原版相差比较大,按照美服的方式不能搞起国服LOL,由于宿舍文化,这几天我专注于wine一个国服LOL,对照winehq网站上的LOL相关的bug列表和美服的配置方法,试了各种patch,最后得到了满意的结果。
大家来看!!

OS: Fedora 19
Arch: x86
CPU: Intel(R) Core(TM)2 Duo CPU T5870 @2.00GHz
VideoCard: Nvidia GForce G105M
Memory: 4G

[color=#BF0000:23xr9fys]需要[/color:23xr9fys]:
[color=#BF0000:23xr9fys]打过补丁的wine、LOL国服完整安装包、winetricks、反TP补丁[/color:23xr9fys]

(在我以前的教程里,是需要打两个补丁的,LOL更新到3.0.9.x以后,使用打了第一个补丁的wine会经常出现“因为未知原因,无法登陆”的错误,而对于1.5.29之前的wine,若不打这第一个补丁,又肯定会崩溃,所以我更新了教程,使用最新的开发版wine。)
我使用的wine版本是1.6-rc2,这里需要加上补丁重新编译,补丁主要解决以下问题:
1、游戏中点击商店崩溃。
    0001-HACK-Disallow-block-based-textures-with-sub-block-si-1.6-rc2.txt

下面详细讲一下操作过程。

[color=#FF0000:23xr9fys]一、给wine打补丁,并编译[/color:23xr9fys]
首先咱们编译wine,(如果您觉得编译太麻烦,可以直接用我编译好的wine,看帖子最底下,不过,自己编译的应该还是比较适合自己的系统)
[color=#FF0000:23xr9fys]对于64位的ubuntu系统,编译wine实在太麻烦,本人没用过ubuntu,不敢做过多讲解,有朋友在折腾后给出了详细的教程,见http://forum.ubuntu.org.cn/viewtopic.php?f=121&t=443064,感谢243750496朋友。[/color:23xr9fys]
先下载wine的源码,解压出来
  1. tar xvf wine-1.6-rc2.tar.bz2
  2. cd wine-1.6-rc2
Copy the Code
下载上面的补丁(适用于wine-1.6-rc2~wine-1.6),给源码打上
  1. patch -p1 < 0001-HACK-Disallow-block-based-textures-with-sub-block-si-1.6-rc2.txt
Copy the Code
接着咱们来编译
  1. ./configure
Copy the Code
为避免影响系统安装的wine,可以指定新的prefix
  1. ./configure --prefix=/opt/lol-wine
  2. make depend
  3. make
  4. sudo make install
Copy the Code

[color=#FF0000:23xr9fys]二、配置wine环境[/color:23xr9fys]
接着,到http://winetricks.org/winetricks 下载最新的winetricks(如果网页打开的是winetricks的源代码,可以右键点击另存为),当然,发行版有提供也行啦,只不过发行版上提供的可能会比较老,下载一些DLL时会有404错误。
把下载的winetricks放到/usr/bin下,并加上可执行权限。
  1. chmod +x winetricks
  2. sudo cp -a winetricks /usr/bin/winetricks
Copy the Code

配置wine,这里我是定义另一个WINEPREFIX,以跟本机上原来的wine配置分开,
我们先执行
  1. export WINEVERPATH=/opt/lol-wine
  2. export PATH=$WINEVERPATH/bin:$PATH
  3. export WINESERVER="$WINEVERPATH/bin/wineserver"
  4. export WINELOADER="$WINEVERPATH/bin/wine"
  5. export WINEDLLPATH="WINEVERPATH/lib/wine/fakedlls"
  6. export LD_LIBRARY_PATH="$WINEVERPATH/lib:$LD_LIBRARY_PATH"
Copy the Code

接着再来
  1. mkdir ~/LOL
  2. WINEPREFIX=~/LOL/.wine WINEARCH=win32 $WINEVERPATH/bin/winecfg
Copy the Code
# WINEARCH=win32是设定wine为32位的,使用32位的Windows软件,这在64位Linux系统是必须的,然后设定Windows版本为xp。
  1. WINEPREFIX=~/LOL/.wine winetricks vcrun2005 corefonts d3dx9 wininet dotnet20 dotnet35 ie6 win7 adobeair glsl-disable mfc42
Copy the Code
# 用winetricks安装一些Windows组件,执行的时候请务必关注终端的提示信息;注意,在安装.Net framework 3.5的时候,进度条可能会在满格时卡住,没关系,kill掉wine和winetricks的进程后重新执行此命令就行了。

然后,我们再执行一下
  1. WINEPREFIX=~/LOL/.wine WINEARCH=win32 $WINEVERPATH/bin/winecfg
Copy the Code
,确保此时Windows版本是Windows 7。

[color=#FF0000:23xr9fys]三、安装LOL[/color:23xr9fys]
好,接下来安装LOL,大家自行到官网去下载安装包,我用的是从17173上下的完整安装包:
  1. WINEPREFIX=~/LOL/.wine $WINEVERPATH/bin/wine 17173_LOL_V3.0.7.9_FULL.exe
Copy the Code
[color=#FF0000:23xr9fys]注意,如果出现“不能打开要写入的文件”的错误,请确认自己执行winetricks的时候成功安装了dotnet20和dotnet35。[/color:23xr9fys]


[color=#FF0000:23xr9fys]四、应用反TP补丁(重要!)[/color:23xr9fys]
安装完成以后,找到游戏目录下的Game/League of Legends.exe,备份好后用反TP补丁替换,反TP补丁主要是解决选好英雄后进入游戏时崩溃,反TP补丁见
帖子下方。
[color=#FF0000:23xr9fys]注意,每次更新LOL后都要检查一下League of Legends.exe文件有没有变化,如果没变,咱就继续L吧,如果有,去看一下反TP补丁有没有更新!![/color:23xr9fys]

[color=#FF0000:23xr9fys]五、运行游戏[/color:23xr9fys]
运行游戏时,切换到游戏目录下的TCLS/目录,执行
  1. WINEPREFIX=~/LOL/.wine $WINEVERPATH/bin/wine Client.exe
Copy the Code

我们可以自建一个desktop文件,这里假设您wine是安装到/opt/lol-wine,
  1. [Desktop Entry]
  2. Name=League of Legends
  3. Name[zh_CN]=英雄联盟
  4. Exec=WINEVERPATH="$HOME/tools/lol-wine-1.6-rc2" PATH="$WINEVERPATH/bin:$PATH" WINESERVER="$WINEVERPATH/bin/wineserver" WINELOADER="$WINEVERPATH/bin/wine" WINEDLLPATH="$WINEVERPATH/lib/wine/fakedlls" LD_LIBRARY_PATH="$WINEVERPATH/lib:$LD_LIBRARY_PATH"  WINEPREFIX=$HOME/.lol-wine $WINEVERPATH/bin/wine ~/documents/LOL/英雄联盟/TCLS/Client.exe
  5. Type=Application
  6. StartupNotify=true
  7. Icon=lol
Copy the Code
[color=#FF0000:23xr9fys]WINEVERPATH=/opt/lol-wine请根据自己的wine安装目录修改,且务必将“$HOME/documents/LOL/英雄联盟/TCLS/Client.exe”改成您自己的Client.exe的路径[/color:23xr9fys]。然后将内容保存为“英雄联盟.desktop”放到桌面上。再将这个图标下载下来,放到~/.local/share/icons/hicolor/64x64/apps/
lol.png

然后,双击桌面的英雄联盟就可以开始游戏啦。

好,接下来就好好享受LOL之旅吧!!
深度截图20130320131126.png
深度截图20130320131249.png
深度截图20130320131336.png
深度截图20130320131355.png
深度截图20130320131423.png
深度截图20130320131636.png

[color=#FF0000:23xr9fys]反tp补丁下载:[/color:23xr9fys]
3.0.9.4版本:League of Legends.exe(版本号3.8.1.228)

[color=#FF0000:23xr9fys]预编译lol-wine下载:[/color:23xr9fys]
有朋友反映说编译麻烦,我这里将我编译好的包发上来,分32位和64位,是分别在Fedora 19 x86和Gentoo amd64编译的,大家试着用一下吧,如果有问题,再发帖讨论。

lol-wine_32bit.tar.bz2
lol-wine_64bit.tar.bz2

如果您希望跟帖子里说的配置一样,根据自己的系统下相应的压缩包,解压到/opt/,
  1. sudo tar xvf lol-wine_32bit.tar.bz2 -C /opt/
Copy the Code
or
  1. sudo tar xvf lol-wine_64bit.tar.bz2 -C /opt/
Copy the Code
当然您也可以将/opt/另选为自己喜欢的目录。
接下来,您就可以跳过上面的“第一步”,直接从“第二步、配置wine环境”开始了

2013年4月2日:
如果您使用的是Intel的核显,您需要安装libtxc_dxtn这个包,它在不同发行版的命名有些不同,在Ubuntu/Deepin应该是libtxc-dxtn-s2tc0。我用过的发行版比较少,大家可以先搜索一下这个包,用相应的命令安装。

2013年4月7日:
提高游戏fps的技巧(转自LOL论坛):
1、更改注册表
  1. WINEPREFIX=~/LOL/.wine regedit
Copy the Code
打开注册表编辑器,找到键
HKEY_CURRENT_USER>Software>Wine>Direct3D
没有的话就新建一个,然后新建几个"字符串值",DirectDrawRenderer、Multisampling、OffscreenRenderingMode、RenderTargetLockMode、UseGLSL,设定它们的值分别是gdi、disabled、fbo、disabled、disabled;根据自己的显卡情况,还可建一个“字符串值”VideoMemorySize,将它的值设为自己显存大小,像我就设为512

2、选完英雄进入游戏后,打开终端,用top找到League of Legends.exe这个进程的PID,假设为11732,然后,用taskset命令将它设为只用一个cpu核
  1. taskset -pc 1 11732
Copy the Code
这里指定它只用编号为1的cpu核心。

相关链接: http://www.linuxdeepin.com/forum/24/14706?p=62277
Reply Favorite View the author
All Replies
...11 / 13
To page
zhtengw
deepin
2013-06-18 17:16
#201
NOTE: These instructions work for almost any distro EXCEPT for Ubuntu 12.04+ 64bit. If you are unlucky and have that painful OS, scroll a little down and follow the Ubuntu-specific guide
看到winehq上面这句话我当时就蛋疼了,我开始就是13.0464位的ubuntu,后来改成12。04LTS版才成功。。
恩,所以说ubuntu 64bit编译wine很蛋疼~
Reply View the author
zhtengw
deepin
2013-06-18 17:17
#202
请问第一步下载wine源代码则么弄?
您可以去www.winehq.org看,那是wine的主页。或者点击帖子的链接
Reply View the author
jcmzyy
deepin
2013-06-19 05:22
#203
谢谢
Reply View the author
jcmzyy
deepin
2013-06-19 05:36
#204
话说楼主的帖子还欠详细 ,最好把详细过程列出来 毕竟还有我这种连第一步都不会的小白的。
Reply View the author
jcmzyy
deepin
2013-06-19 06:05
#205
第二布下载winetricks又怎么搞啊 那网址打开全是代码。
Reply View the author
jcmzyy
deepin
2013-06-20 02:42
#206
这是怎么回事?
xme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:crypt:SystemFunction041 (0x5198450, 2b8, 1): stub [RtlDecryptMemory]
fixme:crypt:SystemFunction040 (0x77e6820, 2b8, 1): stub [RtlEncryptMemory]
fixme:crypt:SystemFunction041 (0x5198450, 2b8, 1): stub [RtlDecryptMemory]
fixme:crypt:SystemFunction041 (0x5198450, 2b8, 1): stub [RtlDecryptMemory]
fixme:crypt:SystemFunction040 (0x77e6820, 2b8, 1): stub [RtlEncryptMemory]
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:crypt:SystemFunction041 (0x5198450, 2b8, 1): stub [RtlDecryptMemory]
fixme:crypt:SystemFunction040 (0x77e6820, 2b8, 1): stub [RtlEncryptMemory]
fixme:crypt:SystemFunction041 (0x51
Reply View the author
jcmzyy
deepin
2013-06-20 02:44
#207
上报错误
TQos Nums: |2|34|3|2|0|0|0|1|1|0|0|183227|183231|6|
TQos Strs: |{F146E992-FB01-4280-9539-55FBB3C069F1}|http://down-update.qq.com:80/lol/autopatch/3065/571b3361aab53383685bf1402e0d04bd_version.list|||2.0.12.2|
fixme:msvcrt:__clean_type_info_names_internal (0x88507b4) stub
Reply View the author
zhtengw
deepin
2013-06-21 05:46
#208
这是怎么回事?
xme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported
fixme:msvcrt:pf_printf_a multibyte characters printing not supported

wine的fixme:信息,不是错误,相当于是wine的功能缺失提醒,给wine开发者看的,我们不用管。关注err:的提示信息才是有意义的。
Reply View the author
jcmzyy
deepin
2013-06-23 03:36
#209
这是社么情况?
jcm@jcm-Lenovo-B450:~/下载/wine-1.6-rc2$ ./configure --prefix=/opt/lol-wine
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking for cpp... cpp
checking for the directory containing the Wine tools... $(top_builddir)
checking for flex... no
configure: error: no suitable flex found. Please install the 'flex' package.
jcm@jcm-Lenovo-B450:~/下载/wine-1.6-rc2$
Reply View the author
dayday
deepin
2013-06-27 19:32
#210
话说,为何我的wine不用winetricks各种程序便可运行LOL。
拷贝别人的安装目录+用反TP代替原文件+打补丁编译wine安装+编辑注册码就能运行了。
不过我的wine配置了gecko和mono,前者是wine的内置ie,后者是wine的内置.NET Framework。winetricks的都没有装。
各位LOL On Linux的可以试试
Reply View the author
xl18zwd
deepin
2013-07-10 18:26
#211
话说,为何我的wine不用winetricks各种程序便可运行LOL。
拷贝别人的安装目录+用反TP代替原文件+打补丁编译wine安装+编辑注册码就能运行了。
不过我的wine配置了gecko和mono,前者是wine的内置ie,后者是wine的内置.NET Framework。winetricks的都没有装。
各位LOL On Linux的可以试试

是国服吗?运行效果怎么样,有没有花屏什么的?
Reply View the author
wuyubin
deepin
2013-07-18 04:36
#212
配置wine,这里我是定义另一个WINEPREFIX,以跟本机上原来的wine配置分开,
我们先执行

代码: 全选
export WINEVERPATH=/opt/lol-wine
export PATH=$WINEVERPATH/binPATH
export WINESERVER="$WINEVERPATH/bin/wineserver"
export WINELOADER="$WINEVERPATH/bin/wine"
export WINEDLLPATH="WINEVERPATH/lib/wine/fakedlls"
export LD_LIBRARY_PATH="$WINEVERPATH/libLD_LIBRARY_PATH"


接着再来
代码: 全选
mkdir ~/LOL
WINEPREFIX=~/LOL/.wine WINEARCH=win32 $WINEVERPATH/bin/winecfg
大圣,到这里输入后就
zsh: 没有那个文件或目录: /bin/winecfg
怎么办



已解决,终端重启过,前面几行export为重执行
Reply View the author
wuyubin
deepin
2013-07-18 07:23
#213
注意,如果出现“不能打开要写入的文件”的错误,请确认自己执行winetricks的时候成功安装了dotnet20和dotnet35。
未成功安装dotnet 30(sp1)和dotnet 35怎么善后
Reply View the author
xl18zwd
deepin
2013-07-20 21:36
#214
dotnet30和dotnet35我没装也能玩。。
Reply View the author
friddle
deepin
2013-07-21 03:55
#215
第二步的时候出现这个错误。估计和配环境配置有关。问题是不知道怎么解决
一切都是按步骤来的。


wine: failed to initialize: /home/aten/tools/lol-wine-1.6.rc2/lib/wine/ntdll.dll.so: cannot open shared object file: No such file or directory
Reply View the author
xl18zwd
deepin
2013-07-21 07:35
#216
patch -p0 < 0001-HACK-Disallow-block-based-textures-with-sub-block-si-1.6-rc2.txt

楼主,打补丁那步需要把补丁表示路径的那两行改成对应自己版本wine的路径才行,应该注明这个。
比如
--- wine-1.6-rc2/dlls/wined3d/utils.c.old        2013-06-15 02:15:43.000000000 +0800
+++ wine-1.6-rc2/dlls/wined3d/utils.c        2013-06-16 20:55:57.558526653 +0800

我用的是wine-1.6-rc5应该把路径改为
--- wine-1.6-rc5/dlls/wined3d/utils.c.old        2013-06-15 02:15:43.000000000 +0800
+++ wine-1.6-rc5/dlls/wined3d/utils.c        2013-06-16 20:55:57.558526653 +0800
才能打上补丁。
Reply View the author
xl18zwd
deepin
2013-07-21 20:52
#217
我把wine版本从1.55升级到1.6了,花屏没什么改善,fps略有提升,以前是30-40,现在是40-50  -_-
Reply View the author
zhtengw
deepin
2013-07-22 00:17
#218
patch -p0 < 0001-HACK-Disallow-block-based-textures-with-sub-block-si-1.6-rc2.txt

楼主,打补丁那步需要把补丁表示路径的那两行改成对应自己版本wine的路径才行,应该注明这个。
比如
--- wine-1.6-rc2/dlls/wined3d/utils.c.old        2013-06-15 02:15:43.000000000 +0800
+++ wine-1.6-rc2/dlls/wined3d/utils.c        2013-06-16 20:55:57.558526653 +0800

我用的是wine-1.6-rc5应该把路径改为
--- wine-1.6-rc5/dlls/wined3d/utils.c.old        2013-06-15 02:15:43.000000000 +0800
+++ wine-1.6-rc5/dlls/wined3d/utils.c        2013-06-16 20:55:57.558526653 +0800
才能打上补丁。
当然,不同的wine版本,补丁适用性也不一样。幸得rc2到rc5没有改动wined3d/utils.c的代码,不然直接这样改也打不上,要对应补丁改代码才行。
Reply View the author
xsh6528
deepin
2013-07-25 00:09
#219
感谢楼主,以后玩的时候免得切系统了!
Reply View the author
xsh6528
deepin
2013-07-25 06:20
#220
在此我把我在Deepin遇到的问题汇总一下


在进行
代码: 全选
./configure --prefix=/opt/lol-wine
之前,需要3个软件包
执行
代码: 全选
sudo apt-get install flex bison xorg-dev

就行了



代码: 全选
make
之前要装上libpng
但是不知道为什么会由于依赖问题不能够安装
通过不懈的google找到了迂回的方法,
执行
代码: 全选
sudo apt-get build-dep wine1.4

就会顺便装上libpng



代码: 全选
WINEPREFIX=~/LOL/.wine winetricks vcrun2005
之前
需要执行
代码: 全选
sudo apt-get install cabextract




代码: 全选
WINEPREFIX=~/LOL/.wine winetricks dotnet35
的时候
会遇到错误
这时候找到目录~/.cache/winetricks/dotnet30sp1
找到一个名字有很多%20的安装包,把那若干个%20换成空格
再执行WINEPREFIX=~/LOL/.wine winetricks dotnet35,就好了
Reply View the author
...11 / 13
To page