-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Set up Build Environment on Windows
Note: This is only a one-time setup guide. For actually building KeePassXC, please refer to our build guide.
We recommend building KeePassXC using Visual Studio to maximize feature availability. Visual Studio is free to use and dependencies are provided from trusted sources or self-built using Vcpkg.
-
Download and install Visual Studio Community 2022: https://visualstudio.microsoft.com/downloads/
-
At a minimum, ensure the following options are selected. We require at least Windows SDK version 10.0.22000.0. You can also import this installation configuration to auto-select these options: keepassxc_vsconfig.zip
- (Optional) Instead of the entire IDE, you may install Visual Studio Build Tools and use VSCode as an IDE.
Since release 2.7.7, KeePassXC uses vcpkg's manifest option. This greatly simplifies dependency management, but you need to install vcpkg first to use the capability. Once vcpkg is installed then you simply build KeePassXC to have all appropriate dependencies built for you. Note the first build may take up to several hours to complete due to Qt5.
-
Download and install vcpkg: https://vcpkg.io/en/getting-started.html
-
Be sure to follow every step including bootstrapping vcpkg
-
Periodically, you should update vcpkg repository by opening a command prompt, going to vcpkg folder, and executing
git pull
. This will download the latest ports and require a rebuild of the cache the next time you build KeePassXC.
-
Download and install Ruby without devkit: https://rubyinstaller.org/downloads/
a. Make sure to uncheck install MSYS2/MINGW on the final install screen.
-
Open a command prompt and run:
gem install asciidoctor
-
In the same command prompt, test the install by running:
asciidoctor
Building using MSYS is deprecated, we no longer recommend this method.
- Download MSYS2 64bit: http://msys2.github.io/
- Start MSYS2 shell
- Update the system packages:
pacman --needed -Sy bash pacman pacman-mirrors msys2-runtime
- Restart MSYS2 shell
- Update all packages:
pacman -Syu
If prompted, restart the shell and re-run this command until done
This command will install the MinGW-W GCC compiler, CMake, Binutils, and Asciidoctor:
Open an MSYS2 shell:
pacman -S git make mingw-w64-$(uname -m)-gcc mingw-w64-$(uname -m)-toolchain \
mingw-w64-$(uname -m)-binutils mingw-w64-$(uname -m)-cmake \
mingw-w64-$(uname -m)-asciidoctor
Open an MSYS2 shell:
pacman -S mingw-w64-$(uname -m)-qt5 \
mingw-w64-$(uname -m)-libbotan mingw-w64-$(uname -m)-zlib \
mingw-w64-$(uname -m)-argon2 mingw-w64-$(uname -m)-qrencode
To build an installation package when running make package
you need to have the WiX toolset installed. You can obtain it from https://github.com/wixtoolset/wix3/releases
Once installed you will need to add the toolset folder to your MSYS PATH environment: export PATH="${PATH}:/c/Program Files (x86)/WiX Toolset v3.11/bin"
Open a MSYS2 shell:
pacman -Syu
Copyright (C) 2016-2023 KeePassXC Team