asheroto / winget-install

Install winget tool using PowerShell! Prerequisites automatically installed. Works on Windows 10/11 and Server 2019/2022.
https://bit.ly/winget-install
GNU General Public License v3.0
272 stars 33 forks source link

[Bug]: does arm64 is supported? #46

Closed emmanuelpare closed 1 month ago

emmanuelpare commented 1 month ago

Checklist

What You Are Seeing?

Hi,

In the Get-OsInfo function, I don’t see a check for ARM64. For example:

elseif (($osDetails.OSArchitecture).StartsWith("ARM")) { $architecture = "arm64" }

I think this is needed to install the correct binary where you are using $arch.

System Details

windows 11 arm64

Additional Context

No response

Full Output With -Debug

No response

asheroto commented 1 month ago

Hello,

On an arm64 system, this line should take care of it.

https://github.com/asheroto/winget-install/blob/b9b12f69e9e16f19262e690be96b549c5252cbd7/winget-install.ps1#L179

The other lines like this...

https://github.com/asheroto/winget-install/blob/b9b12f69e9e16f19262e690be96b549c5252cbd7/winget-install.ps1#L181-L186

Should actually just replace the values from the architecture variable.

Are you saying that "arm" is shown instead of "arm64"?

Can you tell me what the output of line 179 is on an arm64 system?

emmanuelpare commented 1 month ago

Hi,

When I execute Get-OSInfo on a ARM Windows 11 the Get-OSinfo is returning me x64 instead of arm64

image

We need $arch=arm64 to download the correct file ex:

https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.arm64.appx

Or maybe there is not any arm64 binary for winget and it run x64 emulation.? The issue I have right now is when I run winget on a arm64 its return no output at all (also no error)

image

emmanuelpare commented 1 month ago

Update: OK: I got it fixed by Installing. VC_Redis https://aka.ms/vs/17/release/vc_redist.arm64.exe

You can leave your code as is...

asheroto commented 1 month ago

Ah okay, good to know, though!

Glad you got it working!