desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Windows arm64 build

Open Pharoh-Ramses opened this issue 1 year ago • 18 comments

What happened?

Not sure if this has been raised, but are there any plans for an arm64 build for windows?

Reproducible?

  • [X] I have checked that this issue cannot be reproduced on Mozilla Firefox.

Version

1.0.0-a.32

Severity impact

High

What platform are you seeing the problem on?

Windows

Relevant log output

No response

Pharoh-Ramses avatar Aug 29 '24 18:08 Pharoh-Ramses

+1 on ARM64 build and since FF has a build for it too finger crossed zen version is coming too.

meguroyama avatar Aug 29 '24 20:08 meguroyama

Currently for me, Zen does not even work under emulation image image

Firefox does have an arm build image

Would love to see this

ectrc avatar Aug 29 '24 21:08 ectrc

Wold also love to see a working version on my Arm64 laptop as i love to use Zen-Browser on my desktop

Okaza03 avatar Sep 04 '24 12:09 Okaza03

Also same problem on the snapdragon x Elite, would love to see this working on ARM machines.

matotubol avatar Sep 05 '24 09:09 matotubol

I started using Zen on my personnal PC and work laptop. Wanted to get it on my Snapdragon laptop too, guess I'm gonna have to stick with Brave on my laptop for now 🫤

sky0matic avatar Sep 07 '24 15:09 sky0matic

SAme i want this so bad on my new arm laptop...

rexxDZN avatar Sep 07 '24 20:09 rexxDZN

Since 03/09/2024, GitHub made ARM runners available to open public. I think that should be possible to implement now. @mauro-balades FYI

HarryHeres avatar Sep 07 '24 21:09 HarryHeres

For windows? Where did you see that?

mr-cheffy avatar Sep 07 '24 21:09 mr-cheffy

For windows? Where did you see that?

https://github.blog/changelog/2024-09-03-github-actions-arm64-linux-and-windows-runners-are-now-generally-available/

HarryHeres avatar Sep 07 '24 21:09 HarryHeres

Though based on this discussion https://github.com/actions/runner-images/issues/768 they are not much usable...

HarryHeres avatar Sep 07 '24 21:09 HarryHeres

Currently for me, Zen does not even work under emulation image image

Firefox does have an arm build image

Would love to see this

use the generic version

mr-cheffy avatar Sep 08 '24 11:09 mr-cheffy

For windows? Where did you see that?

https://github.blog/changelog/2024-09-03-github-actions-arm64-linux-and-windows-runners-are-now-generally-available/

The only way would be to use third party runners, id need to check their pricing

mr-cheffy avatar Sep 08 '24 11:09 mr-cheffy

use the generic version I am using the "generic" version. I am using the Snapdragon X Elite.

ectrc avatar Sep 13 '24 22:09 ectrc

The only way would be to use third party runners, id need to check their pricing

According to Supported built host - Firefox . It's impossible to build firefox on Windows ARM64 runner. I guess we should consider cross compile.

EndCredits avatar Oct 03 '24 07:10 EndCredits

Detailed description about cross compile can also be found on Firefox source documentations. Official targets configuration for windows arm64 is L4 at mozilla-central/browser/config/mozconfigs/win64-aarch64/common-win64 . So we might be able to cross compile Zen browser by adding win64-aarch64 target like:

ac_add_options --target=aarch64-pc-windows-msvc

Considering we're using surfer. So we might should add win64-aarch64 target to surfer platform map (Reference: https://searchfox.org/mozilla-central/source/python/mozrelease/mozrelease/platforms.py#22)

diff --git a/src/commands/updates/browser.ts b/src/commands/updates/browser.ts
index 8745467..ac08636 100644
--- a/src/commands/updates/browser.ts
+++ b/src/commands/updates/browser.ts
@@ -8,4 +8,5 @@ const ausPlatformsMap = {
   ],
   macosArm: ['Darwin_aarch64-gcc3'],
   win64: ['WINNT_x86_64-msvc', 'WINNT_x86_64-msvc-x64'],
+  win64-aarch64: ["WINNT_aarch64-msvc-aarch64"],
 }

Since I'm not an expert in this field so I can't provide further help. I also can't test this cuz I don't have windows x86 device. Anyway thanks a lot for your great efforts devs.

EndCredits avatar Oct 03 '24 07:10 EndCredits

Arc already has a working build for Windows ARM64 and it seems to run even faster than on my Intel-based computers. With Arc being the most direct competitor to Zen Browser, it would be interesting to see a step forward for Zen in this regard.

ruverav avatar Oct 11 '24 10:10 ruverav

+1 for linux arm64 build also

nerdyinu avatar Oct 11 '24 23:10 nerdyinu

+1 for windows arm64 build, especially now that arc has it. zen technically works under emulation but its super laggy and some sites don't work

locksvur avatar Oct 12 '24 05:10 locksvur

Looking for this as well. The difference in stability and performance is really obvious when using zen on my desktop vs my X Elite laptop.

