Rocket.Chat.Electron icon indicating copy to clipboard operation
Rocket.Chat.Electron copied to clipboard

Add ARM support on Windows and Linux

Open aaronfranke opened this issue 2 years ago • 12 comments

Describe the bug

Rocket.Chat.Electron currently only has Windows and Linux builds available for x86 architectures (32-bit and 64-bit), but there are no ARM builds for Windows and Linux.

What operating system and which version?

ARM64 Ubuntu Linux and ARM64 Windows 11.

To Reproduce

On Windows: Try to install RocketChat, and it succeeds but notice that they are for x86 so they are running in an emulator. Running software in an emulator instead of natively has less performance and consumes more battery compared to running it natively.

On Ubuntu Linux: It doesn't come with an x86 emulator and I haven't installed one, so I can't install Rocket.Chat.Electron.

Expected behavior

There would be ARM64 versions available on the download page. I don't think it's worth supporting 32-bit ARM.

aaronfranke avatar Dec 16 '21 03:12 aaronfranke

Which version are you using? Apple M1 is already released. I'm using it right now. Installed using the DMG file from GitHub releases.

Em qui, 16 de dez de 2021 00:25, Aaron Franke @.***> escreveu:

Describe the bug

Rocket.Chat.Electron currently only has desktop builds https://github.com/RocketChat/Rocket.Chat.Electron/releases available for x86 architectures (32-bit and 64-bit), but there are no ARM builds.

What operating system and which version?

ARM64 macOS 12.1, ARM64 Ubuntu Linux, and ARM64 Windows 11, all on an ARM64 M1 Pro MacBook Pro.

To Reproduce

On macOS and Windows: Try to install RocketChat, but notice that they are for x86 so they are running in an emulator. On macOS, it shows up as "Intel" (which means x86_64) in the Activity Monitor, while ideally it would say "Apple" (which means ARM64). Running software in an emulator instead of natively has less performance and consumes more battery compared to running it natively.

On Ubuntu Linux: It doesn't come with an x86 emulator and I haven't installed one, so I can't install Rocket.Chat.Electron.

Expected behavior

There would be ARM64 versions available on the download page. I don't think it's worth supporting 32-bit ARM.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/RocketChat/Rocket.Chat.Electron/issues/2260, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI7PCUMOSZKMGFA6V35ZULURFLZBANCNFSM5KFHMWEA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jeanfbrito avatar Dec 16 '21 03:12 jeanfbrito

@jeanfbrito My apologies, I was running an old version from a month ago and made an assumption that it hadn't changed in that time, I updated and now it indeed shows that it's native ARM (says "Apple" in Activity Monitor).

This issue is still relevant for support for ARM Windows and ARM Linux though. For example, the download page contains "amd64" in the name of the .deb file, which indicates this is for x86_64.

aaronfranke avatar Dec 16 '21 04:12 aaronfranke

I dont know if windows has an ARM operating system. We would need more specialized help to add this build option. Do you can help us with this?

jeanfbrito avatar Jan 14 '22 17:01 jeanfbrito

Here's the download page. You need to be in the Windows Insiders program to access it https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewARM64 Note that some critical tools like Visual Studio aren't available for ARM Windows so if you rely on Visual Studio then it will be difficult to port Rocket.Chat.

For ARM Linux, you can go here https://cdimage.ubuntu.com/ubuntu/releases/21.10/release/ to get Ubuntu Server 21.10 "64-bit ARM (ARMv8/AArch64) server install image" and then once installed use sudo apt install tasksel then sudo tasksel to get a desktop environment installed.

Note that both require an ARM device for testing. You can use a Parallels VM on an M1 Mac for this. For ARM Linux, you can also use a recent Raspberry Pi, or a Pinebook, or an ARM Chromebook with Linux installed. For ARM Windows another option is to get an ARM Microsoft Surface device.

aaronfranke avatar Jan 14 '22 17:01 aaronfranke

Here's the download page. You need to be in the Windows Insiders program to access it https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewARM64 Note that some critical tools like Visual Studio aren't available for ARM Windows so if you rely on Visual Studio then it will be difficult to port Rocket.Chat.

For ARM Linux, you can go here https://cdimage.ubuntu.com/ubuntu/releases/21.10/release/ to get Ubuntu Server 21.10 "64-bit ARM (ARMv8/AArch64) server install image" and then once installed use sudo apt install tasksel then sudo tasksel to get a desktop environment installed.

Note that both require an ARM device for testing. You can use a Parallels VM on an M1 Mac for this. For ARM Linux, you can also use a recent Raspberry Pi. For ARM Windows another option is to get an ARM Microsoft Surface device.

Windows for ARM is not a official release then?

ARM machines are memory-constrained and I think that Electron will be overbloat to run on them.

jeanfbrito avatar Jan 14 '22 17:01 jeanfbrito

https://www.microsoft.com/en-us/d/windows-dev-kit-2023/94K0P67W7581?activetab=pivot:overviewtab 32GB isn' t memory constrained :smile: writing from a 16GB laptop https://www.notebookcheck.net/Huawei-MateBook-E-Go-is-unleashed-as-a-new-Windows-on-ARM-2-in-1-with-a-2-5K-display-starting-at-just-over-US-600.647400.0.html

https://www.electronjs.org/docs/latest/tutorial/windows-arm/

xgdgsc avatar Nov 03 '22 14:11 xgdgsc

Why aarch64 is not enabled for both of Flathub and Snapcraft builds? Is there some real limitations, or it was just because someone forgot to enable it?

shvetsnikita avatar Nov 16 '22 19:11 shvetsnikita

I built the package by simply following the instruction of

set npm_config_arch=arm64 before running npm install/yarn install as usual.

and

https://github.com/RocketChat/Rocket.Chat.Electron/compare/master...xgdgsc:Rocket.Chat.Electron:feat/arm64

You can try the build at https://github.com/xgdgsc/Rocket.Chat.Electron/releases/download/arm64/rocketchat-3.8.15-win-arm64.zip .

It' s easier than I thought.

xgdgsc avatar Jan 01 '23 04:01 xgdgsc

Also tried a linux ubuntu 22.04 build inside wsl at https://github.com/xgdgsc/Rocket.Chat.Electron/releases/download/arm64/rocketchat-3.8.15-linux-arm64.tar.gz with the same build script.

xgdgsc avatar Jan 01 '23 09:01 xgdgsc

https://www.microsoft.com/en-us/d/windows-dev-kit-2023/94K0P67W7581?activetab=pivot:overviewtab 32GB isn' t memory constrained 😄 writing from a 16GB laptop https://www.notebookcheck.net/Huawei-MateBook-E-Go-is-unleashed-as-a-new-Windows-on-ARM-2-in-1-with-a-2-5K-display-starting-at-just-over-US-600.647400.0.html

https://www.electronjs.org/docs/latest/tutorial/windows-arm/

One year after... hahaha

I just need to find a way to test the builds in ARM64, then we can add it to the build pipeline.

jeanfbrito avatar Jan 01 '23 23:01 jeanfbrito

If you get a build I should be able to help test it on either a pi or with asahi linux on my mac. Would be good to have Linux arm64 builds. Windows arm64 builds can test in utm on Mac pretty easy too

geekgonecrazy avatar Feb 13 '24 07:02 geekgonecrazy

@geekgonecrazy We need to figure out how much it would be useful to have an arm64 build. I will try to take a look at it after version 4.0 gets out.

jeanfbrito avatar Feb 14 '24 13:02 jeanfbrito