Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update League of Legends script #1109

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
06ad52f
Merge pull request #1 from PhoenicisOrg/master
ImperatorS79 Aug 28, 2017
86fd07c
Update script.js
ImperatorS79 Aug 28, 2017
a6f232b
Merge pull request #2 from PhoenicisOrg/master
ImperatorS79 Aug 28, 2017
a80aa84
Merge pull request #3 from PhoenicisOrg/master
ImperatorS79 Sep 26, 2017
6da4a59
Merge pull request #4 from PhoenicisOrg/master
ImperatorS79 Mar 19, 2018
4a11f65
Merge pull request #8 from PhoenicisOrg/master
ImperatorS79 Apr 9, 2018
b2d5724
Merge pull request #9 from PhoenicisOrg/master
ImperatorS79 May 7, 2018
b7d1f0f
Merge pull request #10 from PhoenicisOrg/master
ImperatorS79 May 13, 2018
533df6e
Merge pull request #11 from PhoenicisOrg/master
ImperatorS79 May 22, 2018
186e4ed
Merge pull request #12 from PhoenicisOrg/master
ImperatorS79 May 29, 2018
99cf1db
Merge pull request #13 from PhoenicisOrg/master
ImperatorS79 Jun 13, 2018
87999b4
Merge pull request #15 from PhoenicisOrg/master
ImperatorS79 Oct 10, 2018
610b258
Merge pull request #16 from PhoenicisOrg/master
ImperatorS79 Oct 12, 2018
ad2ea01
Merge pull request #17 from PhoenicisOrg/master
ImperatorS79 Jan 12, 2019
2e53a22
Merge pull request #18 from PhoenicisOrg/master
ImperatorS79 Jan 18, 2019
10f93ca
Merge pull request #20 from PhoenicisOrg/master
ImperatorS79 Feb 2, 2019
ade899d
Merge pull request #21 from PhoenicisOrg/master
ImperatorS79 Feb 27, 2019
db6e1b9
Merge pull request #23 from PhoenicisOrg/master
ImperatorS79 May 9, 2019
da1a517
Merge pull request #26 from PhoenicisOrg/master
ImperatorS79 May 20, 2019
72863e6
Merge pull request #28 from PhoenicisOrg/master
ImperatorS79 Jun 2, 2019
f812551
Merge pull request #33 from PhoenicisOrg/master
ImperatorS79 Aug 24, 2019
28e3ac5
Update script.js
ImperatorS79 Aug 24, 2019
828aadf
Update script.js
ImperatorS79 Aug 25, 2019
cfdc573
Update script.js
ImperatorS79 Aug 25, 2019
1127d24
Update script.js
ImperatorS79 Aug 27, 2019
a6644ea
Update script.js
ImperatorS79 Sep 6, 2019
7e1539f
Update script.js
ImperatorS79 Sep 10, 2019
8ec6172
Merge branch 'master' into lol
ImperatorS79 Oct 3, 2019
8f2f9d0
Update script.js
ImperatorS79 Oct 3, 2019
d46d4a8
Update script.js
ImperatorS79 Oct 3, 2019
42349e3
Merge branch 'master' into lol
ImperatorS79 Dec 28, 2019
064102d
Merge branch 'master' into lol
ImperatorS79 Jan 2, 2020
15cc68f
Update script.js
ImperatorS79 Jan 2, 2020
0b6493c
Update script.js
ImperatorS79 Jan 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 41 additions & 62 deletions Applications/Games/League of Legends/Online/script.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
const CustomInstallerScript = include("engines.wine.quick_script.custom_installer_script");

const { getLatestStagingVersion } = include("engines.wine.engine.versions");
const { fileName, mkdir, writeToFile } = include("utils.functions.filesystem.files");

const Resource = include("utils.functions.net.resource");

const D3DX9 = include("engines.wine.verbs.d3dx9");
const Corefonts = include("engines.wine.verbs.corefonts");

const CSMT = include("engines.wine.plugins.csmt");
const OverrideDLL = include("engines.wine.plugins.override_dll");
const WindowsVersion = include("engines.wine.plugins.windows_version");

