Advertisement
Guest User

Wine for LoL Ubuntu 10.10

a guest
Nov 12th, 2010
9,652
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.54 KB | None | 0 0
  1. #!/bin/sh
  2. #This script will compile and config WINE for running League of Legends on Ubuntu.
  3. #Will install WINE 1.3.6 with its own prefix and console command. (wine-1.3.6)
  4. #Tested on Ubuntu 10.10 (Maverik Meekrat)
  5. #Tested with Wine version 1.3.6 built from source
  6. #Updated 06/11/2010 (DD/MM/YYYY)
  7.  
  8.  
  9.  
  10.  
  11. #First we download Wine Source Code for development version 1.3.6, in which LoL is tested to work.
  12.  
  13. wget http://ibiblio.org/pub/linux/system/emulators/wine/wine-1.3.6.tar.bz2
  14.  
  15. #Untar and switch to the extracted dir. Make sure the cd to the extracted folder is performed, all the following commands are meant to run in said folder.
  16.  
  17. tar xvf wine-1.3.6.tar.bz2
  18. cd wine-1.3.6.tar.bz2
  19.  
  20. #Now we download libraries needed to complie Wine. After this command however, there may be still dependencies missing, and they need to be installed through aptitude or synaptic.
  21.  
  22. apt-get build-dep wine
  23.  
  24. #There is a patch for wine that needs to be downloaded and installed.
  25.  
  26. wget http://bugs2.winehq.org/attachment.cgi?id=25672 -O wine1.patch
  27.  
  28. patch -p1 < wine1.patch
  29.  
  30.  
  31. #From here on, parts were taken from the following address, this script is modified to install wine 1.3.6 alongside any other wine version you may have. -> http://jeffhoogland.blogspot.com/2009/12/howto-install-multiple-wine-versions-on.html
  32.  
  33. #Info for building in 64bit enviroments was added from http://wiki.winehq.org/WineOn64bit. Uncomment the following if you are in a 64bit eviroment without Nvidia chipset.
  34.  
  35. #mkdir -p ./lib32
  36. #ln -s /usr/lib32/mesa/libGL.so.1 ./lib32/libGL.so
  37.  
  38. #If you are on a 64bit enviroment and have a Nvidia, use this instead:
  39.  
  40. #mkdir -p ./lib32
  41. #ln -s /usr/lib32/nvidia-current/libGL.so.1 ./lib32/libGL.so
  42.  
  43.  
  44. #We run cunfigure using the --prefix parameter to install it in a specific place of our system.
  45.  
  46. ./configure --prefix=/usr/local/bin/wine-1.3.6 && make depend && make
  47.  
  48. #This for 64bits
  49.  
  50. #./configure --prefix=/usr/local/bin/wine-1.3.6 LDFLAGS="-L./lib32" && make depend && make
  51.  
  52. #Now we install it
  53.  
  54. sudo make install
  55.  
  56. #Create symbolic links so the new wine can be run automatically from terminal using "wine-1.3.6" instead of "wine". Will ask for password.
  57.  
  58. sudo ln -s /usr/local/bin/wine-1.3.6/bin/wine /usr/bin/wine-1.3.6
  59. sudo ln -s /usr/local/bin/wine-1.3.6/bin/wine /usr/local/bin/wine-1.3.6/bin/wine-1.3.6
  60.  
  61. #Now we create small scripts so winecfg and regedit from 1.3.6 can also be executed directly from the terminal. (as in "winecfg-1.3.6" instead of just "winecfg")
  62.  
  63. echo "/usr/local/bin/wine-1.3.6/bin/winecfg" > /usr/bin/winecfg-1.3.6
  64. sudo chmod +x /usr/bin/winecfg-1.3.6
  65.  
  66. echo "/usr/local/bin/wine-1.3.6/bin/regedit" > /usr/bin/regedit-1.3.6
  67. sudo chmod +x /usr/bin/regedit-1.3.6
  68.  
  69.  
  70. #Create a Prefix named "wine-1.3.6" as hidden folder in home.
  71.  
  72. export WINEPREFIX=$HOME/.wine-1.3.6
  73.  
  74. #Config it.
  75.  
  76. WINEPREFIX=$HOME/.wine-1.3.6 winecfg-1.3.6
  77.  
  78. #Some DLLs and apps must be installed using winetricks for LoL to work.
  79.  
  80. #We download winetricks
  81.  
  82. wget http://www.kegel.com/wine/winetricks
  83.  
  84. #Make it executable.
  85.  
  86. sudo chmod +x ~/wine-1.3.6 winetricks
  87.  
  88. #Run winetricks in our new prefix and install the required packages, this will bring some popup windows, everything there should be installed correctly before proceding.
  89.  
  90. WINEPREFIX=$HOME/.wine-1.3.6 ./winetricks gecko
  91.  
  92. WINEPREFIX=$HOME/.wine-1.3.6 ./winetricks d3dx9
  93. WINEPREFIX=$HOME/.wine-1.3.6 ./winetricks vcrun2005
  94. WINEPREFIX=$HOME/.wine-1.3.6 ./winetricks adobeair
  95. WINEPREFIX=$HOME/.wine-1.3.6 ./winetricks ie6
  96. WINEPREFIX=/.wine-1.3.6 ./winetricks win2k
  97.  
  98. WINEPREFIX=$HOME/.wine-1.3.6 ./winetricks wininet
  99.  
  100. #Now our new WINE is ready. LoL installer should be ran this way: "WINEPREFIX=$HOME/.wine-1.3.6 wine-1.3.6 ./setup.exe" (note that this will not actually work if not ran in the dir with the downloaded files)
  101.  
  102. #For those interested, this is the launcher i made. It uses the WINEDEBUG=-all option in order to make it run a bit faster. Note that this should only be used after you are sure it works, else you will get no info from wine on the terminal if something is broken.
  103.  
  104. #[Desktop Entry]
  105. #Name=Play League of Legends
  106. #Exec=env WINEPREFIX="$HOME/.wine-1.3.6" WINEDEBUG=-all wine-1.3.6 "~/.wine-1.3.6/dosdevices/c:/Riot Games/League of Legends/lol.launcher.exe"
  107. #Type=Application
  108. #StartupNotify=true
  109. #Path=~/.wine-1.3.6/dosdevices/c:/Riot Games/League of Legends
  110. #Icon=C35B_lol.launcher.0
  111.  
  112. #Except for shop (i.e. where you buy heroes, runes, skins, etc.) everything works fine for me; sound, video, even updating.
  113.  
  114. #I did make some adjustments to Game.cfg to fix some video issues.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement