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

Built-in WinGet extension #342

Closed
zadjii-msft opened this issue Jan 18, 2025 · 1 comment · Fixed by #356
Closed

Built-in WinGet extension #342

zadjii-msft opened this issue Jan 18, 2025 · 1 comment · Fixed by #356

Comments

@zadjii-msft
Copy link
Owner

Users should be able to search for packages on winget and install them quickly.

Needed for #89

@zadjii-msft
Copy link
Owner Author

Some notes from teams, re: https://github.com/zadjii/CmdPalExtensions/tree/main/src/extensions/WinGetExtension, which is where I'm standing this up

  1. Prefer DefaultInstallVersion over AvailableVersions[0]
  2. The latest 1.10 preview version of the nuget provides a much improved experience, including an in-proc factory thunk dll that means you can use the built in projection flow for creating objects rather than having to CoCreate them yourself.
  3. For DoSearchAsync; the field CatalogDefault is the one to use for the general "search everything for this string". You should be able to use that and have a single search per connected catalog.
  4. RemotePackagesFromRemoteCatalogs is meant for combining multiple catalogs of available packages into one; it will never have local with it. This enum constantly confuses me as well. I suspect you want
    • AllCatalogs and to handle things that are installed differently.
    • LocalCatalogs :: Searches are only performed against installed items, but we will correlate installed items with catalogs provided
    • RemotePackagesFromRemoteCatalogs :: Combines the given catalogs into a single catalog, installed never considered.
    • RemotePackagesFromAllCatalogs :: Searches only the catalogs provided, but will correlated with installed items.
    • AllCatalogs :: Searches all catalogs and correlates.
  5. For package equality you should also check that they come from the same catalog.
  6. CheckInstalledStatus* is used for a more complete verification of the installation of a package. Having an InstalledVersion that is not null is probably good enough for most uses (when the composite has installed items allowed).

UpdateInterval:
Setting it to 0 means it will never be updated by your calls, although it will be initialized if not present regardless. I'm not sure what the lifetime of your connected catalog is, so it is hard for me to give a good suggestion.

@zadjii-msft zadjii-msft linked a pull request Jan 22, 2025 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant