microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.35k stars 1.45k forks source link

Fix Repair-WinGetPackageManager cmdlet by retrieving dependencies from GitHub assets #4923

Closed ryfu-msft closed 3 weeks ago

ryfu-msft commented 3 weeks ago

This change address an issue with Repair-WinGetPackageManager not installing the correct version of VCLibs before installing winget. The reason this issue came up was because the aka.ms links for the VCLibs package are deprecated and now point to an out of date package.

The solution here is to include both a DesktopAppInstaller_Dependencies.json and DesktopAppInstaller_Dependencies.zip asset along with each release. Repair-WinGetPackageManager will look for those files and check what dependencies are required from the json file. If any of those dependencies are missing, it will download the zip, extract, and install the required binaries based on the system architecture.

Testing: Verified with the fresh Windows Sandbox install and trying out the assets on an earlier prerelease.

Microsoft Reviewers: Open in CodeFlow

Related to:

mdanish-kh commented 3 weeks ago

Does this address #4778 as well?

JohnMcPMS commented 3 weeks ago

Does this address #4778 as well?

It addresses the Repair-WinGetPackageManager portion of it, but we are not trying to address the broader availability through this change.