Update OnlineInstallerScript Default check wine settings#1264
Update OnlineInstallerScript Default check wine settings#1264borinquenkid wants to merge 7 commits intoPhoenicisOrg:masterfrom
Conversation
|
We cannot do it like this. The scripts should use the default or specify it via e.g. .wineVersion(getLatestStagingVersion)
.wineDistribution("staging")If the default version (latest stable) is not fetched correctly anymore, we must fix that. See |
Add conditions for MacOSX
There was a problem hiding this comment.
I don't know how to elegantly combine the version logic with the architecture and distribution logic
The only distro-architecture that works on intel mac is cx-x86on64. I imagine that m2 macs would be cx-amd64, so we would need some other flag on the Java side to detect M2
plata
left a comment
There was a problem hiding this comment.
The upstream builds for Darwin do not work?
| module.getLatestStableVersion = function (wizard, architecture) { | ||
| return getLatestVersion(wizard, "upstream-linux-" + architecture, /^\d+\.0(\.\d+)?$/); | ||
| const os = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage() | ||
| const arch = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage() === "darwin" ? "x86on64" : "x86"; |
There was a problem hiding this comment.
Use the architecture parameter. You've already fixed the default _wineArchitecture in QuickScript, so it should work without further changes.
| return getLatestVersion(wizard, "upstream-linux-" + architecture, /^\d+\.0(\.\d+)?$/); | ||
| const os = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage() | ||
| const arch = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage() === "darwin" ? "x86on64" : "x86"; | ||
| const distribution = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage() === "darwin" ? "cx" : "upstream"; |
There was a problem hiding this comment.
Pass the distribution as additional parameter (like architecture). See
MacOS except for really old is all 64 bit, so x86on64 is only cx. If on an AMD64 machine they can switch by hand to amd64 engine. |
|
Could not figure out your exact implementation, but I hope this is acceptable |
| 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+)?$/); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I added the field wineDistribution to QuickScript.
| constructor() { | ||
| this._winePackage = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage() | ||
| this._wineArchitecture = this._winePackage === "darwin" ? "x86on64" : "x86"; | ||
| this._wineDistribution = this._winePackage === "darwin" ? "cx" : "upstream"; |
There was a problem hiding this comment.
Prototyped field wineDistribution
|
I understand that the variables exist in |
|
Please check https://phoenicisorg.github.io/scripts/General/tools/. Somehow the formatting got messed up. |
|
I ran ESLint |
| return getLatestVersion(wizard, `${this._wineDistribution}-${this._winePackage}-${architecture}`, /^\d+\.0(\.\d+)?$/); | ||
| } | ||
|
|
||
| module.getLatestStableVersion = function (wizard, distribution, winePackage, architecture) { |
There was a problem hiding this comment.
Yes, this is how it should be. Just remove the other getLatestStableVersion and update getLatestDevelopmentVersion and getLatestStagingVersion. Then, ensure that it's called everywhere with the correct parameters.
…entVersion is neeeded
| const wine = new Wine() | ||
| .wizard(setupWizard) | ||
| .prefix("InternetExplorer6", "upstream", "x86", getLatestStableVersion(setupWizard, "x86")) | ||
| .prefix("InternetExplorer6", "upstream", "x86", getLatestStableVersion(setupWizard, null, null, "x86")) |
There was a problem hiding this comment.
Did you try this? PlainInstaller is not a QuickScript, so I don't see how this._wineDistribution etc. should be set. Generally, I think it would be better to explicitly pass all parameters everywhere (Versions should provide a set of functions and not depend on QuickScript).
|
|
||
| module.default = class QuickScript { | ||
| constructor() { | ||
| this._winePackage = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage() |
There was a problem hiding this comment.
| this._winePackage = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage() | |
| this._winePackage = operatingSystemFetcher.fetchCurrentOperationSystem().getWinePackage(); |
Description
Currently OnlineInstallerScript does not work correctly since it defaults to upstream and no version.
Asking for wine settings configures correctly
What works
What was not tested
Test
Ready for review
json-alignandeslintrun according to the documentation.