Skip to content

Build Instructions

  • A recent-ish operating system release
    • Windows 10 (1809 or later. Older versions may be supported, but aren’t tested)
    • macOS >= 12
    • Ubuntu >= 22.04 (or equivalent)
  • A C++ compiler supporting at least C++17.
    • This includes GCC >= 8, Clang >= 5, and MSVC >= 19.15
  • Java JDK <= 17
  • cmake >= 3.22
  • ninja
  • extra-cmake-modules
  • Qt 6.0 or later, with the following addons/plugins:
    • Qt NetworkAuth
    • Qt Image Formats
    • Qt Svg
  • cmark
  • gamemode (required at build time, optional at runtime. Only on Linux)
  • glxinfo (required at runtime, only on Linux)
  • libarchive
  • libGL headers (only on Linux)
  • libqrencode
  • pciutils (required at runtime, only on Linux)
  • scdoc (optional at build time, used to generate manpages)
  • tomlplusplus
  • vulkan-headers
  • zlib

You should first install winget, a package manager for Windows.

Once winget is available, install the MSVC toolchain with:

Terminal window
winget install --source winget --exact --id Microsoft.VisualStudio.2022.BuildTools --override '--add Microsoft.VisualStudio.Workload.VCTools;includeRecommended'

Install JDK 17 with:

Terminal window
winget install --source winget --exact --id EclipseAdoptium.Temurin.17.JDK

We will also be using Git:

Terminal window
winget install --source winget --exact --id Git.Git

Qt can then be installed with aqt:

Terminal window
winget install --source winget --exact --id miurahr.aqtinstall
aqt install-qt windows desktop 6 win64_msvc2022_64 -m qtimageformats qtnetworkauth

We use Git for our version control. The command below will clone the repository, and fetch all submodules that come with it

Terminal window
git clone --recursive https://github.com/PrismLauncher/PrismLauncher.git
cd PrismLauncher

The rest of the documentation assumes you have already cloned the repository.

Open “x64 Native Tools PowerShell” in Windows Terminal

Terminal window
cmake --preset windows_msvc -D CMAKE_PREFIX_PATH="C:\path\to\Qt"
Terminal window
cmake --build --preset windows_msvc --config Debug
Terminal window
cmake --install build --config Debug
cmake --install build --config Debug --component portable # If you want to install a portable version

Nix is a tool for handling reproducible builds across multiple platforms.

After installing Nix and checking out the repository, you can run the following command to build a debug package:

Terminal window
nix build --print-build-logs '.#prismlauncher-debug'

You can also enter a development shell with all of the tools required to build manually:

Terminal window
nix-shell
cmake --preset linux_debug
cmake --build build
cmake --install build

Flatpaks allow for you to quickly build Prism and run it on any distribution

Make sure Flathub is setup.

Terminal window
# Install Flatpak build tools
flatpak install flathub org.flatpak.Builder
# Clone the source repository
git clone --recursive https://github.com/prismlauncher/PrismLauncher
# Enter the Flatpak directory
cd PrismLauncher/flatpak
# Run the build
flatpak run org.flatpak.Builder \
--user \
--install \ # Comment if you only want to build, not install
--install-deps-from=flathub \
--ccache \
--repo=repo \
builddir \
org.prismlauncher.PrismLauncher.yml