forked from PhoenicisOrg/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
44 lines (43 loc) · 1.72 KB
/
script.js
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
include("engines.wine.quick_script.online_installer_script");
include("engines.wine.verbs.d3dx9");
const {ls, mkdir, fileExists, cat, cp, getFileSize, fileName, lns, remove, touch, writeToFile, createTempFile, createTempDir, chmod, Checksum} = include("utils.functions.filesystem.files");
new OnlineInstallerScript()
.name("STAR WARS™: The Old Republic")
.editor("BioWare")
.applicationHomepage("http://www.swtor.com/")
.author("ImperatorS79")
.wineVersion(LATEST_STAGING_VERSION)
.wineDistribution("staging") //minimum version to run it, see https://dev.wine-staging.com/patches/164/
.url("https://swtor-a.akamaihd.net/installer/SWTOR_setup.exe")
.checksum("c538935eff4ec90ce2e48dc7e515a8dec2f15f58")
.category("Games")
.executable("launcher.exe")
.preInstall(function (wine /*, wizard*/) {
//it seems it brings better performance
wine.d3dx9();
})
.postInstall(function (wine /*, wizard*/) {
//without that the launcher is unable to download the game
var path =
wine.prefixDirectory() +
"drive_c/" +
wine.programFiles() +
"/Electronic Arts/BioWare/Star Wars - The Old Republic/launcher.settings";
var content =
'{ "Login": ""\n' +
', "LastProduct": ""\n' +
', "downloadRate": "0"\n' +
', "language": ""\n' +
', "TestServerAccess": "No"\n' +
', "SpecHash": ""\n' +
', "AutoClose": "NONE"\n' +
', "KillKillProc": false\n' +
', "LastMode": ""\n' +
', "PatchingMode": "{ \\"swtor\\": \\"SSN\\" }"\n' +
', "bitraider_download_complete": { }\n' +
', "log_levels": "INFO,SSNFO,ERROR"\n' +
', "bitraider_disable": true\n' +
', "loglevels": "INFO,SSNFO,ERROR"\n' +
"}";
writeToFile(path, content);
});