UniGetUI icon indicating copy to clipboard operation
UniGetUI copied to clipboard

Please consider a native ARM64 version for Windows

Open MagnusJohansson opened this issue 1 year ago • 25 comments

Please confirm these before moving forward.

  • [X] I have searched for my feature proposal and have not found a work-in-progress/duplicate/resolved/discarded issue.
  • [X] This proposal is a completely new feature. If you want to suggest an improvement or an enhancement, please use this template.

Describe the new feature

I would love to have a native ARM64 build, instead of running on the x64 emulator. This would improve performance, and more importantly save battery. Screenshot from UniGetUI v3.1.0: image

Describe how this new feature could help users

It would improve the end user experience:

  • Better performance du to not have to be run via the emulation layer
  • Improved energy consumption
  • Improved responsiveness
  • Align with trends; I would assume that many WinGetUI/UniGetUI users are technical and more likely to be running a ARM64 based device than any other audience
  • Hopefully a much lower memory consumption

EDIT: Just noticed the high memory consumption. On a x64 based device, the memory consumption is about half.

MagnusJohansson avatar Jul 03 '24 13:07 MagnusJohansson

I don't have an arm64 machine (yet), and I don't want to build arm64 with my x64 computer and release it without testing.

However, I will see what I can do

marticliment avatar Jul 03 '24 16:07 marticliment

I don't have an arm64 machine (yet), and I don't want to build arm64 with my x64 computer and release it without testing.

However, I will see what I can do

If you'd like someone to test, I own an Arm64 snapdragon x elite laptop and I'd be happy to assist. I also own a SQ3 surface pro 9 so we'd have coverage with multiple arm based cpu's.

Vascro avatar Oct 15 '24 22:10 Vascro

Would like to see this as well. Running Surface Laptop 7 x elite. Could probably test a build as well.

christian-bendiksen avatar Oct 23 '24 14:10 christian-bendiksen

I have a Surface Pro X and can test it out for you too!

JaronrH avatar Oct 25 '24 13:10 JaronrH

I can test it too. :P Jokes aside, I'd also love to see this.

CanePlayz avatar Nov 12 '24 22:11 CanePlayz

I can get it to build, the trick part will be the following when running on ARM64: Given that UniGetUI can detect the architecture of the installing application: If the installed app is x64, should we upgrade to a newer x64 or try to install the ARM64 version if available?

hmartinez82 avatar Dec 06 '24 01:12 hmartinez82

I have a 32GB Snapdragon X Elite laptop and Visual Studio Professional, I had a quick look at compiling but there were a number of libraries "missing". So, a tip of the hat to hmartinez82 who must have put more effort in than I did. I agree, it's not just a case of getting it to compile and run, there's all the "which architecture" questions to be answered or decided.

AndrewCLion avatar Dec 10 '24 20:12 AndrewCLion

I can get it to build, the trick part will be the following when running on ARM64: Given that UniGetUI can detect the architecture of the installing application: If the installed app is x64, should we upgrade to a newer x64 or try to install the ARM64 version if available?

Would it be possible to make it either a checkbox before installing updates, or have unigetui prompt yes/no to replace with arm64 native build if it detects one?

Vascro avatar Dec 10 '24 21:12 Vascro

I appreciate your efforts, but there won't be an arm64 version in the near future.

The problem here is that while UniGetUI may build under arm64 systems, (in fact, it has no theoretical reason for it to not build) I cannot publish a version I have not tested, and I can't either rely on a third-party to do the builds for me. It would be too unreliable, and I would be taking a very high risk.

Thanks for the testing, and sorry.

marticliment avatar Dec 11 '24 07:12 marticliment

I appreciate your efforts, but there won't be an arm64 version in the near future.

The problem here is that while UniGetUI may build under arm64 systems, (in fact, it has no theoretical reason for it to not build) I cannot publish a version I have not tested, and I can't either rely on a third-party to do the builds for me. It would be too unreliable, and I would be taking a very high risk.

Thanks for the testing, and sorry.

Could you use GitHub actions or something? UniGetUI slows my entire system down.

flanter21 avatar Feb 07 '25 11:02 flanter21

Could you use GitHub actions or something?

The issue is the same. I could build UniGetUI, but I wouldn't be able to test it

marticliment avatar Feb 07 '25 11:02 marticliment

Could you use GitHub actions or something?

The issue is the same. I could build UniGetUI, but I wouldn't be able to test it

Ah I see now sorry. I guess you could use qemu to run arm64 windows (w11 iot enterprise ltsc 2024 would be lightweight) but I can see that would probably be a lot of effort for not a lot of users so fair enough.

flanter21 avatar Feb 07 '25 11:02 flanter21

+1 for this. Using it in x64 emulation is extremely laggy and slow.

lexcyn avatar Mar 14 '25 15:03 lexcyn

Ok. So instructions to building for ARM64. They can be executed from both an ARM64 Windows machine or an x64 one (where you can then copy the files to an ARM64 machine).

Pre-Requisites:

  • Windows 10 SDK, version 2004 (10.0.19041.0) - All the C++ and UWP checkboxes
  • Windows SDK for Windows 11 (10.0.26100.1742) - All the C++ and UWP checkboxes
  • .NET 8 SDK

Probably because there are two projects using CsWinRT that target different versions of the SDK. They can all be acquired from https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/

@AndrewCLion ^ that's probably what was missing.

Steps:

  • In a command prompt in the top of the repository type: dotnet publish src\UniGetUi\UniGetUi.csproj --configuration Release --runtime win-arm64 --self-contained
  • UniGetUI.exe will be in the src\UniGetUI\bin\Release\net8.0-windows10.0.26100.0\win-arm64\publish folder
Image

