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

[Feat]: Support for setting download links for different regions in manifests #5138

Open
DuckDuckStudio opened this issue Jan 15, 2025 · 1 comment
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@DuckDuckStudio
Copy link

DuckDuckStudio commented Jan 15, 2025

Description of the new feature / enhancement

I've found packages that distribute the exact same installer in two different places, and users in certain areas can't access one of those places. If the manifest only contains the distribution location that they can't access (or have a hard time accessing), then they can't (or have a hard time) getting this package through winget.
For example:
The author of the package abgox.InputTip distributes the application on GitHub and Gitee. Users located in China may find it difficult to access GitHub due to policy reasons, which requires winget to choose the distribution link on Gitee instead of GitHub.

Proposed technical implementation details

I know this can now be fixed using InstallerLocale: zh-CN, but I'm not sure if an installer can set more than one InstallerLocale, and the entry looks more like of an indication of the installer language than a download link.
My personal thoughts on manifests:

Installers:
- Architecture: x64
  InstallerType: zip
  NestedInstallerType: portable
  NestedInstallerFiles:
  - RelativeFilePath: InputTip/InputTip.exe
  InstallerUrl: https://github.com/abgox/InputTip/releases/download/v2.30.2/InputTip.zip
  OtherLocale:
    - Locale: zh
    - InstallerUrl: https://gitee.com/abgox/InputTip/releases/download/v2.30.2/InputTip.zip
  InstallerSha256: 3546A076EFBEDCCC4E6FC6B7C86B13C73B4D7104AE8D1AEFCA6C622CFB79F05C
- Architecture: x64
  InstallerType: portable
  InstallerUrl: https://github.com/abgox/InputTip/releases/download/v2.30.2/InputTip.exe
  OtherLocale:
    - Locale: zh
    - InstallerUrl: https://gitee.com/abgox/InputTip/releases/download/v2.30.2/InputTip.exe
  InstallerSha256: D0F118653EE147521CEBFA5D3C7DC8198EB371B1A766112C57F382478CC14994
# zh -> zh-CN, zh-TW, zh-HK... -> Or China
# Multiple regions separated by , ?

Edit: Remove NOTE for installer.

@DuckDuckStudio DuckDuckStudio added the Issue-Feature This is a feature request for the Windows Package Manager client. label Jan 15, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Jan 15, 2025
@Trenly
Copy link
Contributor

Trenly commented Jan 15, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests

2 participants