microsoft / microsoft/winget-cli
[Feat]: Support for setting download links for different regions in manifests
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the manifest InstallerLocale and InstallerUrl fields, along with how winget selects installers for different locales or regions. Define the manifest schema and matching behavior for alternate download links, then validate that regional users receive an accessible URL without changing installer identity or integrity checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, localization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100