Difference between revisions of "Building Dolphin on Linux"

From Dolphin Emulator Wiki
Jump to: navigation, search
m (Undo revision 84846 by 76.123.216.148 (talk))
(Booo! I am a WikiDragon, now! ;))
Line 1: Line 1:
 +
Only binaries for [http://distrowatch.com/search.php?basedon=Ubuntu Ubuntu-based] distributions are available on [https://dolphin-emu.org/download/ Dolphin's download page], so users of other distros have to Dolphin from source. Dolphin is compatible with 32 and 64 bit Linux distributions. This is a guide to compiling Dolphin using the cmake build system.
  
Only Ubuntu has packages available on the main site, but users of other distros can compile their own versions of Dolphin. Dolphin is fully compatible with both 32 and 64 bit Linux distributions. Here's how to do it, using the cmake build system.
+
If looking for help installing on Ubuntu-based distros, such as ''Linux Mint'', ''Elementary OS'', ''Zorin OS'', ''Bodhi Linux'', ''Deepin'', ''Linux Lite'', ''Pinguy OS'', ''Kubuntu'', ''Xubuntu'', ''Lubuntu'', ''Ubuntu GNOME'', ''Edubuntu'', ''Ubuntu Studio'' or ''Mythbuntu'', see [[Installing Dolphin#Ubuntu]].
  
(This howto is based upon the outdated build instruction from the [http://code.google.com/p/dolphin-emu/wiki/Linux_Build project wiki page])
+
== Step 1 - Installing the Dependencies ==
 +
===Ubuntu===
 +
====12.04 and newer====
 +
Install all necessary packages by running the following command:
  
== Step 1 - Install the Correct Dependencies ==
+
<code>sudo apt-get install cmake git g++ wx2.8-headers libwxbase2.8-dev libwxgtk2.8-dev libgtk2.0-dev libsdl1.2-dev libxrandr-dev libxext-dev libao-dev libasound2-dev libpulse-dev libbluetooth-dev libreadline-gplv2-dev libavcodec-dev libavformat-dev libswscale-dev</code>
  
'''Ubuntu 12.04 and newer'''<br/>
+
====11.10====
<code>sudo apt-get install cmake git g++ wx2.8-headers libwxbase2.8-dev libwxgtk2.8-dev libgtk2.0-dev libsdl1.2-dev libxrandr-dev libxext-dev libao-dev libasound2-dev libpulse-dev libbluetooth-dev libreadline-gplv2-dev libavcodec-dev libavformat-dev libswscale-dev</code>
+
If you are still using such an old release, consider upgrading.
 +
Run the following to install the dependencies:
  
'''Ubuntu 11.10'''<br/>
 
 
<code>sudo apt-get install cmake git g++ wx2.8-headers libwxbase2.8-dev libwxgtk2.8-dev libgtk2.0-dev libsdl1.2-dev libxrandr-dev libxext-dev libao-dev libasound2-dev libpulse-dev libbluetooth-dev libreadline5-dev libavcodec-dev libavformat-dev libswscale-dev</code>
 
<code>sudo apt-get install cmake git g++ wx2.8-headers libwxbase2.8-dev libwxgtk2.8-dev libgtk2.0-dev libsdl1.2-dev libxrandr-dev libxext-dev libao-dev libasound2-dev libpulse-dev libbluetooth-dev libreadline5-dev libavcodec-dev libavformat-dev libswscale-dev</code>
  
'''Other Linux version?'''<br/>
+
===Other Linux Distributions===
If running a distribution without aptitude, see the build dependencies in addendum A for a list of packages needed to install.
+
If running a distribution without aptitude, see the build dependencies in [#Addendum A - dependencies] for a list of packages needed to install.
  
 
== Step 2 - Get the Dolphin Repository ==
 
== Step 2 - Get the Dolphin Repository ==
Install git if it's not already.<br/>
+
Install git if it's not already installed:
<code>sudo apt-get install git</code>
+
*for apt-based distros: <code>sudo apt-get install git</code>
 +
*for rpm-based distros: <code>sudo yum install git</code>
 +
*for pacman-based distros: <code>sudo pacman -S git</code>
 +
 
 +
Get a local copy of the dolphin-emu repository:
  
Get a local copy of the dolphin-emu repository.<br/>
 
 
<code>git clone https://github.com/dolphin-emu/dolphin.git dolphin-emu</code>
 
<code>git clone https://github.com/dolphin-emu/dolphin.git dolphin-emu</code>
  
Change to the directory created.<br/>
+
Change to the directory created.
<code>cd dolphin-emu</code>
 
  
Later, to update the local copy run following command and proceed with the following steps.<br/>
+
<code>cd ./dolphin-emu</code>
<code>git pull origin</code>
+
 
 +
To update the local copy in the future, run <code>git pull origin</code> within the <code>dolphin-emu</code> directory and proceed to the following steps.
  
 
== Step 3 - Building Dolphin ==
 
== Step 3 - Building Dolphin ==
Create a build subdirectory, and change into it. <br/>
+
Create a build subdirectory, and change into it. The name ''Build'' is used in this example.
 +
 
 
<code>mkdir Build && cd Build</code>
 
<code>mkdir Build && cd Build</code>
  
Configure the build.<br/>
+
Configure the build.
 +
 
 
<code>cmake ..</code>
 
<code>cmake ..</code>
  
Optional you can change the install prefix by adding "-D CMAKE_INSTALL_PREFIX=/new/path". Note that this path does not need to be absolute. cmake will complete it to its absolute equivalent. The default prefix is "/usr". This means that the executable will be installed as "/usr/bin/dolphin-emu", the plugins will be installed into "/usr/lib/dolphin-emu", and the shared data files will be installed into "/usr/share/dolphin-emu".<br/>
+
Optionally you can change the install prefix by adding "-D CMAKE_INSTALL_PREFIX=/new/path". Note that this path does not need to be absolute. cmake will complete it to its absolute equivalent. The default prefix is "/usr". This means that the executable will be installed as "/usr/bin/dolphin-emu", the plugins will be installed into "/usr/lib/dolphin-emu", and the shared data files will be installed into "/usr/share/dolphin-emu".
<br/>
+
 
From here build and install in the standard make way.<br/>
+
From here build and install in the standard make way.
<code>make</code><br/>
+
 
<code>sudo make install</code>
+
<code>make
 +
 
 +
sudo make install</code>
 +
 
 +
Note that superuser privileges are needed for <code>make install</code>.
 +
 
 +
To have the "local" build setup from the deprecated scons build configure the build with the following command.
  
Note that superuser privileges are needed for the last command.<br/>
 
<br/>
 
To have the "local" build setup from the deprecated scons build configure the build with the following command.<br/>
 
 
<code>cmake -Dbindir=../Binary/Linux -Ddatadir=../Binary/Linux  ..</code>
 
<code>cmake -Dbindir=../Binary/Linux -Ddatadir=../Binary/Linux  ..</code>
  
 
== Step 4 - Run Dolphin! ==
 
== Step 4 - Run Dolphin! ==
Run dolphin from anywhere by typing:<br/>
+
Run Dolphin from anywhere by typing:
 +
 
 
<code>dolphin-emu</code>
 
<code>dolphin-emu</code>
  
Line 53: Line 66:
  
 
== FAQ ==
 
== FAQ ==
 +
*'''Where can I get help?'''
  
'''Where can I get help?'''<br/>
 
 
Go to the [http://forums.dolphin-emu.org/ forums]. Lots of Dolphin users use Linux, and they are very experienced with this process.
 
Go to the [http://forums.dolphin-emu.org/ forums]. Lots of Dolphin users use Linux, and they are very experienced with this process.
<br/>
 
  
'''My build failed, but I did nothing wrong!'''<br/>
+
*'''My build failed, but I did nothing wrong!'''
 +
 
 
Most of the time, any problems in the build process are due to user error. It's understandable, it is a complicated process and can be quite daunting for a first timer. But sometimes even with everything right, triple checked, and it's still not working. It's rare, but sometimes a build will just be bugged. But many of Dolphin devs are Linux users, so just wait a day or so, and it will be sorted out.
 
Most of the time, any problems in the build process are due to user error. It's understandable, it is a complicated process and can be quite daunting for a first timer. But sometimes even with everything right, triple checked, and it's still not working. It's rare, but sometimes a build will just be bugged. But many of Dolphin devs are Linux users, so just wait a day or so, and it will be sorted out.
  

Revision as of 12:26, 17 August 2014

Only binaries for Ubuntu-based distributions are available on Dolphin's download page, so users of other distros have to Dolphin from source. Dolphin is compatible with 32 and 64 bit Linux distributions. This is a guide to compiling Dolphin using the cmake build system.

If looking for help installing on Ubuntu-based distros, such as Linux Mint, Elementary OS, Zorin OS, Bodhi Linux, Deepin, Linux Lite, Pinguy OS, Kubuntu, Xubuntu, Lubuntu, Ubuntu GNOME, Edubuntu, Ubuntu Studio or Mythbuntu, see Installing Dolphin#Ubuntu.

Step 1 - Installing the Dependencies

Ubuntu

12.04 and newer

Install all necessary packages by running the following command:

sudo apt-get install cmake git g++ wx2.8-headers libwxbase2.8-dev libwxgtk2.8-dev libgtk2.0-dev libsdl1.2-dev libxrandr-dev libxext-dev libao-dev libasound2-dev libpulse-dev libbluetooth-dev libreadline-gplv2-dev libavcodec-dev libavformat-dev libswscale-dev

11.10

If you are still using such an old release, consider upgrading. Run the following to install the dependencies:

sudo apt-get install cmake git g++ wx2.8-headers libwxbase2.8-dev libwxgtk2.8-dev libgtk2.0-dev libsdl1.2-dev libxrandr-dev libxext-dev libao-dev libasound2-dev libpulse-dev libbluetooth-dev libreadline5-dev libavcodec-dev libavformat-dev libswscale-dev

Other Linux Distributions

If running a distribution without aptitude, see the build dependencies in [#Addendum A - dependencies] for a list of packages needed to install.

Step 2 - Get the Dolphin Repository

Install git if it's not already installed:

  • for apt-based distros: sudo apt-get install git
  • for rpm-based distros: sudo yum install git
  • for pacman-based distros: sudo pacman -S git

Get a local copy of the dolphin-emu repository:

git clone https://github.com/dolphin-emu/dolphin.git dolphin-emu

Change to the directory created.

cd ./dolphin-emu

To update the local copy in the future, run git pull origin within the dolphin-emu directory and proceed to the following steps.

Step 3 - Building Dolphin

Create a build subdirectory, and change into it. The name Build is used in this example.

mkdir Build && cd Build

Configure the build.

cmake ..

Optionally you can change the install prefix by adding "-D CMAKE_INSTALL_PREFIX=/new/path". Note that this path does not need to be absolute. cmake will complete it to its absolute equivalent. The default prefix is "/usr". This means that the executable will be installed as "/usr/bin/dolphin-emu", the plugins will be installed into "/usr/lib/dolphin-emu", and the shared data files will be installed into "/usr/share/dolphin-emu".

From here build and install in the standard make way.

make

sudo make install

Note that superuser privileges are needed for make install.

To have the "local" build setup from the deprecated scons build configure the build with the following command.

cmake -Dbindir=../Binary/Linux -Ddatadir=../Binary/Linux ..

Step 4 - Run Dolphin!

Run Dolphin from anywhere by typing:

dolphin-emu

If the prefix changed and $prefix/bin is not in the path, then precede this with the path to the executable.

FAQ

  • Where can I get help?

Go to the forums. Lots of Dolphin users use Linux, and they are very experienced with this process.

  • My build failed, but I did nothing wrong!

Most of the time, any problems in the build process are due to user error. It's understandable, it is a complicated process and can be quite daunting for a first timer. But sometimes even with everything right, triple checked, and it's still not working. It's rare, but sometimes a build will just be bugged. But many of Dolphin devs are Linux users, so just wait a day or so, and it will be sorted out.

Addendum A - dependencies

This addendum lists the dependencies to build Dolphin.

  • Build Dependencies
  • git
  • cmake
  • g++
  • wx2.9-headers (wx3.0-headers work too, and are perhaps preferred!)
  • libwxbase2.8-dev
  • libwxgtk2.8-dev
  • libgtk2.0-dev
  • libbluetooth-dev (optional, for real wiimotes)
  • libxrandr-dev (optional, for switching desktop resolution in fullscreen mode)
  • libxext-dev
  • libreadline-dev
  • libasound-dev (optional, for alsa sound backend)
  • libpulse-dev (optional, for pulseaudio sound backend)
  • libao-dev (optional, for ao sound backend)
  • libopenal-dev (optional, for openal sound backend)
  • libavcodec-dev (optional, for dumping frames in AVI format)
  • libavformat-dev (optional, for dumping frames in AVI format)
  • libswscale-dev (optional, for dumping frames in AVI format)
  • liblzo2-dev (optional, if not found will be built statically)
  • libsdl1.2-dev (optional, if not found will be built statically)
  • libsoil-dev (optional, if not found will be built statically)
  • libsfml-dev (optional, if not found will be built statically)