mirror of
https://gitea.windcorp.ru/Wind-Corporation/Progressia.git
synced 2025-12-15 23:08:34 +03:00
Initial commit
This commit is contained in:
88
docs/BuildingGuide.md
Normal file
88
docs/BuildingGuide.md
Normal file
@@ -0,0 +1,88 @@
|
||||
# Building guide
|
||||
|
||||
At this time, building is only supported in GNU/Linux targeting GNU/Linux X11.
|
||||
See also [Development Setup Guide](DevelopmentSetupGuide.md) 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:
|
||||
```bash
|
||||
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:
|
||||
```bash
|
||||
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](https://vulkan.lunarg.com/sdk/home) to install
|
||||
`vulkan-sdk`.
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
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`:
|
||||
```bash
|
||||
PATH="$PATH:/opt/glslc"
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
```bash
|
||||
tools/build.sh
|
||||
```
|
||||
|
||||
## Running
|
||||
|
||||
```bash
|
||||
tools/build.sh -R
|
||||
```
|
||||
Reference in New Issue
Block a user