Advertisement
hyperfang8

League of Legends PlayOnLinux

Jun 3rd, 2016
1,562
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.96 KB | None | 0 0
  1. #!/bin/bash
  2. #Date: 2016-06-01
  3. #Last revision: 2016-06-04 02:13
  4. #Distribution used to test: Ubuntu 16.04
  5. #Author: HyperFang8
  6. #Licence: none
  7.  
  8. [ "$PLAYONLINUX" = "" ] && exit 0
  9. source "$PLAYONLINUX/lib/sources"
  10.  
  11. WINEVERSION="1.9.11-staging"
  12.  
  13. TITLE="League of Legends"
  14. PREFIX="LeagueOfLegends"
  15. SHORTCUT_NAME="League of Legends"
  16.  
  17. POL_SetupWindow_Init
  18.  
  19. POL_RequiredVersion "4.0.18" || POL_Debug_Fatal "$APPLICATION_TITLE 4.0.18 is required to install $TITLE"
  20.  
  21. POL_Debug_Init
  22.  
  23. POL_SetupWindow_presentation "League of Legends" "Riot" "http://www.riotgames.com/" "HyperFang8" "LeagueOfLegends"
  24.  
  25. POL_SetupWindow_InstallMethod "DOWNLOAD,LOCAL"
  26.  
  27. if [ "$INSTALL_METHOD" = "LOCAL" ]; then
  28.     cd "$HOME"
  29.     POL_SetupWindow_browse "$(eval_gettext 'Please select setup file!')" "$TITLE" "" "Windows Executables (*.exe)|*.exe;*.EXE"
  30.     SETUPFILE="$APP_ANSWER"
  31. else # DOWNLOAD
  32.     POL_System_TmpCreate "$PREFIX"
  33.     POL_SetupWindow_menu "$(eval_gettext 'Select your server region:')" "$TITLE" "EUNE~LA1~OC1~LA2~JP~BR~EUW~TR~NA~RU" "~"
  34.  
  35.     case "$APP_ANSWER" in
  36.         "$(eval_gettext 'EUNE')")
  37.             DOWNLOAD_URL="https://riotgamespatcher-a.akamaihd.net/ShellInstaller/EUNE/LeagueofLegends_EUNE_Installer_2016_05_13.exe"
  38.             DOWNLOAD_MD5="a154cf3ba01671878ac5812f9e09db31"
  39.         ;;
  40.         "$(eval_gettext 'LA1')")
  41.             DOWLOAD_URL="https://riotgamespatcher-a.akamaihd.net/ShellInstaller/LA1/LeagueofLegends_LA1_Installer_2016_05_26.exe"
  42.             DOWNLOAD_MD5="b77866076bd3f0b97c8a020822e8c310"
  43.         ;;
  44.         "$(eval_gettext 'OC1')")
  45.             DOWLOAD_URL="https://riotgamespatcher-a.akamaihd.net/ShellInstaller/OC1/LeagueofLegends_OC1_Installer_2016_05_13.exe"
  46.             DOWNLOAD_MD5="19f81a29ffdeee6fa6b783230612ff8f"
  47.         ;;
  48.         "$(eval_gettext 'LA2')")
  49.             DOWLOAD_URL="https://riotgamespatcher-a.akamaihd.net/ShellInstaller/LA2/LeagueofLegends_LA2_Installer_2016_05_27.exe"
  50.             DOWNLOAD_MD5="971065b812080452a18bb3a0769fd4ab"
  51.         ;;
  52.         "$(eval_gettext 'JP')")
  53.             DOWLOAD_URL="https://riotgamespatcher-a.akamaihd.net/ShellInstaller/JP/LeagueofLegends_JP_Installer_2016_05_31.exe"
  54.             DOWNLOAD_MD5="4e7decfc3aec7afe56f7f53f1969617a"
  55.         ;;
  56.         "$(eval_gettext 'BR')")
  57.             DOWLOAD_URL="https://riotgamespatcher-a.akamaihd.net/ShellInstaller/BR/LeagueofLegends_BR_Installer_2016_05_13.exe"
  58.             DOWNLOAD_MD5="bcbddc3a64b0ca461eba16f27651b8f7"
  59.         ;;
  60.         "$(eval_gettext 'EUW')")
  61.             DOWLOAD_URL="https://riotgamespatcher-a.akamaihd.net/ShellInstaller/EUW/LeagueofLegends_EUW_Installer_2016_05_13.exe"
  62.             DOWNLOAD_MD5="9d7cf007b8642776cfb95d2c26a020e2"
  63.         ;;
  64.         "$(eval_gettext 'TR')")
  65.             DOWLOAD_URL="https://riotgamespatcher-a.akamaihd.net/ShellInstaller/TR/LeagueofLegends_TR_Installer_2016_05_13.exe"
  66.             DOWNLOAD_MD5=""
  67.         ;;
  68.         "$(eval_gettext 'NA')")
  69.             DOWLOAD_URL="https://riotgamespatcher-a.akamaihd.net/ShellInstaller/NA/LeagueofLegends_NA_Installer_2016_05_13.exe"
  70.             DOWNLOAD_MD5="5cc3e6fa0437e37bafa84ca9fe658043"
  71.         ;;
  72.         "$(eval_gettext 'RU')")
  73.             DOWLOAD_URL="https://riotgamespatcher-a.akamaihd.net/ShellInstaller/RU/LeagueofLegends_RU_Installer_2016_05_13.exe"
  74.             DOWNLOAD_MD5="479dca2f8d7c54edaf3f2fcceaf431c1"
  75.         ;; 
  76.     esac
  77.     DOWNLOAD_FILE="$POL_System_TmpDir/$(basename "$DOWNLOAD_URL")"
  78.     POL_Call POL_Download_retry "$DOWNLOAD_URL" "$DOWNLOAD_FILE" "$DOWNLOAD_MD5" "$TITLE standalone installer"
  79.     SETUPFILE="$DOWNLOAD_FILE"
  80. fi
  81.  
  82. POL_System_SetArch "x86"
  83. POL_Wine_SelectPrefix "$PREFIX"
  84. POL_Wine_PrefixCreate "$WINEVERSION"
  85.  
  86. POL_Call POL_Install_d3dx9_36
  87. POL_Wine_SetVideoDriver
  88.  
  89.  
  90. mkdir "$REPERTOIRE/wineprefix/$PREFIX/drive_c/tmplol/"
  91. cd "$REPERTOIRE/wineprefix/$PREFIX/drive_c/tmplol/"
  92. POL_Wine_WaitBefore "$TITLE"
  93. POL_Wine "$SETUPFILE" /extract:C:\\tmplol
  94.  
  95. mv LoL.*.msi LoL.msi
  96. POL_Wine_WaitBefore "$TITLE"
  97. POL_Wine msiexec /a C:/tmplol/LoL.msi  /qb
  98. cd ..
  99. rm -rf tmplol
  100.  
  101. POL_Shortcut "lol.launcher.admin.exe" "$SHORTCUT_NAME" "$SHORTCUT_NAME.png" "" "Game;RolePlaying;"
  102.  
  103. POL_SetupWindow_question "Save files for further instalation?" "$TITLE"
  104. if [ "$APP_ANSWER" = "FALSE" ]; then
  105.     POL_System_TmpDelete
  106. fi
  107. POL_SetupWindow_Close
  108. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement