keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
21.22k stars 1.47k forks source link

Windows arm64 release (MSVC) #4022

Open fabricemrchl opened 4 years ago

fabricemrchl commented 4 years ago

Is it possible to release a Windows arm64 version of KeepassXC ? Info : https://docs.microsoft.com/fr-fr/windows/arm/

For the moment I use x86 but It would be better with a native version.

Tested on Surface pro X

Thank you

droidmonkey commented 4 years ago

This is not possible because msys2 does not support arm.

hksdpc255 commented 2 years ago

I believe it is now possible to build keepassxc for windows arm64.

hksdpc255 commented 2 years ago

I successfully built KeePassXC using MSYS2. Take a look.

KeePassXC-2.7.1-WinARM64.7z.zip

Sorry for the wired file extension *.7z.zip but GitHub doesn't allow me upload 7z archive directly.

minnyres commented 2 years ago

@hksdpc250 Great work! @droidmonkey Is there any progress? I noticed that KeePassXC team has switched to Visual C++ toolchain for Windows.

droidmonkey commented 2 years ago

It is currently not on the table at this time.

8sd commented 2 years ago

Hi there,

I just wanted to ask if there is any progress regarding this issue. Where do you want to publish the arm version? Will it be available on the official download page?

I'd love to use keepassxc on my new arm laptop.

Kind regards Sebastian

phoerious commented 2 years ago

We cannot promise any dates, but when it's available, it will be downloadable in the usual places.

droidmonkey commented 2 years ago

I am building arm64 dependencies now, no guarantees on the release but we'll give it a try. I do not have an arm machine to test on though.

droidmonkey commented 2 years ago

So tried building vcpkg arm dependencies and failed on qt because it requires running qmake which is built as arm application running on x86. Looked into arm VM on Azure... no capacity left for non enterprise. Just going to have to wait some more unfortunately.

minnyres commented 2 years ago

So tried building vcpkg arm dependencies and failed on qt because it requires running qmake which is built as arm application running on x86

yeah vcpkg is still not ready for Qt 5 but it supports Qt 6 targeting Windows on ARM64. So it is not a big problem if you are planning Qt 6 upgrade. You can also use the clangarm64 toolchain in MSYS2, which provides prebuilt Qt 5 and Qt 6, if ARM windows machine is available.

kaistraube commented 2 years ago

What about providing v2.7.4 for Windows 11 arm64? I used v2.7.1 several weeks day by day without problems.

MSYS2 clangarm64 failes for dependencies that are missing for aarch64 instead of x86_64: pacman -S mingw-w64-clang-x86_64-libbotan pacman -S mingw-w64-clang-x86_64-argon2 pacman -S mingw-w64-clang-x86_64-qrencode pacman -S mingw-w64-clang-x86_64-asciidoctor

So how did @hksdpc255 build by MSYS2?

minnyres commented 1 year ago

@kaistraube I think vcpkg supports to build them with the arm64-mingw-dynamic triplet.

Microsoft recently released Visual Studio 2022 on ARM, with which I build KeePassXC 2.7.4: https://github.com/minnyres/keepassxc-windows-arm64/releases

This is the main procedures to build: https://github.com/minnyres/keepassxc-windows-arm64#how-to-build

kaistraube commented 1 year ago

@kaistraube I think vcpkg supports to build them with the arm64-mingw-dynamic triplet.

Microsoft recently released Visual Studio 2022 on ARM, with which I build KeePassXC 2.7.4: https://github.com/minnyres/keepassxc-windows-arm64/releases

This is the main procedures to build: https://github.com/minnyres/keepassxc-windows-arm64#how-to-build

Following your guildline it's working from scratch (fresh mysy2, vcpkg etc). Thanks for providing arm64-windows version to download and guideline. (small improvements to re-execute: only download source tar, if file is not existing)

ArminiusTux commented 1 year ago

I am building arm64 dependencies now, no guarantees on the release but we'll give it a try. I do not have an arm machine to test on though.

Dear @droidmonkey, if you still need an ARM device running Windows, head over to walmart.com where decent & refurbished notebook models (Gateway, Samsung or HP) start at $130.

Thank you @minnyres for providing the latest ARM64 Windows build (& instructions! ) of KeePassXC and @kaistraube for raising the topic.

hksdpc255 commented 1 year ago

Personally I don't recommend building KeepassXC using msys2. It requires an ARM64 Windows device, science msys2 seems lacking cross compiling support.

However, building dependencies for KeepassXC in msys2 is not too complicated. Just download the PKGBUILD and its support files from msys2/MINGW-packages repo, run makepkg-mingw, then install it using pacman -U. All dependencies currently missed will be built without any change.

hksdpc255 commented 1 year ago

If it isn't too late, here's the msys2 version of KeePassXC 2.7.4 for arm64 windows.

KeePassXC-2.7.4-WinARM64.7z.zip

MarRol777 commented 1 year ago

@minnyres Thank you for the arm64 build. It is running fine.

@hksdpc255 What is better with cross compiling with mingw? Maybe its better for official release automation in future?

minnyres commented 1 year ago

I think it is already possible to cross compile on x64 system and write a workflow to build with GitHub Actions: https://github.com/minnyres/keepassxc-windows-arm64/blob/main/.github/workflows/ci_windows_arm64.yaml

There are two key points: 1) Qt needs to be built with a patch; 2) configure KeePassXC with a cmake toolchain file that forces to use x64 host Qt tools.

Update on 2024/05/26: Qt 5.15.12 can be directly cross compiled for ARM64 without any patches.

DariusHutchison commented 5 months ago

Is there any forward momentum on this? It would be nice to get official arm64 support.

minnyres commented 5 months ago

Is there any forward momentum on this? It would be nice to get official arm64 support.

Build Qt5 for ARM64 is not a problem. Use the configure.bat script provided by Qt:

https://gist.github.com/tycho/3ce679850a03a39d8c174ac05af56214?permalink_comment_id=5068421#gistcomment-5068421

However, the official KeePassXC build is using vcpkg to build Qt, which still have issues with windows arm64: https://github.com/microsoft/vcpkg/issues/16922

Ryu36 commented 4 months ago

Since there is currently no official support for Arm64 for Windows, is this repository a good solution and, above all, trustworthy?

https://github.com/minnyres/keepassxc-windows-arm64

droidmonkey commented 4 months ago

Cool find, looks benign it just sets up a proper build environment and downloads the sources from our repo.

Ryu36 commented 4 months ago

If setting up a build environment is all that's needed, is there a plan to offer an official package for Arm64? With the new Copilot+ PCs, the demand is certainly there.

droidmonkey commented 4 months ago

Sure if this works I'll make it happen. Not sure if the copilot+ pcs are flying off the shelf though 😊

Seldaek commented 3 months ago

Happy Surface Pro 11 user here as of a couple weeks ago, works wonders and KeePassXC is one of the last couple pieces of software I rely on that isn't running natively. No huge pressure from my side though it works well enough in emulation mode as it isn't very CPU intensive.