Update Linux build docs with Git

This commit is contained in:
Vasily
2020-01-07 23:31:48 +01:00
committed by username223
parent 6cdb461af3
commit 01972546af
+61 -22
View File
@@ -24,7 +24,26 @@
- [Installing](#installing) - [Installing](#installing)
- [Contributing](#contributing) - [Contributing](#contributing)
Unless you have a good reason not to, just copy and paste the correct TL;DR section into your terminal.
# Requirements # Requirements
## Git
You will need `git` to clone the repo.
### Ubuntu
```bash
sudo apt-get -y install git
```
### Arch/Manjaro
```bash
sudo pacman -S git
```
## Compiler and Build Essentials ## Compiler and Build Essentials
You will need either `clang` version `>=5.0` or `gcc` version `>=7` due to C++17 support. You will need either `clang` version `>=5.0` or `gcc` version `>=7` due to C++17 support.
@@ -35,13 +54,13 @@ You will additionally need the basic build packages for your distro and OpenGL d
For Ubuntu versions older than 18.04 (only 16.04 is officially tested) you'll need to get a backported `gcc`: For Ubuntu versions older than 18.04 (only 16.04 is officially tested) you'll need to get a backported `gcc`:
```bash ```bash
sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update sudo apt-get -y update
sudo apt install build-essential g++-7 libgl1-mesa-dev sudo apt-get -y install build-essential g++-7 libgl1-mesa-dev
``` ```
For Ubuntu versions of 18.04 or newer `build-essential` will contain an appropriate `gcc` version: For Ubuntu versions of 18.04 or newer `build-essential` will contain an appropriate `gcc` version:
```bash ```bash
sudo apt install build-essential libgl1-mesa-dev sudo apt-get -y install build-essential libgl1-mesa-dev
``` ```
### Arch/Manjaro ### Arch/Manjaro
@@ -63,7 +82,7 @@ Ubuntu newer than than 19.04 and Arch/Manjaro will have up to date Qt packages i
### Ubuntu ### Ubuntu
```bash ```bash
sudo apt install qt5-default qtmultimedia5-dev qtdeclarative5-dev sudo apt-get -y install qt5-default qtmultimedia5-dev qtdeclarative5-dev
``` ```
### Arch/Manjaro ### Arch/Manjaro
@@ -89,14 +108,14 @@ For Ubuntu 16.04
```bash ```bash
sudo add-apt-repository ppa:beineri/opt-qt-5.12.6-xenial sudo add-apt-repository ppa:beineri/opt-qt-5.12.6-xenial
sudo apt-get update sudo apt-get update
sudo apt install qt512-meta-full sudo apt-get -y install qt512-meta-full
``` ```
For Ubuntu 18.04 For Ubuntu 18.04
```bash ```bash
sudo add-apt-repository ppa:beineri/opt-qt-5.12.6-bionic sudo add-apt-repository ppa:beineri/opt-qt-5.12.6-bionic
sudo apt-get update sudo apt-get update
sudo apt install qt512-meta-full sudo apt-get -y 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. 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.
@@ -154,7 +173,7 @@ export QT_SELECT=opt-qt512
## X11 ## X11
X11 packages are currently needed for sending keystrokes to the desktop from VR. X11 packages are currently needed for sending keystrokes to the desktop from VR.
Install the packages on Ubuntu with `sudo apt-get install libx11-dev libxt-dev libxtst-dev`. Install the packages on Ubuntu with `sudo apt-get -y install libx11-dev libxt-dev libxtst-dev`.
This feature and dependency can be disabled during compilation. This feature and dependency can be disabled during compilation.
@@ -173,41 +192,61 @@ In order to use `clang-tidy` you will need `bear clang-tidy` in addition to the
You will only need this if you're going to make contributions to the codebase. You will only need this if you're going to make contributions to the codebase.
```bash ```bash
sudo apt install bear clang-tidy sudo apt-get -y install bear clang-tidy
``` ```
# TL;DRs # TL;DRs
## Ubuntu 16.04 Xenial ## Ubuntu 16.04 Xenial
```bash ```bash
# Add repos and update
sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo add-apt-repository ppa:beineri/opt-qt-5.12.6-xenial sudo add-apt-repository ppa:beineri/opt-qt-5.12.6-xenial
sudo apt update sudo apt-get update
sudo apt install g++-7 # Install git
sudo apt-get install build-essential libgl1-mesa-dev sudo apt-get -y install git
sudo apt-get install qt512-meta-full # Clone repo and change directory
sudo apt-get install libx11-dev libxt-dev libxtst-dev git clone https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings --depth=1
cd OpenVR-AdvancedSettings
# Install build tools
sudo apt-get -y install g++-7
sudo apt-get -y install build-essential libgl1-mesa-dev
sudo apt-get -y install qt512-meta-full
sudo apt-get -y install libx11-dev libxt-dev libxtst-dev
qtchooser -install opt-qt512 /opt/qt512/bin/qmake qtchooser -install opt-qt512 /opt/qt512/bin/qmake
export QT_SELECT=opt-qt512 export QT_SELECT=opt-qt512
``` ```
## Ubuntu 18.04 Bionic ## Ubuntu 18.04 Bionic
```bash ```bash
# Add repos and update
sudo add-apt-repository ppa:beineri/opt-qt-5.12.6-bionic sudo add-apt-repository ppa:beineri/opt-qt-5.12.6-bionic
sudo apt update sudo apt-get update
sudo apt install g++-7 # Install git
sudo apt-get install build-essential libgl1-mesa-dev sudo apt-get -y install git
sudo apt-get install qt512-meta-full # Clone repo and change directory
sudo apt-get install libx11-dev libxt-dev libxtst-dev git clone https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings --depth=1
cd OpenVR-AdvancedSettings
# Install build tools
sudo apt-get -y install g++-7
sudo apt-get -y install build-essential libgl1-mesa-dev
sudo apt-get -y install qt512-meta-full
sudo apt-get -y install libx11-dev libxt-dev libxtst-dev
qtchooser -install opt-qt512 /opt/qt512/bin/qmake qtchooser -install opt-qt512 /opt/qt512/bin/qmake
export QT_SELECT=opt-qt512 export QT_SELECT=opt-qt512
``` ```
## Ubuntu 19.04 Disco ## Ubuntu 19.04 Disco and newer
```bash ```bash
sudo apt install build-essential libgl1-mesa-dev # Install git
sudo apt install qt5-default qtmultimedia5-dev libqt5multimediawidgets5 libqt5multimedia5-plugins libqt5multimedia5 qml-module-qtquick-extras qml-module-qtquick-controls2 qml-module-qtquick-dialogs qtdeclarative5-dev sudo apt-get -y install git
sudo apt-get install libx11-dev libxt-dev libxtst-dev # Clone repo and change directory
git clone https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings --depth=1
cd OpenVR-AdvancedSettings
# Install build tools
sudo apt-get -y install build-essential libgl1-mesa-dev
sudo apt-get -y install qt5-default qtmultimedia5-dev libqt5multimediawidgets5 libqt5multimedia5-plugins libqt5multimedia5 qml-module-qtquick-extras qml-module-qtquick-controls2 qml-module-qtquick-dialogs qtdeclarative5-dev
sudo apt-get -y install libx11-dev libxt-dev libxtst-dev
``` ```
You should not need to use `qtchooser` to set the Qt version on 19.04. You should not need to use `qtchooser` to set the Qt version on 19.04.