Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature proposal] Conditional parameters #1089

Closed
gvvad opened this issue Jun 3, 2021 · 7 comments
Closed

[Feature proposal] Conditional parameters #1089

gvvad opened this issue Jun 3, 2021 · 7 comments
Labels
Area-Manifest This may require a change to the manifest Issue-Feature This is a feature request for the Windows Package Manager client. Resolution-Duplicate Issue is a duplicate
Milestone

Comments

@gvvad
Copy link

gvvad commented Jun 3, 2021

Description:

Instead of a system of different scenarios (Silent, SilentWithProgress, Interactive...), provide "conditional parameters" which will be added by condition. Some conditions(flags) will be true by default, such as "silent install". But the user can override them, turn them on / off at their own discretion.
This is not a replacement for the existing system, but rather an improvement. Also will be good to add "uninstall" scenario.

Proposed technical implementation details:

Provide parameters in manifest:
Installers:
...
InstallParam: $isSilent{$isVerysilent{/VERYSILENT:/SILENT}} $isUser{/CURRENTUSER:/ALLUSERS} $isIcon{:/NOICONS}
UpgradeParam: $isNorestart{/NORESTART} $isLog{$isLogfile{/LOG={logfile}:/LOG}}
...
Provide parameters to winget:
winget install foo --noicon
winget install foo --alluser --noicon --verysilent
winget upgrade foo --log
winget upgrade foo --log="c:\path\to\logfile.txt"

@gvvad gvvad added the Issue-Feature This is a feature request for the Windows Package Manager client. label Jun 3, 2021
@ghost ghost added the Needs-Triage Issue need to be triaged label Jun 3, 2021
@iDolmatov
Copy link

winget uninstall already exist.
winget install <app name> --override already exist. See also #239 - the issue of additional recording of switches is being discussed, and not their complete rewriting.

@gvvad
Copy link
Author

gvvad commented Jun 3, 2021

winget uninstall already exist.

This command just execute "uninstaller", like you remove program from "Control panel". And there is no way to define parameters in manifest file.
#239 discus about "user custom" parameters. In my opinion this is wrong way. I propose to define a list of parameters that you can optionally pass to installer | uninstaller | upgrader.

@denelon denelon removed the Needs-Triage Issue need to be triaged label Jun 3, 2021
@denelon denelon added this to the Backlog - Windows Package Manager milestone Jun 3, 2021
@denelon
Copy link
Contributor

denelon commented Jun 3, 2021

@gvvad I think we have a path for the install scenario lined up. The manifest supports switches per install mode, and they are combined with the "custom" switches. These essentially ensure the installer is functioning for the default install modes. With #239 users can extend the existing set of switches, and with "override" users can replace all of the switches with what ever they choose to pass to the installer.

The uninstall and upgrade scenario you are suggesting makes sense to me. We could add an "Uninstall" and "Upgrade" node for switches to be passed to the installer by default as specified in a manifest, and we could support an override switch for that use case as well with the same behavior as the install scenario.

The problem with defining a list of parameters is that there is no single set of "standard" switches that apply to MSIX, MSI, Inno, NullSoft, Wix, Burn, Squirrel, or custom .exe installers. I believe we would be trying to build a list of "sentinel" values, and that would be overly complex to maintain over time.

@gvvad
Copy link
Author

gvvad commented Jun 4, 2021

The problem with defining a list of parameters is that there is no single set of "standard" switches

Yes, this is the key problem. And I suggest defining a list of the most common flags such as "isSilent", "isRun", "isRestart", "isIcon" etc. And "maintainer" will be able to define them by using special syntax, like:
$condition{"value if true":"value if false"}
The user does not know which parameters are supported by this or that installer. Therefore, this task can be delegated to the maintainer.

@denelon denelon added the Area-Manifest This may require a change to the manifest label Jun 25, 2021
@Trenly
Copy link
Contributor

Trenly commented Aug 9, 2022

@denelon -
Install, Upgrade, Location, Scope, and Logs already are covered, and uninstall has a more detailed request in #1885. I believe switches for desktop shortcuts are covered in #1045, meaning this issue could be closed for clarity, as all remaining issues are being tracked with more detail?

@denelon
Copy link
Contributor

denelon commented Aug 9, 2022

@Trenly thanks for digging through this request. I agree. @gvvad please add your 👍to the other issues.

Duplicate of #1885

Related:

@denelon denelon closed this as completed Aug 9, 2022
@ghost
Copy link

ghost commented Aug 9, 2022

@gvvad we've identified this Issue as a duplicate of another one that already exists. This specific instance is being closed in favor of tracking the concern over on the referenced Issue. Thanks for your report! Be sure to add your 👍 to the other issue to help raise the priority.

@ghost ghost added the Resolution-Duplicate Issue is a duplicate label Aug 9, 2022
@denelon denelon modified the milestones: Backlog-Client, v1.4-Client Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Manifest This may require a change to the manifest Issue-Feature This is a feature request for the Windows Package Manager client. Resolution-Duplicate Issue is a duplicate
Projects
None yet
Development

No branches or pull requests

4 participants