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

Fix the Improved Icon Detection #3347

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mrixner
Copy link
Contributor

@mrixner mrixner commented Feb 22, 2025

  • I have read the contributing guidelines, and I agree with the Code of Conduct.
  • Have you checked that there aren't other open pull requests for the same changes?
  • Have you tested that the committed code can be executed without errors?
  • This PR is not composed of garbage changes used to farm GitHub activity to enter potential Crypto AirDrops.
    Any user suspected of farming GitHub activity with crypto purposes will get banned. Submitting broken code wastes the contributors' time, who have to spend their free time reviewing, fixing, and testing code that does not even compile breaks other features, or does not introduce any useful changes. I appreciate your understanding.

This PR fixes #3189; that PR was checking for sources in the manager section and was also partially getting the logic wrong. Here's the tested, updated, revised, etc logic (for ALL checks, as they are in the code right now):

Winget - Steam: convert to steamapp:{id}
Winget - Local PC: remove anything before a \
Winget - Microsoft Store: remove the publisher (or anything before a \ if there is no publisher) and the _version_architecture__random-id (note that if the version has multiple underscores, only the last four underscores remove what is after them, so there can be underscores in a normalized ID)
Winget: remove the publisher
Scoop: remove .app
Chocolatey: remove .install and .portable
vcpkg: remove the triplet and any build options

All are in lowercase.

Package Manager Source Manager-Provided ID Normalized (Icon) ID
Winget Steam ARP\Machine\X64\Steam App 32440 steam:32440
Winget Steam ARP\Machine\X64\Steam App 32470 steam:32470
Winget Steam ARP\Machine\X64\Steam App 32510 steam:32510
Winget Local PC ARP\Machine\X64\MozillaMaintenanceService mozillamaintenanceservice
Winget Local PC ARP\Machine\X86\{F1E37C98-16B7-421F-BA33-6C5B5400012A} {f1e37c98-16b7-421f-ba33-6c5b5400012a}
Winget Local PC ARP\Machine\X64\{40F0DCB4-E81A-45CE-A596-F2D083E1D535}_is1 {40f0dcb4-e81a-45ce-a596-f2d083e1d535}_is1
Winget Microsoft Store MSIX\35795FlorianHeidenreich.Mp3tag.ShellExtension_3.26.2.0_x64__hyhc94k68ebpm mp3tag.shellextension
Winget Microsoft Store MSIX\E0469640.LenovoUtility_4.6.12.0_x64__5grkq8ppsgwt4 lenovoutility
Winget Microsoft Store MSIX\NearbyShareLauncher_1.0.2002.2_neutral__21hpf16v5xp10 nearbysharelauncher
Winget Microsoft Store MSIX\Microsoft.4297127D64EC6_2.2.2.0_x64__8wekyb3d8bbwe 4297127d64ec6
Winget Microsoft Store MSIX\Microsoft.Copilot_1.25013.74.0_x64__8wekyb3d8bbwe copilot
Winget Microsoft Store MSIX\Microsoft.HEVCVideoExtension_2.2.9.0_x64__8wekyb3d8bbwe hevcvideoextension
Winget Microsoft Store MSIX\Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x64__8wekyb3d8bbwe net.native.framework.2.2
Winget Microsoft Store MSIX\Microsoft.WinAppRuntime.DDLM.5001.119.156.0-x6_5001.119.156.0_x64__8wekyb3d8bbwe winappruntime.ddlm.5001.119.156.0-x6
Winget any source Microsoft.AppInstaller appinstaller
Winget any source Microsoft.WindowsTerminal windowsterminal
Winget any source Valve.Steam steam
Scoop any source Arbitrary.app arbitrary
Scoop any source Arbitrary arbitrary
Chocolatey any source Arbitrary.portable arbitrary
Chocolatey any source Arbitrary.install arbitrary
Chocolatey any source Arbitrary arbitrary
vcpkg any source libflac:x64-mingw-dynamic libflac
vcpkg any source vcpkg-cmake-get-vars:x64-mingw-dynamic vcpkg-cmake-get-vars
vcpkg any source tiff[jpeg]:x64-windows tiff
anything else anything else Arbitrary7aysd^__ arbitrary7aysd^__
anything else anything else Arbitrary.test-file_2.2 arbitrary.test-file_2.2
anything else anything else Arbitrary arbitrary

If you accept this PR, you might want to reference something like this table here. (this page also appears to be incorrect; it says "Package ids will be normalized. This means that the id will show in lowercase, and the spaces, underscores and dots (" ", "_", ".") will be replaced by dashes ("-")." but I don't think that happens anymore? I could be wrong about that though.)

@marticliment marticliment marked this pull request as draft February 22, 2025 19:13
@mrixner mrixner marked this pull request as ready for review February 22, 2025 19:25
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

Successfully merging this pull request may close these issues.

1 participant