PCSX2 Documentation/Compiling on Linux: Difference between revisions

no edit summary
(Created page with "NOTE: Only 32-bit architectures are supported, or distributions that allow the installation of 32-bit packages under a 64-bit architecture. ## Index 1. [Introduction](#introd...")
 
No edit summary
Line 1: Line 1:
NOTE: Only 32-bit architectures are supported, or distributions that allow the installation of 32-bit packages under a 64-bit architecture.
NOTE: Only 32-bit architectures are supported, or distributions that allow the installation of 32-bit packages under a 64-bit architecture.


## Index
==Index==
1. [Introduction](#introduction)
1. [Introduction](#introduction)
2. [CMake Build System](#cmake-build-system)
2. [CMake Build System](#cmake-build-system)
Line 7: Line 7:
5. [Arch Linux](#arch-linux)
5. [Arch Linux](#arch-linux)


## Introduction
==Introduction==


This is intended to give you an idea of how to compile PCSX2 from git in Linux. Some of the steps may be different on some versions of Linux, and this is not generally supported by the PCSX2 team. If you have issues following this guide, I'd recommend going through this thread for help: http://forums.pcsx2.net/Thread-Linux-Compile-Guide-and-Support
This is intended to give you an idea of how to compile PCSX2 from git in Linux. Some of the steps may be different on some versions of Linux, and this is not generally supported by the PCSX2 team. If you have issues following this guide, I'd recommend going through this thread for help: http://forums.pcsx2.net/Thread-Linux-Compile-Guide-and-Support


## CMake Build System
==CMake Build System==


### Debian/Ubuntu build dependencies
===Debian/Ubuntu build dependencies===


#### Build system
====Build system====
`gcc`, `gcc-multilib`, `g++`, `g++-multilib`, `cmake`
`gcc`, `gcc-multilib`, `g++`, `g++-multilib`, `cmake`
 
#### 32-bit libraries on x86_64
====32-bit libraries on x86_64====
`libaio-dev:i386`, `libbz2-dev:i386`, `libcggl:i386`, `libegl1-mesa-dev:i386`, `libglew-dev:i386`, `libgles2-mesa-dev`, `libgtk2.0-dev:i386`, `libjpeg-dev:i386`, `libsdl1.2-dev:i386`, `libsoundtouch-dev:i386`, `libsparsehash-dev`, `libwxgtk2.8-dev:i386`, `nvidia-cg-toolkit`, `portaudio19-dev:i386`, `zlib1g-dev:i386`
`libaio-dev:i386`, `libbz2-dev:i386`, `libcggl:i386`, `libegl1-mesa-dev:i386`, `libglew-dev:i386`, `libgles2-mesa-dev`, `libgtk2.0-dev:i386`, `libjpeg-dev:i386`, `libsdl1.2-dev:i386`, `libsoundtouch-dev:i386`, `libsparsehash-dev`, `libwxgtk2.8-dev:i386`, `nvidia-cg-toolkit`, `portaudio19-dev:i386`, `zlib1g-dev:i386`


### Arch Linux build dependencies
===Arch Linux build dependencies===


Some of the required packages to build PCSX2 are available only in the [AUR](https://aur.archlinux.org), so the use of an [AUR helper](https://wiki.archlinux.org/index.php/AUR_Helpers) (ex: yaourt) is highly advised!
Some of the required packages to build PCSX2 are available only in the [AUR](https://aur.archlinux.org), so the use of an [AUR helper](https://wiki.archlinux.org/index.php/AUR_Helpers) (ex: yaourt) is highly advised!


#### Build system
====Build system====
`gcc`, `gcc-multilib`, `cmake`  
`gcc`, `gcc-multilib`, `cmake`  


#### 32-bit libraries
====32-bit libraries====
Add or uncomment the following lines in `/etc/pacman.conf`:
Add or uncomment the following lines in `/etc/pacman.conf`:
```
```
Line 41: Line 41:
`lib32-libaio`, `lib32-libcanberra`, `lib32-libjpeg-turbo`, `lib32-glew`, `lib32-nvidia-cg-toolkit`, `lib32-portaudio`, `lib32-soundtouch`, `lib32-wxgtk2.8`
`lib32-libaio`, `lib32-libcanberra`, `lib32-libjpeg-turbo`, `lib32-glew`, `lib32-nvidia-cg-toolkit`, `lib32-portaudio`, `lib32-soundtouch`, `lib32-wxgtk2.8`


### Using CMake
===Using CMake===


#### Basic mode: straightforward compilation
====Basic mode: straightforward compilation====
Run the `build.sh` script.
Run the `build.sh` script.
You can view the available options with `build.sh -help`
You can view the available options with `build.sh -help`


#### Expert mode: CMake build parameters
====Expert mode: CMake build parameters====
Basic parameters:
Basic parameters:
- Use Release/Devel/Debug : `-DCMAKE_BUILD_TYPE=Release|Devel|Debug`
- Use Release/Devel/Debug : `-DCMAKE_BUILD_TYPE=Release|Devel|Debug`
Line 87: Line 87:
   - `FALSE`: Keep symbols. Better for debug. (recommended since it should not have any impact on speed)  
   - `FALSE`: Keep symbols. Better for debug. (recommended since it should not have any impact on speed)  


### Running CMake to generate the makefile:
===Running CMake to generate the makefile:===


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:
Line 95: Line 95:
```
```


#### Do the compilation:
====Do the compilation:====
```
```
make  
make  
```
```


#### Install files:
====Install files:====
```
```
make install  
make install  
```
```


### Reporting Cmake bugs
===Reporting Cmake bugs===


Not all distributions and configurations were tested. In case you encounter a CMake bug that is really a CMake issue, you can report it. Please provide the following information:
Not all distributions and configurations were tested. In case you encounter a CMake bug that is really a CMake issue, you can report it. Please provide the following information:
Line 159: Line 159:
```
```


## Ubuntu PPA
==Ubuntu PPA==


With multiarch functionality, you can install a 32-bit PPA on a 64-bit Ubuntu. You need at least Ubuntu 12.04 (Precise) to do this.
With multiarch functionality, you can install a 32-bit PPA on a 64-bit Ubuntu. You need at least Ubuntu 12.04 (Precise) to do this.


#### 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:
````
````
Line 169: Line 169:
````
````


#### Add the multiverse package repository
====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
````
````
Line 178: Line 178:
````
````


#### Add the PCSX2 PPA to your software sources
====Add the PCSX2 PPA to your software sources====


In a terminal, type:   
In a terminal, type:   
Line 186: Line 186:
```
```


#### Install the package on your system
====Install the package on your system====
   
   
```
```
Line 192: Line 192:
```
```


## Arch Linux
==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
===PCSX2 Stable===


Open a terminal, and type:  
Open a terminal, and type:  
Line 202: Line 202:
```
```


### PCSX2 Unstable
===PCSX2 Unstable===
Add or uncomment the following lines in `/etc/pacman.conf`:
Add or uncomment the following lines in `/etc/pacman.conf`:
```
```
ninja
782

edits