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

The winget PowerShell commandlets now use C#, so I should add an option for people to use them instead of my own code where available (mainly when getting the list of available packages, which would be way faster and I should be able to still get manifests somehow, or at least the descriptions and most-used parts of the manifests, out of another command). #167

Open
DrewNaylor opened this issue Jun 8, 2023 · 3 comments

Comments

@DrewNaylor
Copy link
Owner

This is in a recent winget 1.5 release: https://github.com/microsoft/winget-cli/releases/tag/v1.5.1572 . Using the PowerShell commandlets will be optional where possible, but some more-complicated features may require them as otherwise I'd have to parse text, and I don't want to do that. Will keep the code that doesn't use the PowerShell commandlets around for both compatibility and just if people don't want to use/have trouble with the PowerShell commandlets, though.

@DrewNaylor
Copy link
Owner Author

Wait, I could just do the command and have PowerShell convert it to JSON without having to add PowerShell's libraries directly and I can keep using .NET Framework. Just will have to take the JSON returned and put it into the DataTable and somehow figure out how to get the descriptions and details from each package (as the focused package is changed, for full details).

@DrewNaylor
Copy link
Owner Author

Wait, they don't have a way to get the description yet, so I'd have to still deal with the winget.exe output or extract the manifests. Could always do that thing where I take all the manifests and wrap them into a JSON file that's served from a public server using that one company I forgot about.

@DrewNaylor
Copy link
Owner Author

Oh, I just realized I can use this to say which applications in the list are installed using Get-WingetPackage (will probably have to go check each package against that commandlet as we're adding them to see if it's in there, and somehow we'll have to keep track of which packages weren't able to be marked like this as there could be more we'll just have to list).

Apparently Get-WingetPackage also allows you to filter for updatable packages, which will allow a "mark all updates" button like Synaptic to exist, in addition to a separate updater app like MintUpdate as I've mentioned before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant