mirror of https://github.com/PCSX2/pcsx2.git
Updated 10 Building on Linux (markdown)
parent
b94140e6e6
commit
4c27dc9626
|
@ -23,6 +23,72 @@ The following package list is sufficient for building PCSX2 as of 2024/04/06 wit
|
|||
```
|
||||
alsa-lib-devel brotli-devel clang cmake dbus-devel egl-wayland-devel extra-cmake-modules fontconfig-devel gcc-c++ gtk3-devel libaio-devel libcurl-devel libdecor-devel libevdev-devel libICE-devel libinput-devel libpcap-devel libSM-devel libX11-devel libXau-devel libxcb-devel libXcomposite-devel libXcursor-devel libXext-devel libXfixes-devel libXft-devel libXi-devel libxkbcommon-devel libxkbcommon-x11-devel libXpresent-devel libXrandr-devel libXrender-devel lld llvm make mesa-libEGL-devel mesa-libGL-devel ninja-build openssl-devel patch pcre2-devel perl-Digest-SHA pipewire-devel pulseaudio-libs-devel systemd-devel wayland-devel xcb-util-cursor-devel xcb-util-devel xcb-util-errors-devel xcb-util-image-devel xcb-util-keysyms-devel xcb-util-renderutil-devel xcb-util-wm-devel xcb-util-xrm-devel zlib-devel
|
||||
```
|
||||
### NixOS nix-shell
|
||||
|
||||
```nix
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
pkgs.mkShell {
|
||||
buildInputs = with pkgs;
|
||||
with qt6;
|
||||
with xorg; [
|
||||
curl
|
||||
extra-cmake-modules
|
||||
ffmpeg
|
||||
libaio
|
||||
libbacktrace
|
||||
libpcap
|
||||
libwebp
|
||||
libXrandr
|
||||
lz4
|
||||
qtbase
|
||||
qtsvg
|
||||
qttools
|
||||
qtwayland
|
||||
SDL2
|
||||
shaderc
|
||||
soundtouch
|
||||
vulkan-headers
|
||||
wayland
|
||||
zstd
|
||||
clang
|
||||
lld
|
||||
];
|
||||
|
||||
nativeBuildInputs = with pkgs;
|
||||
with qt6; [
|
||||
cmake
|
||||
pkg-config
|
||||
strip-nondeterminism
|
||||
wrapQtAppsHook
|
||||
zip
|
||||
];
|
||||
|
||||
qtWrapperArgs = let
|
||||
libs = with pkgs;
|
||||
lib.makeLibraryPath
|
||||
([ vulkan-loader shaderc ] ++ cubeb.passthru.backendLibs);
|
||||
in [ "--prefix LD_LIBRARY_PATH : ${libs}" ];
|
||||
|
||||
shellHook = ''
|
||||
if [ ! -d "$(pwd)/pcsx2" ]; then
|
||||
echo "pcsx2 not cloned, cloning..."
|
||||
git clone git@github.com:PCSX2/pcsx2.git
|
||||
fi
|
||||
if [ ! -d "$(pwd)/pcsx2/build" ]; then
|
||||
echo "pcsx2 not configured, configuring..."
|
||||
cd pcsx2
|
||||
cmake -B build -DDISABLE_ADVANCE_SIMD=true -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld" -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" -DCMAKE_PREFIX_PATH="$PWD/deps" -GNinja
|
||||
cd ..
|
||||
fi
|
||||
|
||||
|
||||
bashdir=$(mktemp -d)
|
||||
makeWrapper "$(type -p bash)" "$bashdir/bash" "''${qtWrapperArgs[@]}"
|
||||
export NIX_ENFORCE_PURITY=0
|
||||
exec "$bashdir/bash"
|
||||
'';
|
||||
}
|
||||
```
|
||||
|
||||
## Build procedure
|
||||
|
||||
|
|
Loading…
Reference in New Issue