PCSX2 Documentation/PCSX2 Build Scripts: Difference between revisions
Jump to navigation
Jump to search
PCSX2 Documentation/PCSX2 Build Scripts (view source)
Revision as of 00:28, 28 May 2016
, 28 May 2016→Expert debugging parameters: wxWidgets 2.8 is not supported anymore (and doesn't compile)
(→Expert debugging parameters: wxWidgets 2.8 is not supported anymore (and doesn't compile)) |
|||
(13 intermediate revisions by 2 users not shown) | |||
Line 9: | Line 9: | ||
The CMake build process is controlled by [https://github.com/PCSX2/pcsx2/blob/master/CMakeLists.txt This file here]. Cmake will check if directories exist for the different modules of pcsx2 (core, plugins, etc) and then search for CMakeLists.txt files within those directories, which in turn may check for further subdirectories. For example, the CMakeLists.txt file in the plugins folder will check if directories exist for the different pcsx2 plugins. There will in turn be a CMakeLists.txt file in each of the plugin folders. When you add a new source code file, you will need to add it to the CMakeLists.txt file for the module of pcsx2 you are working on. | The CMake build process is controlled by [https://github.com/PCSX2/pcsx2/blob/master/CMakeLists.txt This file here]. Cmake will check if directories exist for the different modules of pcsx2 (core, plugins, etc) and then search for CMakeLists.txt files within those directories, which in turn may check for further subdirectories. For example, the CMakeLists.txt file in the plugins folder will check if directories exist for the different pcsx2 plugins. There will in turn be a CMakeLists.txt file in each of the plugin folders. When you add a new source code file, you will need to add it to the CMakeLists.txt file for the module of pcsx2 you are working on. | ||
== | ==CMake Build Parameters== | ||
===Basic parameters:=== | ===Basic parameters:=== | ||
*Use Release/Devel/Debug : <code>-DCMAKE_BUILD_TYPE=Release|Devel|Debug</code> | *Use Release/Devel/Debug : <code>-DCMAKE_BUILD_TYPE=Release|Devel|Debug</code> | ||
Line 18: | Line 19: | ||
*Build all plugins: <code>-DEXTRA_PLUGINS=TRUE</code> | *Build all plugins: <code>-DEXTRA_PLUGINS=TRUE</code> | ||
===Expert parameters=== (not supported, the best is to use the default options) | ===Expert parameters=== | ||
''(not supported, the best is to use the default options)'' | |||
*Tune C flags : <code>-DUSER_CMAKE_C_FLAGS:STRING="cflags"</code> | *Tune C flags : <code>-DUSER_CMAKE_C_FLAGS:STRING="cflags"</code> | ||
*Tune C++ flags : <code>-DUSER_CMAKE_CXX_FLAGS:STRING="cxxflags"</code> | *Tune C++ flags : <code>-DUSER_CMAKE_CXX_FLAGS:STRING="cxxflags"</code> | ||
*Tune linker flags : <code>-DUSER_CMAKE_LD_FLAGS:STRING="ldflags"</code> | *Tune linker flags : <code>-DUSER_CMAKE_LD_FLAGS:STRING="ldflags"</code> | ||
===Expert debugging parameters=== (typical | ===Expert debugging parameters=== | ||
''(typical developers-only option)'' | |||
*Build GS replayer: <code>-DBUILD_REPLAY_LOADERS=TRUE</code> | *Build GS replayer: <code>-DBUILD_REPLAY_LOADERS=TRUE</code> | ||
*Use Address Sanitizer: <code>-DUSE_ASAN=TRUE</code> | *Use Address Sanitizer: <code>-DUSE_ASAN=TRUE</code> | ||
===Experimental parameters=== (not supported, the best is to use the default options) | ===Experimental parameters=== | ||
''(not supported, the best is to use the default options)'' | |||
*zzogl: Use GLSL for shading instead of nvidia cg : <code>-DGLSL_API=TRUE</code> | *zzogl: Use GLSL for shading instead of nvidia cg : <code>-DGLSL_API=TRUE</code> | ||
*zzogl: Use EGL instead of GLX : <code>-DEGL_API=TRUE</code> | *zzogl: Use EGL instead of GLX : <code>-DEGL_API=TRUE</code> | ||
Line 53: | Line 56: | ||
It is advised to use a build method that places build files outside the PCSX2 sources directory, as it makes it easier to delete all CMake build files: | It is advised to use a build method that places build files outside the PCSX2 sources directory, as it makes it easier to delete all CMake build files: | ||
mkdir build | <source lang="bash"> | ||
cmake .. <other options> | $ mkdir build | ||
$ cd build | |||
$ cmake .. <other options> | |||
</source> | |||
====Do the compilation:==== | ====Do the compilation:==== | ||
<source lang="bash"> | |||
make | $ make | ||
</source> | |||
====Install files:==== | ====Install files:==== | ||
<source lang="bash"> | |||
make install | $ make install | ||
</source> | |||
====Reporting Cmake bugs==== | ====Reporting Cmake bugs==== | ||
Line 71: | Line 77: | ||
#Linux distribution, the current kernel version, and architecture (32-bit or 64-bit) | #Linux distribution, the current kernel version, and architecture (32-bit or 64-bit) | ||
#The CMake commands. For example: | #The CMake commands. For example: <code>cmake CMakeLists.txt</code> | ||
#''All'' of CMake's output. Something like this is good: | #''All'' of CMake's output. Something like this is good: | ||
<source lang="text"> | |||
-- The C compiler identification is GNU | -- The C compiler identification is GNU | ||
-- The CXX compiler identification is GNU | -- The CXX compiler identification is GNU | ||
Line 118: | Line 124: | ||
-- Generating done | -- Generating done | ||
-- Build files have been written to: /mnt/playstation/emulateur/package/pcsx2.snapshot-4810 | -- Build files have been written to: /mnt/playstation/emulateur/package/pcsx2.snapshot-4810 | ||
</source> | |||
==Ubuntu PPA== | ==Ubuntu PPA== | ||
Line 126: | Line 132: | ||
====Add the x86 architecture to your package manager (x64 installs of 12.04 or newer only)==== | ====Add the x86 architecture to your package manager (x64 installs of 12.04 or newer only)==== | ||
In a terminal, type: | In a terminal, type: | ||
<source lang="bash"> | |||
sudo dpkg --add-architecture i386 | $ sudo dpkg --add-architecture i386 | ||
</source> | |||
====Add the multiverse package repository==== | |||
Uncomment lines looking like this, where trusty is replaced by your Ubuntu version | Uncomment lines looking like this, where trusty is replaced by your Ubuntu version | ||
<source lang="bash"> | |||
deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse | deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse | ||
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse | deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse | ||
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse | deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse | ||
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse | deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse | ||
</source> | |||
====Add the PCSX2 PPA to your software sources==== | |||
In a terminal, type: | In a terminal, type: | ||
<source lang="bash"> | |||
sudo add-apt-repository ppa:gregory-hainaut/pcsx2.official.ppa | sudo add-apt-repository ppa:gregory-hainaut/pcsx2.official.ppa | ||
sudo apt-get update | sudo apt-get update | ||
</source> | |||
====Install the package on your system==== | |||
<source lang="bash"> | |||
sudo apt-get install pcsx2 | sudo apt-get install pcsx2 | ||
</source> | |||
==Arch Linux== | |||
NOTE: for 64-bit architectures, multilib must be enabled in order to install PCSX2. | NOTE: for 64-bit architectures, multilib must be enabled in order to install PCSX2. | ||
===PCSX2 Stable=== | |||
Open a terminal, and type: | Open a terminal, and type: | ||
<source lang="bash"> | |||
sudo pacman -S pcsx2 | $ sudo pacman -S pcsx2 | ||
</source> | |||
===PCSX2 Unstable=== | |||
Add or uncomment the following lines in | Add or uncomment the following lines in <code>/etc/pacman.conf</code>: | ||
<source lang="bash"> | |||
[Multilib] | [Multilib] | ||
Include = /etc/pacman.d/mirrorlist | Include = /etc/pacman.d/mirrorlist | ||
</source> | |||
Refresh package list: | Refresh package list: | ||
<source lang="bash"> | |||
pacman -Sy | # pacman -Sy | ||
</source> | |||
Download the tarball from the [ | Download the tarball from the [https://aur.archlinux.org/packages/pcsx2-git AUR package page], and unpack it. | ||
Open the folder that you just unpacked in a terminal, and type: | Open the folder that you just unpacked in a terminal, and type: | ||
<source lang="bash"> | |||
makepkg -csi | $ makepkg -csi | ||
</source> | |||
This will build the package, automatically installing all dependencies. It will then prompt for your password to install the package with pacman. | This will build the package, automatically installing all dependencies. It will then prompt for your password to install the package with pacman. | ||
{{PCSX2 Documentation Navbox}} |