Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
4ddf348
Update The Sims 3 (use Wine stable) (#1002)
Zemogiter Jun 11, 2019
cbe9e47
Update runtime: always download latest runtime (#1007)
ImperatorS79 Jun 12, 2019
732b832
Update translations
Jun 12, 2019
c6881e8
Update JSDoc
Jun 12, 2019
a25479b
Add RimWorld (#1004)
Zemogiter Jun 13, 2019
3d496b8
Update translations
Jun 13, 2019
bb97678
Add PR template (#991)
ImperatorS79 Jun 16, 2019
933b405
Add LD_LIBRARY_PATH to terminal opener
ImperatorS79 Jun 16, 2019
c4e4b16
Update JSDoc
Jun 16, 2019
a09ede3
Refactor the ShortcutReader and WineShortcutReader Classes (#1008)
madoar Jun 16, 2019
65cb166
Update translations
Jun 16, 2019
662e0d4
Update JSDoc
Jun 16, 2019
e395b93
Update Wine LATEST_DEVELOPMENT_VERSION and LATEST_STAGING_VERSION to …
plata Jun 22, 2019
3f8e528
Update JSDoc
Jun 22, 2019
7b508dc
Refactor the Quick Script Classes (#1010)
madoar Jun 22, 2019
88d414f
Update translations
Jun 22, 2019
b81adc5
Update JSDoc
Jun 22, 2019
52d2b7c
Add D9VK verb (#932)
ImperatorS79 Jun 22, 2019
d90fd97
Update translations
Jun 22, 2019
91d9f97
Update JSDoc
Jun 22, 2019
2a39bd4
Fix an error with libncurses from runtime (#1019)
ImperatorS79 Jun 22, 2019
968b8ee
Update JSDoc
Jun 22, 2019
35ba594
Update Mp3tag, updated link and checksum (#1032)
Zemogiter Jun 23, 2019
66018b5
Update DXVK (add version 1.2.2) (#1031)
Zemogiter Jun 23, 2019
13c152d
Update JSDoc
Jun 23, 2019
0ff5fbf
Update Wine LATEST_DEVELOPMENT_VERSION and LATEST_STAGING_VERSION to …
plata Jun 24, 2019
4d183d3
Update JSDoc
Jun 24, 2019
99abb12
ESLint: activate ES6 support (#1037)
plata Jun 25, 2019
da0ec86
Update FAudio (add new versions, remove x32 support) (#1033)
Zemogiter Jun 26, 2019
d0dd05b
Update translations
Jun 26, 2019
5d44883
Update JSDoc
Jun 26, 2019
8ea9388
Add gallium9 verb (#854)
ImperatorS79 Jun 26, 2019
4bc19dd
Update translations
Jun 26, 2019
d3a1b44
Update JSDoc
Jun 26, 2019
03dee17
Fix some Issues with ShortcutReader (#1035)
madoar Jun 28, 2019
53f5a6f
Update translations
Jun 28, 2019
a5b28d4
Update JSDoc
Jun 28, 2019
a1cb1a2
Read environment variables and trust level from shortcut (#956)
ImperatorS79 Jun 28, 2019
bba2f5b
Add font smoothing settings (#943)
ImperatorS79 Jun 28, 2019
d10e59d
Update translations
Jun 28, 2019
57e5336
Update JSDoc
Jun 28, 2019
9fa0d64
Refactor "filesystem.files" utility functions (#1034)
madoar Jun 29, 2019
3fb9372
Update translations
Jun 29, 2019
2cd18e5
Fix a "TypeError" Exception when deleting a Wine Container (#1042)
madoar Jun 29, 2019
3d2a0c1
Update translations
Jun 29, 2019
d299ef6
Update JSDoc
Jun 29, 2019
e44df8b
Simplify the Installer Scripts (#1011)
madoar Jun 30, 2019
7f15ff0
Simplify the Settings Scripts (#1016)
madoar Jun 30, 2019
4fc2cf1
Simplify the Verb Scripts (#1015)
madoar Jun 30, 2019
98a9e9d
Simplify the Tool Scripts (#1017)
madoar Jun 30, 2019
d7d165a
Simplify the Engine Scripts (#1018)
madoar Jun 30, 2019
3aaec0a
Update runtime: fix an error when a directory does not exist (#1045)
ImperatorS79 Jun 30, 2019
8fd20c8
Update translations
Jun 30, 2019
6bc41e6
Update JSDoc
Jun 30, 2019
447c585
Refactor both the CabExtract and the Extract Classes (#1047)
madoar Jul 1, 2019
b5f2815
Refactor the "AppResource" class (#1046)
madoar Jul 1, 2019
3f65ede
Refactor the Downloader class (#1048)
madoar Jul 1, 2019
b17349c
Refactor the Resource class (#1049)
madoar Jul 1, 2019
1bd21b6
Update translations
Jul 1, 2019
c1d55db
Update JSDoc
Jul 1, 2019
cccac1d
Fix x86 runtime not being downloaded (#1050)
ImperatorS79 Jul 1, 2019
88f02ff
Update translations
Jul 1, 2019
e458367
Update JSDoc
Jul 1, 2019
e50d8f0
Fix bad class naming for gallium 9 verb (#1053)
ImperatorS79 Jul 2, 2019
a99f4f3
Refactor the WineShortcut Class (#1044)
madoar Jul 2, 2019
3f9301d
Update translations
Jul 2, 2019
cd2737e
Update JSDoc
Jul 2, 2019
d29f27e
Fix: InstallerScript does not wait until installation is finished (#1…
plata Jul 3, 2019
def31c8
Update adobeair (fix checksum) (#1060)
Jul 4, 2019
64dea3c
Update JSDoc
Jul 4, 2019
bc93023
Refactor InstallerScript (#1063)
madoar Jul 6, 2019
98eab66
Update translations
Jul 6, 2019
16bc4fb
Refactor the GOGScript Class (#1064)
madoar Jul 6, 2019
3151f37
Update translations
Jul 6, 2019
71b4fba
Update JSDoc
Jul 6, 2019
f53aa85
Add Space Engineers (#725)
Zemogiter Jul 6, 2019
d361fa3
Update translations
Jul 6, 2019
e3ec168
Refactor the Wine Engine Implementation Sourcecode (#1067)
madoar Jul 7, 2019
0efe63a
Update translations
Jul 7, 2019
b63c7bc
Update JSDoc
Jul 7, 2019
c7b83ac
Update Space Engineers (fix typo in message) (#1071)
kant Jul 8, 2019
325be9c
Update translations
Jul 8, 2019
5a600be
Update font smoothing verb (throw error if no mode specified) (#1072)
plata Jul 8, 2019
8b9dae3
Update translations
Jul 8, 2019
2fb20c4
Update JSDoc
Jul 8, 2019
472b4ba
Refactor the Wine Engine Object (#1066)
madoar Jul 9, 2019
a5394ce
Update translations
Jul 9, 2019
749c609
Update JSDoc
Jul 9, 2019
1129f35
Update Wine LATEST_DEVELOPMENT_VERSION and LATEST_STAGING_VERSION to …
plata Aug 3, 2019
ecd735e
Update JSDoc
Aug 3, 2019
920c415
Add simple Module System for "include" (#1076)
madoar Aug 11, 2019
07dea86
Update translations
Aug 11, 2019
377e4ff
Update JSDoc
Aug 11, 2019
79537f8
Update Wine LATEST_DEVELOPMENT_VERSION and LATEST_STAGING_VERSION to …
plata Aug 13, 2019
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
Prev Previous commit
Next Next commit
Fix x86 runtime not being downloaded (PhoenicisOrg#1050)
  • Loading branch information
ImperatorS79 authored Jul 1, 2019
commit cccac1de4ed5c991de2e01fe53bd53c2686ee813
122 changes: 78 additions & 44 deletions Engines/Wine/Engine/Implementation/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,13 @@ class WineEngine {
}
}
_installRuntime(setupWizard) {
var runtimeJsonPath = this._wineEnginesDirectory + "/runtime.json";
var runtimeJson;
var runtimeJsonFile;
var download = false;
var name;
const runtimeJsonPath = this._wineEnginesDirectory + "/runtime.json";
let runtimeJson;
let runtimeJsonFile;
let downloadx86 = false;
let downloadx64 = false;
let namex86;
let namex64;
if (!fileExists(runtimeJsonPath)) {
mkdir(this._wineEnginesDirectory + "/runtime");
runtimeJsonFile = new Downloader()
Expand All @@ -119,22 +121,30 @@ class WineEngine {
.get();

runtimeJson = JSON.parse(cat(runtimeJsonFile));
download = true;

var maxVersion = 0;
runtimeJson.forEach(function (archive) {
if (archive.arch == "amd64") {
if (archive.name > maxVersion) {
maxVersion = archive.name;
downloadx86 = true;
downloadx64 = true;

let maxVersionx86 = 0;
let maxVersionx64 = 0;
runtimeJson.forEach(archive => {
if (archive.arch === "amd64") {
if (archive.name > maxVersionx64) {
maxVersionx64 = archive.name;
}
}
else if (archive.arch === "x86") {
if (archive.name > maxVersionx86) {
maxVersionx86 = archive.name;
}
}
});

name = maxVersion;
namex86 = maxVersionx86;
namex64 = maxVersionx64;
}
else {
var oldRuntimeJsonFile = cat(this._wineEnginesDirectory + "/runtime.json");
var oldRuntimeJson = JSON.parse(oldRuntimeJsonFile);
const oldRuntimeJsonFile = cat(this._wineEnginesDirectory + "/runtime.json");
const oldRuntimeJson = JSON.parse(oldRuntimeJsonFile);

runtimeJsonFile = new Downloader()
.wizard(this._wizard)
Expand All @@ -145,73 +155,97 @@ class WineEngine {

runtimeJson = JSON.parse(cat(runtimeJsonFile));

var maxVersion2 = 0;
let maxVersion2x86 = 0;
let maxVersion2x64 = 0;

runtimeJson.forEach(function (archive) {
if (archive.arch == "amd64") {
if (archive.name > maxVersion2) {
maxVersion2 = archive.name;
runtimeJson.forEach(archive => {
if (archive.arch === "amd64") {
if (archive.name > maxVersion2x64) {
maxVersion2x64 = archive.name;
}
}
else if (archive.arch === "x86") {
if (archive.name > maxVersion2x86) {
maxVersion2x86 = archive.name;
}
}
});

var oldMaxVersion = 0;
let oldMaxVersionx86 = 0;
let oldMaxVersionx64 = 0;

oldRuntimeJson.forEach(function (archive) {
if (archive.arch == "amd64") {
if (archive.name > oldMaxVersion) {
oldMaxVersion = archive.name;
oldRuntimeJson.forEach(archive => {
if (archive.arch === "amd64") {
if (archive.name > oldMaxVersionx64) {
oldMaxVersionx64 = archive.name;
}
}
else if (archive.arch === "x86") {
if (archive.name > oldMaxVersionx86) {
oldMaxVersionx86 = archive.name;
}
}
});

if (maxVersion2 > oldMaxVersion) {
name = maxVersion2;
download = true;
if (maxVersion2x86 > oldMaxVersionx86) {
namex86 = maxVersion2x86;
downloadx86 = true;
}
if (maxVersion2x64 > oldMaxVersionx64) {
namex64 = maxVersion2x64;
downloadx64 = true;
}

}

if (download == true) {
if (fileExists(this._wineEnginesDirectory + "/runtime/lib")) {
remove(this._wineEnginesDirectory + "/runtime/lib");
}
if (downloadx64 === true) {
if (fileExists(this._wineEnginesDirectory + "/runtime/lib64")) {
remove(this._wineEnginesDirectory + "/runtime/lib64");
}
mkdir(this._wineEnginesDirectory + "/TMP");
var that = this;
runtimeJson.forEach(function (archive) {
var runtime;
if (archive.name == name) {
if (archive.arch == "x86") {
runtimeJson.forEach(archive => {
let runtime;
if (archive.name === namex64) {
if (archive.arch === "amd64") {
runtime = new Downloader()
.wizard(setupWizard)
.url(archive.url)
.message(tr("Downloading x86 runtime..."))
.message(tr("Downloading amd64 runtime..."))
.checksum(archive.sha1sum)
.to(that._wineEnginesDirectory + "/TMP/" + archive.url.substring(archive.url.lastIndexOf('/') + 1))
.to(this._wineEnginesDirectory + "/TMP/" + archive.url.substring(archive.url.lastIndexOf('/') + 1))
.get();

new Extractor()
.wizard(setupWizard)
.archive(runtime)
.to(that._wineEnginesDirectory + "/runtime")
.to(this._wineEnginesDirectory + "/runtime")
.extract();
}
else {
}
});
remove(this._wineEnginesDirectory + "/TMP");
}
if (downloadx86 === true) {
if (fileExists(this._wineEnginesDirectory + "/runtime/lib")) {
remove(this._wineEnginesDirectory + "/runtime/lib");
}
mkdir(this._wineEnginesDirectory + "/TMP");
runtimeJson.forEach(archive => {
let runtime;
if (archive.name === namex86) {
if (archive.arch === "x86") {
runtime = new Downloader()
.wizard(setupWizard)
.url(archive.url)
.message(tr("Downloading amd64 runtime..."))
.message(tr("Downloading x86 runtime..."))
.checksum(archive.sha1sum)
.to(that._wineEnginesDirectory + "/TMP/" + archive.url.substring(archive.url.lastIndexOf('/') + 1))
.to(this._wineEnginesDirectory + "/TMP/" + archive.url.substring(archive.url.lastIndexOf('/') + 1))
.get();

new Extractor()
.wizard(setupWizard)
.archive(runtime)
.to(that._wineEnginesDirectory + "/runtime")
.to(this._wineEnginesDirectory + "/runtime")
.extract();
}
}
Expand Down