mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-19 19:14:48 +00:00
Update linux build docs (#2474)
* fix: update linux build dependencies for libpng - add libpng to linux build docs - add libpng to nix build file * linux docs: reformat code blocks - add code block bash syntax highlighting - format long code blocks to multiline
This commit is contained in:
parent
f686b1df98
commit
50aa0f5564
2 changed files with 32 additions and 15 deletions
|
@ -13,33 +13,49 @@ First and foremost, Clang 18 is the **recommended compiler** as it is used for o
|
||||||
|
|
||||||
#### Debian & Ubuntu
|
#### Debian & Ubuntu
|
||||||
|
|
||||||
```
|
```bash
|
||||||
sudo apt install build-essential clang git cmake libasound2-dev libpulse-dev libopenal-dev libssl-dev zlib1g-dev libedit-dev libudev-dev libevdev-dev libsdl2-dev libjack-dev libsndio-dev qt6-base-dev qt6-tools-dev qt6-multimedia-dev libvulkan-dev vulkan-validationlayers
|
sudo apt install build-essential clang git cmake libasound2-dev \
|
||||||
|
libpulse-dev libopenal-dev libssl-dev zlib1g-dev libedit-dev \
|
||||||
|
libudev-dev libevdev-dev libsdl2-dev libjack-dev libsndio-dev \
|
||||||
|
qt6-base-dev qt6-tools-dev qt6-multimedia-dev libvulkan-dev \
|
||||||
|
vulkan-validationlayers libpng-dev
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Fedora
|
#### Fedora
|
||||||
|
|
||||||
```
|
```bash
|
||||||
sudo dnf install clang git cmake libatomic alsa-lib-devel pipewire-jack-audio-connection-kit-devel openal-devel openssl-devel libevdev-devel libudev-devel libXext-devel qt6-qtbase-devel qt6-qtbase-private-devel qt6-qtmultimedia-devel qt6-qtsvg-devel qt6-qttools-devel vulkan-devel vulkan-validation-layers
|
sudo dnf install clang git cmake libatomic alsa-lib-devel \
|
||||||
|
pipewire-jack-audio-connection-kit-devel openal-devel \
|
||||||
|
openssl-devel libevdev-devel libudev-devel libXext-devel \
|
||||||
|
qt6-qtbase-devel qt6-qtbase-private-devel \
|
||||||
|
qt6-qtmultimedia-devel qt6-qtsvg-devel qt6-qttools-devel \
|
||||||
|
vulkan-devel vulkan-validation-layers libpng-devel
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Arch Linux
|
#### Arch Linux
|
||||||
|
|
||||||
```
|
```bash
|
||||||
sudo pacman -S base-devel clang git cmake sndio jack2 openal qt6-base qt6-declarative qt6-multimedia sdl2 vulkan-validation-layers
|
sudo pacman -S base-devel clang git cmake sndio jack2 openal \
|
||||||
|
qt6-base qt6-declarative qt6-multimedia sdl2 \
|
||||||
|
vulkan-validation-layers libpng
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note**: The `shadps4-git` AUR package is not maintained by any of the developers, and it uses the default compiler, which is often set to GCC. Use at your own discretion.
|
**Note**: The `shadps4-git` AUR package is not maintained by any of the developers, and it uses the default compiler, which is often set to GCC. Use at your own discretion.
|
||||||
|
|
||||||
#### OpenSUSE
|
#### OpenSUSE
|
||||||
|
|
||||||
```
|
```bash
|
||||||
sudo zypper install clang git cmake libasound2 libpulse-devel libsndio7 libjack-devel openal-soft-devel libopenssl-devel zlib-devel libedit-devel systemd-devel libevdev-devel qt6-base-devel qt6-multimedia-devel qt6-svg-devel qt6-linguist-devel qt6-gui-private-devel vulkan-devel vulkan-validationlayers
|
sudo zypper install clang git cmake libasound2 libpulse-devel \
|
||||||
|
libsndio7 libjack-devel openal-soft-devel libopenssl-devel \
|
||||||
|
zlib-devel libedit-devel systemd-devel libevdev-devel \
|
||||||
|
qt6-base-devel qt6-multimedia-devel qt6-svg-devel \
|
||||||
|
qt6-linguist-devel qt6-gui-private-devel vulkan-devel \
|
||||||
|
vulkan-validationlayers libpng-devel
|
||||||
```
|
```
|
||||||
|
|
||||||
#### NixOS
|
#### NixOS
|
||||||
|
|
||||||
```
|
```bash
|
||||||
nix-shell shell.nix
|
nix-shell shell.nix
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -50,7 +66,7 @@ You can try one of two methods:
|
||||||
- Search the packages by name and install them with your package manager, or
|
- Search the packages by name and install them with your package manager, or
|
||||||
- Install [distrobox](https://distrobox.it/), create a container using any of the distributions cited above as a base, for Arch Linux you'd do:
|
- Install [distrobox](https://distrobox.it/), create a container using any of the distributions cited above as a base, for Arch Linux you'd do:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
distrobox create --name archlinux --init --image archlinux:latest
|
distrobox create --name archlinux --init --image archlinux:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -59,7 +75,7 @@ This option is **highly recommended** for distributions with immutable/atomic fi
|
||||||
|
|
||||||
### Cloning
|
### Cloning
|
||||||
|
|
||||||
```
|
```bash
|
||||||
git clone --recursive https://github.com/shadps4-emu/shadPS4.git
|
git clone --recursive https://github.com/shadps4-emu/shadPS4.git
|
||||||
cd shadPS4
|
cd shadPS4
|
||||||
```
|
```
|
||||||
|
@ -72,7 +88,7 @@ There are 3 options you can choose from. Option 1 is **highly recommended**.
|
||||||
|
|
||||||
1. Generate the build directory in the shadPS4 directory.
|
1. Generate the build directory in the shadPS4 directory.
|
||||||
|
|
||||||
```
|
```bash
|
||||||
cmake -S . -B build/ -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
cmake -S . -B build/ -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -80,7 +96,7 @@ To disable the Qt GUI, remove the `-DENABLE_QT_GUI=ON` flag. To change the build
|
||||||
|
|
||||||
2. Use CMake to build the project:
|
2. Use CMake to build the project:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
cmake --build ./build --parallel$(nproc)
|
cmake --build ./build --parallel$(nproc)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -88,13 +104,13 @@ If your computer freezes during this step, this could be caused by excessive sys
|
||||||
|
|
||||||
Now run the emulator. If Qt was enabled at configure time:
|
Now run the emulator. If Qt was enabled at configure time:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
./build/shadps4
|
./build/shadps4
|
||||||
```
|
```
|
||||||
|
|
||||||
Otherwise, specify the path to your PKG's boot file:
|
Otherwise, specify the path to your PKG's boot file:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
./build/shadps4 /"PATH"/"TO"/"GAME"/"FOLDER"/eboot.bin
|
./build/shadps4 /"PATH"/"TO"/"GAME"/"FOLDER"/eboot.bin
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ pkgs.mkShell {
|
||||||
pkgs.stb
|
pkgs.stb
|
||||||
pkgs.qt6.qtwayland
|
pkgs.qt6.qtwayland
|
||||||
pkgs.wayland-protocols
|
pkgs.wayland-protocols
|
||||||
|
pkgs.libpng
|
||||||
];
|
];
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
|
|
Loading…
Add table
Reference in a new issue