TophC7 avatar Oct 14 '24 18:10 TophC7

Okay, let me check this out hopefully during this week. I only have a M-based Mac, but running a VM should suffice for testing purposes.

HarryHeres avatar Oct 14 '24 19:10 HarryHeres

Okay, let me check this out hopefully during this week. I only have a M-based Mac, but running a VM should suffice for testing purposes.

If you need any testers, would be happy to oblige, or I can build it as well, if you run into issues with vm or something. I`m on the aarch64 snapdragon laptop.

Molier avatar Oct 16 '24 09:10 Molier

I'd also be happy to be a tester if needed :) I have a snapdragon x plus-based surface pro 11

locksvur avatar Oct 16 '24 16:10 locksvur

Running the generic version through the standard windows emulation layer works on my Surface Laptop 7, but a lot of pages are so slow that they're unusable (e.g. youtube).

BenjaminJacober avatar Oct 22 '24 18:10 BenjaminJacober

Any news? :-) I have Snapdragon x plus in my Lenovo ThinkBook, so I´ll be happy for amr release.

hardelone avatar Oct 29 '24 09:10 hardelone

Still waiting... :)

Asus Vivobook S15 OLED Copilot Laptop. Snapdragon Elite X

KiefBC avatar Oct 30 '24 04:10 KiefBC

Also willing to be a beta tester. I have a Lenovo Yoga Slim 7X laptop.

ruverav avatar Oct 30 '24 09:10 ruverav

I don't think an ARM64 runner is needed for this, changing the build target to aarch64-pc-windows-msvc and using Firefox's --enable-bootstrap build option to cross-compile worked on my x86 Fedora machine to build the ARM64 Windows version. Running the native version does immediately feel significantly faster. On BrowserBench Speedometer 3.0 the x86 version on my Yoga Slim 7x gets 5.58 vs 14.5 with the ARM64 one.

I also changed the WIN32_REDIST_DIR path from x64 to arm64 and removed the SURFER_COMPAT if-else block that has the x86 CPU optimizations. I was going to change WIN_UCRT_REDIST_DIR from x64 to arm64 but that Windows SDK version seems to have a bug and it's missing the arm64 folder, but since the DLL is apparently part of the OS as of Windows 10 and overrides any application bundled ones anyway I just removed it instead and it didn't have any issues.

omove avatar Nov 05 '24 21:11 omove

Reluctantly using Arc until a native arm build is up. Patiently waiting =)

@omove can you ELI5?

yanai-klugman avatar Nov 08 '24 09:11 yanai-klugman

I made this script to do it all in a fresh VM of Fedora 40.

#Install dependencies
sudo dnf group install -y "C Development Tools and Libraries"
sudo dnf install -y dos2unix yasm nasm gtk2-devel python3-devel m4 libuuid-devel \
     alsa-lib-devel libcurl-devel dbus-devel libdrm-devel dbus-glib-devel gtk3-devel \
     pulseaudio-libs-devel libX11-devel libXt-devel lld llvm clang-devel cbindgen \
     libstdc++-devel npm libwbclient libwbclient-devel ca-certificates msitools rustup \
     p7zip p7zip-plugins upx ccache

#Initialize rust and add rust aarch64 toolchain
rustup-init -y
. "$HOME/.cargo/env"
rustup target add aarch64-pc-windows-msvc

#Setup Zen repo
git clone https://github.com/zen-browser/desktop.git --recurse-submodules
cd desktop
npm i
npm run init
sh ./scripts/update-en-US-packs.sh

#Make changes to the windows mozconfig
sed -i '/WIN_UCRT_REDIST_DIR/ s/^/# /' ./configs/windows/mozconfig
sed -i 's/x64\/Microsoft.VC143.CRT/arm64\/Microsoft.VC143.CRT/g' ./configs/windows/mozconfig
sed -i 's/x86_64-pc-windows-msvc/aarch64-pc-windows-msvc\nac_add_options --enable-bootstrap/g' ./configs/windows/mozconfig
sed -i '/SURFER_COMPAT/,/fi/ s/^/# /' ./configs/windows/mozconfig

#Build for Windows
export SURFER_PLATFORM="win32"
npm run build
./engine/mach package

#The portable zip browser is in desktop/engine/obj-aarch64-pc-windows-msvc/dist/
#EXE Installer is located at desktop/engine/obj-aarch64-pc-windows-msvc/dist/install/sea/

omove avatar Nov 08 '24 15:11 omove

I made this script to do it all in a fresh VM of Fedora 40.

@omove I don't think I fully understand how this work. Why create a script to be run on another OS in order to have the windows arm version of Zen Browser? Can't we just have the script to immediately run on windows, which sounds simpler than setting up a vm, then knowing how fedora works then transferring the compiled browser package to Windows. (p.s. i am not that tech savvy yet)

If that CAN be the case then could u share that version of the script :)

rexxDZN avatar Nov 08 '24 17:11 rexxDZN