Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
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
8 changes: 5 additions & 3 deletions Engines/Wine/Engine/Versions/script.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { cat, touch } = include("utils.functions.filesystem.files");
const Downloader = include("utils.functions.net.download");
const propertyReader = Bean("propertyReader");
const operatingSystemFetcher = Bean("operatingSystemFetcher");

/**
* Sorts an array of Wine versions in place
Expand Down Expand Up @@ -122,15 +123,16 @@ module.getAvailableVersions = function (wizard) {


module.getLatestStableVersion = function (wizard, architecture) {
return getLatestVersion(wizard, "upstream-linux-" + architecture, /^\d+\.0(\.\d+)?$/);
return getLatestVersion(wizard, `${this._wineDistribution}-${this._winePackage}-${architecture}`, /^\d+\.0(\.\d+)?$/);
Copy link
Collaborator

Choose a reason for hiding this comment

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

The idea was more:

module.getLatestStableVersion = function (wizard, distribution, package, architecture) {
    return getLatestVersion(wizard, `${distribution}-${package}-${architecture}`, /^\d+\.0(\.\d+)?$/);

Honestly, I don't even understand how the current implementation can work, e.g. this._wineDistribution should not exist here.

Copy link
Author

Choose a reason for hiding this comment

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

I added the field wineDistribution to QuickScript.

}

module.getLatestDevelopmentVersion = function (wizard, architecture) {
return getLatestVersion(wizard, "upstream-linux-" + architecture, /^\d+\.\d+(\.\d+)?$/);
return getLatestVersion(wizard, `${this._wineDistribution}-${this._winePackage}-${architecture}`, /^\d+\.0(\.\d+)?$/);
}

module.getLatestStagingVersion = function (wizard, architecture) {
return getLatestVersion(wizard, "staging-linux-" + architecture, /^\d+\.\d+(\.\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
1 change: 0 additions & 1 deletion Engines/Wine/QuickScript/Online Installer Script/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const { createTempFile } = include("utils.functions.filesystem.files");
module.default = class OnlineInstallerScript extends InstallerScript {
constructor() {
super();

this._installationArgs = [];
}

Expand Down
6 changes: 4 additions & 2 deletions Engines/Wine/QuickScript/Quick Script/script.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
const { getLatestStableVersion } = include("engines.wine.engine.versions");
const WineShortcut = include("engines.wine.shortcuts.wine");
const operatingSystemFetcher = Bean("operatingSystemFetcher");

module.default = class QuickScript {
constructor() {
this._winePackage = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage()
Copy link
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
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 = "x86";
this._wineDistribution = "upstream";
this._wineUserSettings = false;

this._type = "Applications";
Expand Down