I was wondering if the existing code would force the winget packages to be installed as x64, but winget is being called without forcing a specific architecture, thus it defaults to ARM64.

hmartinez82 avatar Mar 15 '25 04:03 hmartinez82

@marticliment Given the stops above are super simple and cross compilation is very trivial, could you perhaps make an Experimental build?

Based on that batch file, the build line would be probably be (this can be done from an x64 runner): dotnet publish src/UniGetUI/UniGetUI.csproj /noLogo /property:Configuration=Release /property:Platform=arm64 -v m

hmartinez82 avatar Mar 15 '25 04:03 hmartinez82

Yes, but the issue is not building UniGetUI, but rather being able to test it.

marticliment avatar Mar 15 '25 09:03 marticliment

For anyone who wants to build, you can use this Github Action.

Note that it's not fully there, as InstallerExtras/CodeDependencies.iss seems to only support x64 and I've modified it to support both x86 and, where possible, ARM.

The repo also has x64 dependencies in the repo, such as

These should ideally change according to the architecture of the build, but I'll leave it there for now. It should probably also be extended to cover https://github.com/marticliment/GSudo-for-UniGetUI

It's insane how much of a difference it makes though. It's super smooth now, when before it would cause lag just on opening or scrolling (and my laptop wasn't cheap either)

flanter21 avatar Mar 29 '25 09:03 flanter21

@flanter21 Did you get gsudo working? I think that the gsudo code checks that the parent process' image is signed with a specific signature. In other words, using batch elevation doesn't seem to work.

hmartinez82 avatar Mar 30 '25 04:03 hmartinez82

@flanter21 Did you get gsudo working? I think that the gsudo code checks that the parent process' image is signed with a specific signature. In other words, using batch elevation doesn't seem to work.

No, it will not work. However, you can enable gsudo instead of UniGetUI Elevator from the experimental settings. GSudo does not check for digital signatures, so batching should work then

marticliment avatar Mar 30 '25 07:03 marticliment

@marticliment That did it, thank you :)

Btw, Microsoft finally released Windows ARM64 runners for all Github projects!

hmartinez82 avatar May 01 '25 09:05 hmartinez82

For anyone who wants to build, you can use this Github Action.

Note that it's not fully there, as InstallerExtras/CodeDependencies.iss seems to only support x64 and I've modified it to support both x86 and, where possible, ARM.

The repo also has x64 dependencies in the repo, such as

* [src/UniGetUI.PackageEngine.Managers.Chocolatey/choco-cli](https://github.com/marticliment/UniGetUI/tree/main/src/UniGetUI.PackageEngine.Managers.Chocolatey/choco-cli)

* [src/UniGetUI/Assets/Utilities](https://github.com/marticliment/UniGetUI/tree/main/src/UniGetUI/Assets/Utilities)

* [src/UniGetUI.PackageEngine.Managers.WinGet/winget-cli_x64](https://github.com/marticliment/UniGetUI/tree/main/src/UniGetUI.PackageEngine.Managers.WinGet/winget-cli_x64)

These should ideally change according to the architecture of the build, but I'll leave it there for now. It should probably also be extended to cover https://github.com/marticliment/GSudo-for-UniGetUI

It's insane how much of a difference it makes though. It's super smooth now, when before it would cause lag just on opening or scrolling (and my laptop wasn't cheap either)

Could you publish it as a third-party experimental build?

vectorrilke avatar May 28 '25 19:05 vectorrilke

For anyone who wants to build, you can use this Github Action. Note that it's not fully there, as InstallerExtras/CodeDependencies.iss seems to only support x64 and I've modified it to support both x86 and, where possible, ARM. The repo also has x64 dependencies in the repo, such as

* [src/UniGetUI.PackageEngine.Managers.Chocolatey/choco-cli](https://github.com/marticliment/UniGetUI/tree/main/src/UniGetUI.PackageEngine.Managers.Chocolatey/choco-cli)

* [src/UniGetUI/Assets/Utilities](https://github.com/marticliment/UniGetUI/tree/main/src/UniGetUI/Assets/Utilities)

* [src/UniGetUI.PackageEngine.Managers.WinGet/winget-cli_x64](https://github.com/marticliment/UniGetUI/tree/main/src/UniGetUI.PackageEngine.Managers.WinGet/winget-cli_x64)

These should ideally change according to the architecture of the build, but I'll leave it there for now. It should probably also be extended to cover https://github.com/marticliment/GSudo-for-UniGetUI It's insane how much of a difference it makes though. It's super smooth now, when before it would cause lag just on opening or scrolling (and my laptop wasn't cheap either)

Could you publish it as a third-party experimental build?

https://github.com/flanter21/UniGetUI-arm64/actions/runs/15310612257

Not tested yet though

flanter21 avatar May 29 '25 13:05 flanter21

I can give you RDP user access to an ARM64 Azure VM that I just created. Contact me directly if you like. Yesterday, I ordered a https://www.asus.com/de/laptops/for-home/vivobook/asus-vivobook-14-x1407q for 499 € my wife and wanted to test upfront, saw a Lonove at a customer but would never ever enter my passwords on systems with firmware and updates from "some" countries...

OliverLx avatar Dec 07 '25 09:12 OliverLx

Hello @OliverLx, Thanks for the offer, but I am afraid I can't take it.

marticliment avatar Dec 07 '25 09:12 marticliment

Hello @marticliment, you're welcome! I understand that everything takes time and effort. I'm sure that one day you'll own such a device too, and you can take a look then. :-) Thank you for your fantastic product! I have just installed and tested your x64 version via Winget and/or the Microsoft Store, and it works perfectly as usual.

OliverLx avatar Dec 07 '25 09:12 OliverLx