Add table of contents and reduce indentation of headers

The #### headers do not look very distinct in Github markup, reducing
the header indentation will make them stand out more.
This commit is contained in:
Vasily
2019-04-17 20:51:34 +02:00
committed by username223
parent 1cbfd7173b
commit 5fad6ca4d1
+29 -15
View File
@@ -1,6 +1,20 @@
# Building on Linux
## Requirements
### Compiler and Build Essentials
- [Requirements](#requirements)
* [Compiler and Build Essentials](#compiler-and-build-essentials)
* [Qt](#qt)
* [Official Qt Installer](#official-qt-installer)
* [Unofficial Ubuntu Packages](#unofficial-ubuntu-packages)
* [`qtchooser` and versions](#-qtchooser--and-versions)
* [X11](#x11)
* [`clang-tidy` and `bear`](#-clang-tidy--and--bear-)
- [TL;DR: for Ubuntu](#tl-dr--for-ubuntu)
* [Ubuntu 16.04 Xenial](#ubuntu-1604-xenial)
* [Ubuntu 18.04 Bionic](#ubuntu-1804-bionic)
- [Locations and Environment Variables](#locations-and-environment-variables)
- [Building](#building)
- [Contributing](#contributing)
# Requirements
## Compiler and Build Essentials
You will need either `clang` og `g++`. At least `g++-7` or `clang` version `5.0` is required due to C++17 support.
You will additionally need the `build-essential` and `libgl1-mesa-dev` packages.
@@ -11,15 +25,15 @@ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-7
```
### Qt
## Qt
At least version `5.12` is required.
#### Official Qt Installer
## Official Qt Installer
The easiest way to get it is from the [official Qt installer](https://www.qt.io/download-qt-installer).
#### Unofficial Ubuntu Packages
## Unofficial Ubuntu Packages
If you don't want to use the offical installer, you can use [this](https://launchpad.net/~beineri) PPA.
@@ -39,7 +53,7 @@ sudo apt install qt512-meta-full
```
If you choose the wrong Ubuntu version you will get an error from `apt` about there not being a `Release` file. Try the other one instead.
#### `qtchooser` and versions
## `qtchooser` and versions
If you have multiple Qt installations you might need to select the correct one using `qtchooser`.
@@ -80,11 +94,11 @@ qtchooser -install opt-qt512 /opt/qt512/bin/qmake
Afterwards you should set the `QT_SELECT` environment variable to the name you chose (we used `opt-qt512`).
### X11
## X11
X11 packages are currently needed for sending keystrokes to the desktop from VR. Install the packages with `sudo apt-get install libx11-dev libxt-dev libxtst-dev`. This feature will be gated behind a compile flag soon.
### `clang-tidy` and `bear`
## `clang-tidy` and `bear`
In order to use `clang-tidy` you will need `bear clang-tidy` in addition to the above (and `clang`). You will only need this if you're going to make contributions to the codebase.
@@ -92,8 +106,8 @@ In order to use `clang-tidy` you will need `bear clang-tidy` in addition to the
sudo apt install bear clang-tidy
```
## TL;DR: for Ubuntu
### Ubuntu 16.04 Xenial
# TL;DR: for Ubuntu
## Ubuntu 16.04 Xenial
```bash
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo add-apt-repository ppa:beineri/opt-qt-5.12.2-xenial
@@ -106,7 +120,7 @@ sudo apt-get install bear clang-tidy
qtchooser -install opt-qt512 /opt/qt512/bin/qmake
```
### Ubuntu 18.04 Bionic
## Ubuntu 18.04 Bionic
```bash
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo add-apt-repository ppa:beineri/opt-qt-5.12.2-bionic
@@ -119,7 +133,7 @@ sudo apt-get install bear clang-tidy
qtchooser -install opt-qt512 /opt/qt512/bin/qmake
```
## Locations and Environment Variables
# Locations and Environment Variables
The following environmental variables are relevant for building the project.
@@ -130,12 +144,12 @@ The following environmental variables are relevant for building the project.
If an environment variable isn't set a default value will be provided. The default values are shown in the table below.
## Building
# Building
With the programs above installed and environment variables set, go into the root folder of the repository and run `./build_scripts/linux/build_linux.sh`.
If you copy the `third-party/openvr/lib/linux64/libopenvr_api.so` file into `/lib` you can run the `AdvancedSettings` file without anything else. Otherwise you'll need to run the `run-with-library.sh` file.
## Contributing
# Contributing
For full details, see [CONTRIBUTING.md](CONTRIBUTING.md).