Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
16 changes: 4 additions & 12 deletions Engines/Wine/Engine/Versions/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,24 +123,16 @@ module.getAvailableVersions = function (wizard) {


module.getLatestStableVersion = function (wizard, architecture) {
const os = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage()
const arch = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage() === "darwin" ? "x86on64" : "x86";
const distribution = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage() === "darwin" ? "cx" : "upstream";
return getLatestVersion(wizard, `${distribution}-${os}-${arch}`, /^\d+\.0(\.\d+)?$/);
return getLatestVersion(wizard, `${this._wineDistribution}-${this._winePackage}-${architecture}`, /^\d+\.0(\.\d+)?$/);
}

module.getLatestDevelopmentVersion = function (wizard, architecture) {
const os = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage()
const arch = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage() === "darwin" ? "x86on64" : "x86";
const distribution = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage() === "darwin" ? "cx" : "upstream";
return getLatestVersion(wizard, `${distribution}-${os}-${arch}`, /^\d+\.0(\.\d+)?$/);
return getLatestVersion(wizard, `${this._wineDistribution}-${this._winePackage}-${architecture}`, /^\d+\.0(\.\d+)?$/);
}

module.getLatestStagingVersion = function (wizard, architecture) {
const os = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage()
const arch = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage() === "darwin" ? "x86on64" : "x86";
const distribution = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage() === "darwin" ? "cx" : "staging";
return getLatestVersion(wizard, `${distribution}-${os}-${arch}`, /^\d+\.0(\.\d+)?$/);
const distribution = this._winePackage === "darwin" ? "cx" : "staging";
return getLatestVersion(wizard, `${distribution}-${this._winePackage}-${architecture}`, /^\d+\.0(\.\d+)?$/);
}

module.getLatestDosSupportVersion = function (/*wizard, architecture*/) {
Expand Down
5 changes: 3 additions & 2 deletions Engines/Wine/QuickScript/Quick Script/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ const operatingSystemFetcher = Bean("operatingSystemFetcher");

module.default = class QuickScript {
constructor() {
this._winePackage = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this._winePackage = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage()
this._winePackage = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage();

this._wineArchitecture = this._winePackage === "darwin" ? "x86on64" : "x86";
this._wineDistribution = this._winePackage === "darwin" ? "cx" : "upstream";
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prototyped field wineDistribution

this._wineVersionFunction = getLatestStableVersion;
this._wineArchitecture = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage() === "darwin" ? "x86on64" : "x86";
this._wineDistribution = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage() === "darwin" ? "cx" : "upstream";
this._wineUserSettings = false;

this._type = "Applications";
Expand Down