forked from mattcaron/playonlinux
-
Notifications
You must be signed in to change notification settings - Fork 10
/
League Of Legends
119 lines (87 loc) · 5.07 KB
/
League Of Legends
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/bin/bash
# Date : (2012-04-12)
# Last revision : (2013-07-31 19:59)
# Distribution used to test : ArchLinux, Debian Sid
# Author : Quentin PÂRIS, Valentin PERRUSSEL, Pierre ETCHEMAITE
# Licence : GPLv3
# PlayOnLinux: 4.1.10-dev
# WineHQ: http://winebuild.playonlinux.com/wine/wine-patches/LeagueOfLegends/
# Changelog
# (2012-05-11) 22:50 - Quentin PÂRIS
# - New wine patches for better perfomances
# (2012-05-11) 23:38 - Quentin PÂRIS
# - Dirty hack that fixes problems
# (2012-05-12) 09:45 - Quentin PÂRIS
# - Patches for osx
# (2012-05-28) 11:00 - Quentin PÂRIS
# - Checks for recent version of PoL (InsertBeforeWine is bad supported by 4.0.14)
# (2013-03-10) 22:51 - Pierre ETCHEMAITE
# - Use web downloader
# (2013-04-07) 22:23 - Pierre ETCHEMAITE
# - Reverted as they somehow broke PMB (not even installed)
# (2013-04-13) 20:12 - GNU_Raziel
# - Added POL_Wine_SetVideoDriver function
# (2013-07-31) 19:53 - Pierre ETCHEMAITE
# - Add S_OK removal (lowers probability of update stalls)
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
WINEVERSION="1.5.24-LeagueOfLegendsShop"
TITLE="League of Legends"
PREFIX="LeagueOfLegends"
SHORTCUT_NAME="League of Legends"
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/$PREFIX/top.jpg" "http://files.playonlinux.com/resources/setups/$PREFIX/left.jpg" "$TITLE"
POL_SetupWindow_Init
POL_RequiredVersion "4.0.18" || POL_Debug_Fatal "$APPLICATION_TITLE 4.0.18 is required to install $TITLE"
which glxinfo || POL_Debug_Error "$(eval_gettext 'glxinfo is not installed. Please install mesa-utils package')"
if ! glxinfo | grep -q GL_EXT_texture_compression_s3tc; then
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, but you might get slower results')"
POL_Debug_Warning "S3TC not enabled!"
fi
POL_Debug_Init
POL_SetupWindow_presentation "League of Legends" "Riot" "http://www.riotgames.com/" "Quentin PÂRIS, BlondVador" "LeagueOfLegends"
POL_SetupWindow_InstallMethod "DOWNLOAD,LOCAL"
if [ "$INSTALL_METHOD" = "LOCAL" ]; then
cd "$HOME"
POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run.')" "$TITLE" "" "Windows Executables (*.exe)|*.exe;*.EXE"
if strings "$APP_ANSWER"|grep -q '\(name="Pando Media Booster Downloader"\|Advanced Installer\)'; then
NOBUGREPORT="TRUE"
POL_Debug_Fatal "$(eval_gettext 'Cant install using the official downloader, sorry')"
fi
FULL_INSTALLER="$APP_ANSWER"
else # DOWNLOAD
POL_System_TmpCreate "$PREFIX"
POL_Call POL_Download_retry "http://files.playonlinux.com/LeagueOfLegends.tar" "$POL_System_TmpDir/LeagueOfLegends.tar" "89b14c74d0b467fa8f78050644d58506" "$TITLE tarball"
POL_SetupWindow_wait "$(eval_gettext 'Decompressing archive...')" "$TITLE"
# From PlayOnLinux environment
mkdir -p "$DESKTOP/League of Legends"
cd "$DESKTOP/League of Legends" || POL_Debug_Fatal "Could not change dir to $DESKTOP/League of Legends!"
tar -xvf "$POL_System_TmpDir/LeagueOfLegends.tar" || POL_Debug_Fatal "Error while decompressing archive!"
FULL_INSTALLER="$DESKTOP/League of Legends/setup.exe"
# Free some disk space
POL_System_TmpDelete
fi
POL_System_SetArch "x86"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WINEVERSION"
POL_Call POL_Install_vcrun2005
POL_Call POL_Install_vcrun2008
POL_Call POL_Install_corefonts
POL_Call POL_Install_d3dx9
POL_Call POL_Install_wininet
Set_OS "win7"
POL_SetupWindow_message "$(eval_gettext 'Warning: You must not tick the checkbox "Run $TITLE" when setup is done')" "$TITLE"
POL_Wine_WaitBefore "$TITLE"
GC_DONT_GC=1 POL_Wine "$FULL_INSTALLER"
Set_OS winxp
# Set Graphic Card informations keys for wine
POL_Wine_SetVideoDriver
POL_Shortcut "rads_user_kernel.exe" "$SHORTCUT_NAME" "$SHORTCUT_NAME.png" "run lol_launcher 0.0.0.0 LoLLauncher.exe" "Game;RolePlaying;"
POL_Shortcut_InsertBeforeWine "$SHORTCUT_NAME" 'rm "$WINEPREFIX/drive_c/Riot Games/League of Legends/RADS/projects/lol_launcher/releases/0.0.0.0" 2> /dev/null'
POL_Shortcut_InsertBeforeWine "$SHORTCUT_NAME" 'ln -s "$WINEPREFIX/drive_c/Riot Games/League of Legends/RADS/projects/lol_launcher/releases/$(ls -1 "$WINEPREFIX/drive_c/Riot Games/League of Legends/RADS/projects/lol_launcher/releases/" | tail -n 1)" "$WINEPREFIX/drive_c/Riot Games/League of Legends/RADS/projects/lol_launcher/releases/0.0.0.0"'
POL_Shortcut_InsertBeforeWine "$SHORTCUT_NAME" 'rm "$WINEPREFIX/drive_c/Riot Games/League of Legends/RADS/projects/lol_air_client/releases/$(ls -1 "$WINEPREFIX/drive_c/Riot Games/League of Legends/RADS/projects/lol_air_client/releases/" | tail -n 1)/S_OK"'
POL_Shortcut_InsertBeforeWine "$SHORTCUT_NAME" 'rm "$WINEPREFIX/.update-timestamp"'
if [ "$INSTALL_METHOD" = "DOWNLOAD" ]; then
POL_SetupWindow_message "$(eval_gettext 'You should now have a League of Legends directory on your desktop containing its installer. You may keep it to speed up reinstallations.')" "$TITLE"
fi
POL_SetupWindow_Close
exit 0