mirror-chatterino2/BUILDING_ON_LINUX.md
ooxi 6f7961444f
Updated build instructions (#3573)
Building on Ubuntu 18.04 no longer works as documented

```
CMake Error at lib/settings/CMakeLists.txt:132 (message):
  GCC version must be at least 8.0 if using std filesystem
```

I verified the build instructions on Ubuntu 20.04 and they work as advertised.

For Ubuntu 18.04, you'd have the option of
1) Manually installing a later version of GCC
2) Using clang
3) passing the `-DPAJLADA_SETTINGS_USE_BOOST_FILESYSTEM=1` flag to cmake
2022-02-27 10:34:49 +01:00

82 lines
2.2 KiB
Markdown

# Linux
Note on Qt version compatibility: If you are installing Qt from a package manager, please ensure the version you are installing is at least **Qt 5.12 or newer**.
## Ubuntu 20.04
_Most likely works the same for other Debian-like distros_
1. Install all of the dependencies using `sudo apt install qttools5-dev qtmultimedia5-dev libqt5svg5-dev libboost-dev libssl-dev libboost-system-dev libboost-filesystem-dev cmake g++`
### Compiling through Qt Creator
1. Install C++ IDE Qt Creator by using `sudo apt install qtcreator`
1. Open `chatterino.pro` with Qt Creator and select build
### Manually
1. Go into the project directory
1. Create a build folder and go into it (`mkdir build && cd build`)
1. Use one of the options below to compile it
### Using CMake
`cmake .. && make`
### Using QMake
`qmake .. && make`
## Arch Linux
### Through AUR
- [chatterino2-git](https://aur.archlinux.org/packages/chatterino2-git/)
### Manually
1. Install all of the dependencies using `sudo pacman -S qt5-base qt5-multimedia qt5-svg qt5-tools gst-plugins-ugly gst-plugins-good boost rapidjson pkgconf openssl cmake`
1. Go into the project directory
1. Create a build folder and go into it (`mkdir build && cd build`)
1. Use one of the options below to compile it
### Using CMake
`cmake .. && make`
### Using QMake
`qmake .. && make`
## Fedora 28 and above
_Most likely works the same for other Red Hat-like distros. Substitute `dnf` with `yum`._
1. Install all of the dependencies using `sudo dnf install qt5-qtbase-devel qt5-qtmultimedia-devel qt5-qtsvg-devel libsecret-devel openssl-devel boost-devel cmake`
1. Go into the project directory
1. Create a build folder and go into it (`mkdir build && cd build`)
1. Use one of the options below to compile it
### Using CMake
`cmake .. && make -j$(nproc)`
### Using QMake
`qmake-qt5 .. && make -j$(nproc)`
## NixOS 18.09+
1. Enter the development environment with all of the dependencies: `nix-shell -p openssl boost qt5.full pkg-config cmake`
1. Go into the project directory
1. Create a build folder and go into it (`mkdir build && cd build`)
1. Use one of the options below to compile it
### Using CMake
`cmake .. && make`
### Using QMake
`qmake .. && make`