PhoenicisOrg / scripts

Phoenicis scripts
GNU Lesser General Public License v3.0
64 stars 49 forks source link

Update latest Wine versions automatically #1153

Closed plata closed 4 years ago

plata commented 4 years ago

Description

fixes #445

What works

general concept

What was not tested

all the scripts

madoar commented 4 years ago

To make the wizard accessible inside the installer script we could think about passing getLatestStagingVersion as a function to wineVersion by calling:

   ...
   .wineVersion(getLatestStagingVersion)
   ...

This would allow us to "inject" the wizard from inside the implementation of wineVersion

plata commented 4 years ago

I've thought about that as well but I don't really like it. It requires that we call the function in every QuickScript and it's a bit strange to pass a function here but a value e.g. for wineArchitecture. I have no better solution though.

madoar commented 4 years ago

it's a bit strange to pass a function here but a value e.g. for wineArchitecture

We could do the same for wineArchitecture

I've thought about that as well but I don't really like it. It requires that we call the function in every QuickScript

I like the style of passing functions where it makes sense. From a user perspective it is also quite clear to me what happens. It only becomes problematic if an error occurs for some reason and we provide no useful error messages.

plata commented 4 years ago

I really would like to avoid that people have to write

.wineVersion(function() { return "4.0.3"; } );

instead of

.wineVersion("4.0.3");
madoar commented 4 years ago

You don't have this problem. We can allow both a function input and a string input. This is possible if you check the type of the parameter in the wineVersion method.

plata commented 4 years ago

I will try.