Advertisement
Guest User

lol.sh

a guest
Oct 24th, 2016
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.13 KB | None | 0 0
  1. #!/bin/bash
  2. # Date : (2012-04-12)
  3. # Last revision : (2015-05-31 08:27)
  4. # Distribution used to test : ArchLinux, Debian Sid, Fedora
  5. # Author : Quentin PÂRIS, Valentin PERRUSSEL, Pierre ETCHEMAITE
  6. # Licence : GPLv3
  7. # WineHQ: http://winebuild.playonlinux.com/wine/wine-patches/LeagueOfLegends2/
  8.  
  9. # Changelog
  10. # (2012-05-11) 22:50 - Quentin PÂRIS
  11. # - New wine patches for better perfomances
  12. # (2012-05-11) 23:38 - Quentin PÂRIS
  13. # - Dirty hack that fixes problems
  14. # (2012-05-12) 09:45 - Quentin PÂRIS
  15. # - Patches for osx
  16. # (2012-05-28) 11:00 - Quentin PÂRIS
  17. # - Checks for recent version of PoL (InsertBeforeWine is bad supported by 4.0.14)
  18. # (2013-03-10) 22:51 - Pierre ETCHEMAITE
  19. # - Use web downloader
  20. # (2013-04-07) 22:23 - Pierre ETCHEMAITE
  21. # - Reverted as they somehow broke PMB (not even installed)
  22. # (2013-04-13) 20:12 - GNU_Raziel
  23. # - Added POL_Wine_SetVideoDriver function
  24. # (2013-09-07) 21:17 - Pierre ETCHEMAITE
  25. # - Fix for newer LoL versions
  26. # (2014-09-01) 21:17 - Quentin PÂRIS
  27. # - Fix for newer LoL versions (added d3dx9)
  28. # (2015-01-09) 00:54 - Pierre ETCHEMAITE
  29. # - Update Wine to fix missing libgcrypto symlink
  30. # (2015-02-10) 20:25 = Pierre ETCHEMAITE
  31. # - Use official standalone installer/patcher
  32. # (2015-05-31) 08:27 = Pierre ETCHEMAITE
  33. # - use Wine 1.7.44-LeagueOfLegends2 to fix patcher issue
  34. # (2016-01-26) 12:55 (UTC) - Jeddunk
  35. # - upgrade Wine to 1.9.2-LeagueOfLegends5
  36. # (2016-10-22) 17:27 - Aztorius
  37. # - upgrade Wine to 1.9.19-staging
  38. # - switch to winxp sp3
  39. # - grab mouse in fullscreen mode by default
  40.  
  41. [ "$PLAYONLINUX" = "" ] && exit 0
  42. source "$PLAYONLINUX/lib/sources"
  43.  
  44. WINEVERSION="1.9.20-staging"
  45.  
  46. TITLE="League of Legends"
  47. PREFIX="LeagueOfLegends"
  48. SHORTCUT_NAME="League of Legends"
  49.  
  50. POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
  51.  
  52. POL_SetupWindow_Init
  53. POL_RequiredVersion "4.0.18" || POL_Debug_Fatal "$APPLICATION_TITLE 4.0.18 is required to install $TITLE"
  54. POL_SetupWindow_SetID 1135
  55.  
  56. which glxinfo || POL_Debug_Error "$(eval_gettext 'glxinfo is not installed. Please install mesa-utils package')"
  57.  
  58. if ! glxinfo | grep -q GL_EXT_texture_compression_s3tc; then
  59. POL_SetupWindow_message "$(eval_gettext 'Warning! S3TC compression is not available on your system.\n\nIf you have a free driver, you might need to install a proprietary driver \n\nOtherwise, you can enable it by installing libtxc-dxtn0 package or libtxc-dxtn-s2tc0,libtxc-dxtn-s2tc-bin if the first doesn t work, but you might get slower results')"
  60. POL_Debug_Warning "S3TC not enabled!"
  61. fi
  62.  
  63. POL_Debug_Init
  64.  
  65. POL_SetupWindow_presentation "League of Legends" "Riot" "http://www.riotgames.com/" "Quentin PÂRIS, BlondVador" "LeagueOfLegends"
  66.  
  67. POL_SetupWindow_InstallMethod "DOWNLOAD,LOCAL"
  68.  
  69. if [ "$INSTALL_METHOD" = "LOCAL" ]; then
  70. cd "$HOME"
  71. POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE" "" "Windows Executables (*.exe)|*.exe;*.EXE"
  72.  
  73. if strings "$APP_ANSWER"|grep -q '\(name="Pando Media Booster Downloader"\|Advanced Installer\)'; then
  74. NOBUGREPORT="TRUE"
  75. POL_Debug_Fatal "$(eval_gettext 'Cant install using the official downloader, sorry')"
  76. fi
  77. FULL_INSTALLER="$APP_ANSWER"
  78. else # DOWNLOAD
  79. POL_System_TmpCreate "$PREFIX"
  80.  
  81. # http://forums.na.leagueoflegends.com/board/showthread.php?t=1474419
  82. POL_SetupWindow_menu "$(eval_gettext 'Select installer to download:')" "$TITLE" "$(eval_gettext 'North America')~$(eval_gettext 'Europe West')~$(eval_gettext 'Europe Nordic and East')" "~"
  83. case "$APP_ANSWER" in
  84. "$(eval_gettext 'North America')")
  85. DOWNLOAD_URL="http://l3cdn.riotgames.com/Installer/SingleFileInstall/LeagueOfLegendsBaseNA.exe"
  86. DOWNLOAD_MD5="9d44b68bd02d7b5426556f64d86bbd16"
  87. ;;
  88. "$(eval_gettext 'Europe West')")
  89. DOWNLOAD_URL="http://l3cdn.riotgames.com/Installer/SingleFileInstall/LeagueOfLegendsBaseEUW.exe"
  90. DOWNLOAD_MD5="eb5d7b007b6022ee555c0dd9fd71263e"
  91. ;;
  92. "$(eval_gettext 'Europe Nordic and East')")
  93. DOWNLOAD_URL="http://l3cdn.riotgames.com/Installer/SingleFileInstall/LeagueOfLegendsBaseEUNE.exe"
  94. DOWNLOAD_MD5="f08d7b70776b0989eabb016bae77fdaa"
  95. ;;
  96. esac
  97. DOWNLOAD_FILE="$POL_System_TmpDir/$(basename "$DOWNLOAD_URL")"
  98.  
  99. POL_Call POL_Download_retry "$DOWNLOAD_URL" "$DOWNLOAD_FILE" "$DOWNLOAD_MD5" "$TITLE standalone installer"
  100.  
  101. FULL_INSTALLER="$DOWNLOAD_FILE"
  102. fi
  103.  
  104. POL_System_SetArch "x86"
  105. POL_Wine_SelectPrefix "$PREFIX"
  106. POL_Wine_PrefixCreate "$WINEVERSION"
  107.  
  108. POL_Call POL_Install_corefonts
  109. POL_Call POL_Install_vcrun2005
  110. POL_Call POL_Install_vcrun2008
  111. POL_Call POL_Install_d3dx9
  112.  
  113. Set_OS "win7"
  114.  
  115. POL_SetupWindow_message "$(eval_gettext 'Warning: You must not tick the checkbox "Run $TITLE" when setup is done')" "$TITLE"
  116.  
  117. POL_Wine_WaitBefore "$TITLE"
  118. POL_Wine "$FULL_INSTALLER"
  119.  
  120. Set_OS "winxp" "sp3"
  121.  
  122. # Set Graphic Card informations keys for wine
  123. POL_Wine_SetVideoDriver
  124. # Grab the mouse when playing
  125. POL_Wine_X11Drv "GrabFullscreen" "Y"
  126.  
  127. POL_Call POL_Function_OverrideDLL builtin,native dnsapi
  128. POL_Shortcut "lol.launcher.admin.exe" "$SHORTCUT_NAME" "$SHORTCUT_NAME.png" "" "Game;RolePlaying;"
  129.  
  130. if [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
  131. # Free some disk space
  132. POL_System_TmpDelete
  133. fi
  134.  
  135. if [ "$POL_OS" = "Linux" ]; then
  136. if [ "$(cat /proc/sys/net/ipv4/tcp_timestamps)" = "1" ]; then
  137. FORUM_URL='http://forums.euw.leagueoflegends.com/board/showthread.php?t=2058453'
  138. POL_SetupWindow_question "$(eval_gettext 'If you get connection errors when attempting to login, try disabling tcp_timestamps in the kernel.')\n$(eval_gettext 'Do you want to read original thread in League of Legends forums?')" "$TITLE"
  139. [ "$APP_ANSWER" = "TRUE" ] && POL_Browser "${FORUM_URL}"
  140. fi
  141. fi
  142.  
  143. POL_SetupWindow_message "You may need to enable CSMT in order to open League of Legends for the first time."
  144.  
  145. POL_SetupWindow_Close
  146. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement