Setting up Linux version: Difference between revisions

From PCSX2 Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:
PCSX2 is hosted on GitHub, a website where people can contribute to each others' programming projects using the Git version control software. GitHub is essentially just a showcase for your projects, to actually work on them you need to download and install Git itself.
PCSX2 is hosted on GitHub, a website where people can contribute to each others' programming projects using the Git version control software. GitHub is essentially just a showcase for your projects, to actually work on them you need to download and install Git itself.


Arch Linux: <code># pacman -S git</code>
'''Arch Linux:''' <code># pacman -S 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/you/workspace. You are going to want clone the remote PCSX2 repository like so:
Line 12: Line 12:
<code>$ git clone https://github.com/PCSX2/pcsx2.git</code>
<code>$ git clone https://github.com/PCSX2/pcsx2.git</code>


You are now making a copy of the remote repository into your own directory.<br />
You are now making a copy of the remote repository into your own directory.
 


==Installing the Build System==
==Installing the Build System==
Line 18: Line 19:
PCSX2 uses the cmake build system to create project files and other things for multiple platforms, and GCC to compile on the linux platform. To install these you are going to want to run:
PCSX2 uses the cmake build system to create project files and other things for multiple platforms, and GCC to compile on the linux platform. To install these you are going to want to run:


Arch 64: <code># pacman -S cmake gcc-multilib </code><br />
'''Arch 64:''' <code># pacman -S cmake gcc-multilib </code>
 


==Installing the Dependencies==
==Installing the Dependencies==
Line 24: Line 26:
PCSX2 relies on a number of 3rd party software libraries, so you are going to need to obtain those before you can compile the source code.
PCSX2 relies on a number of 3rd party software libraries, so you are going to need to obtain those before you can compile the source code.


Arch 64: <code># pacman -S lib32-alsa-lib lib32-bzip2 lib32-libjpeg lib32-glew lib32-nvidia-cg-toolkit lib32-portaudio lib32-sdl lib32-wxgtk2.8 lib32-libaio</code><br />
'''Arch 64:''' <code># pacman -S lib32-alsa-lib lib32-bzip2 lib32-libjpeg lib32-glew lib32-nvidia-cg-toolkit lib32-portaudio lib32-sdl lib32-wxgtk2.8 lib32-libaio</code>
 


==Compiling the Source==
==Compiling the Source==
Line 34: Line 37:
Now that we have installed all external libraries, it is time to compile the source code! To do that, we are going to run a shell script which automates the entire process.<br />
Now that we have installed all external libraries, it is time to compile the source code! To do that, we are going to run a shell script which automates the entire process.<br />
<code>$ cd /home/you/workspace/pcsx2</code><br />
<code>$ cd /home/you/workspace/pcsx2</code><br />
<code>$ sh build.sh</code><br />
<code>$ sh build.sh</code>





Revision as of 00:11, 9 July 2014

The following is a guide on how to obtain and compile the PCSX2 source code on the Linux platform.

Obtaining the Source Code

PCSX2 is hosted on GitHub, a website where people can contribute to each others' programming projects using the Git version control software. GitHub is essentially just a showcase for your projects, to actually work on them you need to download and install Git itself.

Arch Linux: # pacman -S git

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:

$ cd /home/you/workspace
$ git clone https://github.com/PCSX2/pcsx2.git

You are now making a copy of the remote repository into your own directory.


Installing 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. To install these you are going to want to run:

Arch 64: # pacman -S cmake gcc-multilib


Installing the Dependencies

PCSX2 relies on a number of 3rd party software libraries, so you are going to need to obtain those before you can compile the source code.

Arch 64: # pacman -S lib32-alsa-lib lib32-bzip2 lib32-libjpeg lib32-glew lib32-nvidia-cg-toolkit lib32-portaudio lib32-sdl lib32-wxgtk2.8 lib32-libaio


Compiling the Source

NOTE! There seems to be a small problem in Arch where the cmake cannot find wxgtk. You can fix this by adding these flags to the build script:
-DwxWidgets_CONFIG_EXECUTABLE='/usr/bin/wx-config-2.8' -DwxWidgets_wxrc_EXECUTABLE='/usr/bin/wxrc-2.8'

Now that we have installed all external libraries, it is time to compile the source code! To do that, we are going to run a shell script which automates the entire process.
$ cd /home/you/workspace/pcsx2
$ sh build.sh


Running the Binary

This process may take several minutes. Once it has finished, you should be able to run the pcsx2 binary:
$ ./bin/pcsx2-dev