Progressia/docs/BuildingGuide.md
2022-10-09 17:25:45 +03:00

2.1 KiB

Building guide

At this time, building is only supported in GNU/Linux targeting GNU/Linux X11. See also Development Setup Guide if you want to make git commits.

Prerequisites

Install the following software:

  • a C++ compiler (GCC or clang preferably),
  • CMake,
  • pkg-config,
  • Python 3,
  • glslc.

Install the following libraries with headers:

  • Vulkan (loader library and headers),
  • GLFW3,
  • GLM,
  • STB,
  • Boost (only core library required).

Debian

On Debian, you can run the following commands as root to install almost all required software:

apt-get install \
    g++ \
    cmake \
    pkg-config \
    python3 &&
apt-get install --no-install-recommends \
    libvulkan-dev \
    libglfw3-dev \
    libglm-dev \
    libstb-dev \
    libboost-dev

However, glslc, the shader compiler, is not available as a Debian package at the moment. You can install it manually from official sources or use the download it from windcorp.ru by running these commands as root:

apt-get install wget &&
mkdir -p /opt/glslc &&
wget --output-file=/opt/glslc/glslc \
     'https://windcorp.ru/other/glslc-v2022.1-6-ga0a247d-static' &&
chmod +x /opt/glslc/glslc

Alternatively, packages provided by LunarG are available for Ubuntu. Follow the instructions on LunarG.com to install vulkan-sdk.

Setup

git clone <clone url>
cd Progressia
chmod +x tools/setup.sh
tools/setup.sh

tools/setup.sh will check the availability of all required commands and libraries.

Build tools use enviroment variables PATH, PKG_CONFIG_PATH and CMAKE_MODULE_PATH; you can edit these variables system-wide or use tools/private.sh to make project-specific changes. (Your changes to tools/private.sh are ignored by git.) For example, of you ran the script to download glslc on Debian, you will need to add the following line to tools/private.sh:

PATH="$PATH:/opt/glslc"

Building

tools/build.sh

Running

tools/build.sh -R