PCSX2 Documentation/Compiling on Linux: Difference between revisions

Jump to navigation Jump to search
Added a disclaimer and some quick and dirty instructions until the rest of the page can be rewritten.
m (You need to check out submodules in order to be able to compile pcsx2, which recurse does.)
(Added a disclaimer and some quick and dirty instructions until the rest of the page can be rewritten.)
Line 12: Line 12:
*'''Fedora:''' <code># dnf install git</code>
*'''Fedora:''' <code># dnf install git</code>


Next you are going to want to create a directory on your machine for the PCSX2 code to live in. For this example, let's say the directory you create is /home/you/workspace. You are going to want clone the remote PCSX2 repository like so:
Next you are going to want to create a directory on your machine for the PCSX2 code to live in. For this example, let's say the directory you create is /home/your/workspace. You are going to want clone the remote PCSX2 repository like so:


<source lang="bash">
<source lang="bash">
Line 23: Line 23:
==Setting up the Build System==
==Setting up the Build System==


PCSX2 uses the cmake build system to create project files and other things for multiple platforms, and GCC to compile on the linux platform.
PCSX2 uses the cmake build system to create project files and other things for multiple platforms, and GCC or clang to compile on the linux platform.
 
Most of the information below is currently out of date. PCSX2 currently only compiles on 64 bits, not 32 bits, and the libraries are likely out of date as well. This will be updated, but for the moment, if you want to compile it, you can do so like this:
 
{| class="wikitable"
|+ Compiling a release build.
|-
! Compiler/build system !! command
|-
| gcc/make || mkdir build && cd build && cmake --preset=gcc-release .. && make
|-
| gcc/ninja || mkdir build && cd build && cmake --preset=gcc-release-ninja .. && ninja
|-
| clang/ninja/lld || mkdir build && cd build && cmake --preset=clang-release .. && ninja
|}
 
And run bin/pcsx2-qt .
 
{| class="wikitable"
|+ For reference, here is the current list of presets:
|-
! Name !! Description
|-
| ninja-multi || Generates ninja build files for debug/devel/and release builds for gcc.
|-
| gcc-debug || For making a debug build with gcc and make.
|-
| gcc-devel || For making a development build with gcc and make.
|-
| gcc-release || For making a release build with gcc and make. Does not have LTO.
|-
| gcc-debug-ninja || For making a debug build with gcc and ninja. (ninja builds faster then make.)
|-
| gcc-devel-ninja || For making a development build with gcc and ninja.(ninja builds faster then make.)
|-
| gcc-release-ninja || For making a release build with gcc and ninja. Does not have LTO. (ninja builds faster then make.)
|-
| clang-debug || For making a debug build with clang and ninja. (Fastest builds.)
|-
| clang-devel || For making a development build with clang and ninja. (Fastest builds.)
|-
| clang-release || For making a release build with clang and ninja. (This one has lto, so has the slowest build time.)
|}
 
Everything below this point is outdated.


===32-bit compile on 64-bit machines===
===32-bit compile on 64-bit machines===
ninja
6

edits

Navigation menu