// Installs League of Legends
new CustomInstallerScript()
.name("League of Legends")
.editor("Riot Games")
.applicationHomepage("http://leagueoflegends.com/")
.author("Plata, feanor12, Thog")
.author("Plata, feanor12, Thog, TheRuntimeIsNotWorkingRey, ImperatorS79, Zemogiter, Kreyren")
.installationCommand((wizard) => {
// Select the region and download the setup file
////////////////////////////////////////////////
var regions = [
/// Select the region and download the setup file
const regions = [
"EU West",
"Latin America North",
"Latin America South",
Expand All @@ -31,80 +27,63 @@ new CustomInstallerScript()
"North America",
"Russia"
];
var selectedRegion = wizard.menu(tr("Select your region:"), regions);
var url, sha1;
var baseUrl = "https://riotgamespatcher-a.akamaihd.net/ShellInstaller/";
switch (selectedRegion.text) {
const selectedRegion = wizard.menu(tr("Select your region:"), regions);
const baseUrl = "https://riotgamespatcher-a.akamaihd.net/releases/live/installer/deploy/League%20of%20Legends%20installer%20";
let url, regionID;
switch (selectedRegion.text){
case "EU West":
url = baseUrl + "EUW/LeagueofLegends_EUW_Installer_2016_11_10.exe";
sha1 = "e8cb081395849f3753f8c00d558901b8c3df69e3";
break;
case "Latin America North":
url = baseUrl + "LA1/LeagueofLegends_LA1_Installer_2016_05_26.exe";
sha1 = "996ece64ba2ba9c8b9195c3519a6d7637d82b8d3";
break;
case "Latin America South":
url = baseUrl + "LA2/LeagueofLegends_LA2_Installer_2016_05_27.exe";
sha1 = "5c5e007ee266315b6433dd87e6692753170aab78";
break;
case "Oceania":
url = baseUrl + "OC1/LeagueofLegends_OC1_Installer_2016_05_13.exe";
sha1 = "74b9a327e66fc527edb86e9ea45c9798bdffec5f";
regionID = "EUW";
url = baseUrl+"EUW.exe";
break;
case "Japan":
url = baseUrl + "JP/LeagueofLegends_JP_Installer_2016_05_31.exe";
sha1 = "da25b973358837ef9abbb9cb3d55aae214a75de0";
regionID = "JP";
url = baseUrl+"JP.exe";
break;
case "Turkey":
url = baseUrl + "TR/LeagueofLegends_TR_Installer_2016_11_08.exe";
sha1 = "93fe9b3e581fa5cd41c504ef91ce55e4227b43e3";
regionID = "TR";
url = baseUrl+"TR.exe";
break;
case "Brasil":
url = baseUrl + "BR/LeagueofLegends_BR_Installer_2016_05_13.exe";
sha1 = "fbef6186cb690b4259e63d53d8c73e556e1d5ddc";
regionID = "BR";
url = baseUrl+"BR.exe";
break;
case "EU Nordic & East":
url = baseUrl + "EUNE/LeagueofLegends_EUNE_Installer_2016_11_10.exe";
sha1 = "17727c665ce59e3faf95c2c0db2fe5509383e750";
regionID = "EUNE";
url = baseUrl+"EUNE.exe";
break;
case "North America":
url = baseUrl + "NA/LeagueofLegends_NA_Installer_2016_05_13.exe";
sha1 = "70a253f29351f1d6952fa1af39fb8b2b01bc6cde";
regionID = "NA";
url = baseUrl+"NA.exe";
break;
case "Russia":
url = baseUrl + "RU/LeagueofLegends_RU_Installer_2016_05_13.exe";
sha1 = "2d462decf629cab880386407598f9c5ea6db2ef5";
regionID = "RU";
url = baseUrl+"RU.exe";
break;
case "Oceania":
regionID = "OCE1";
url = baseUrl+"OCE1.exe";
break;
case "Latin America North":
regionID = "LA1";
url = baseUrl+"LA1.exe";
break;
case "Latin America South":
regionID = "LA2";
url = baseUrl+"LA2.exe";
break;
}
var setupFile = new Resource()
let setupFile = new Resource()
.wizard(wizard)
.url(url)
.checksum(sha1)
.name(fileName(url))
.name("League%20of%20Legends%20installer%20" + regionID + ".exe")
.get();

return { command: setupFile, args: ["--installdir", "C:\\LoL\\", "--mode", "unattended"] };
return { command: setupFile };
})
.executable("LeagueClient.exe")
.category("Games")
.wineDistribution("staging")
.wineVersion(getLatestStagingVersion)
.preInstall((wine) => {
new WindowsVersion(wine).withWindowsVersion("winxp").go();

new D3DX9(wine).go();

new OverrideDLL(wine)
.withMode("native, builtin", ["atl120", "msvcp120", "msvcr120", "vcomp120", "msvcp140"])
.go();

new CSMT(wine).go();

mkdir(wine.prefixDirectory() + "drive_c/LoL");

// Create run script to start the right exe
/////////////////////////////////////////
var client = wine.prefixDirectory() + "drive_c/LoL/run.bat";
var batContent = "start C:\\LoL\\LeagueClient.exe";
writeToFile(client, batContent);
})
.executable("run.bat");
new Corefonts(wine).go();
});