Building Dolphin on Linux: Difference between revisions

From Dolphin Emulator Wiki
Jump to navigation Jump to search
m (Protected "Building Dolphin on Linux": High traffic page: Page currently linked in the guides section from the main website. If you want to add new content, please to that directly on the corresponding GitHub page ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(143 intermediate revisions by 56 users not shown)
Line 1: Line 1:
=Compile and build Dolphin on Linux=
This page has been moved to GitHub. '''[https://github.com/dolphin-emu/dolphin/wiki/Building-for-Linux Click here to be redirected]'''.
Dolphin is compatible with both 32 and 64 bit Linux distributions. Following instructions explain how to build dolphin on Linux using the cmake build system.
 
(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 - install the correct dependencies ==
 
'''Ubuntu 12.04'''<br/>
<code>sudo apt-get install cmake git g++ wx2.8-headers libwxbase2.8-dev libwxgtk2.8-dev libgtk2.0-dev libsdl1.2-dev nvidia-cg-toolkit libxrandr-dev libxext-dev libglew1.5-dev libao-dev libasound2-dev libpulse-dev libbluetooth-dev libreadline-gplv2-dev libavcodec-dev libavformat-dev libswscale-dev</code>
 
'''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 nvidia-cg-toolkit libxrandr-dev libxext-dev libglew1.5-dev libao-dev libasound2-dev libpulse-dev libbluetooth-dev libreadline5-dev libavcodec-dev libavformat-dev libswscale-dev</code>
 
'''Other Linux version?'''<br/>
If you run a distribution without aptitude, see the build dependencies in addendum A for a list of packages you'll need to install.
 
==Step 2 - Get the Dolphin repository==
Install git if you don't have this already.<br/>
<code>sudo apt-get install git</code>
 
Get a local copy of the dolphin-emu repository.<br/>
<code>git clone https://code.google.com/p/dolphin-emu/ dolphin-emu</code>
 
Change to the directory created.<br/>
<code>cd dolphin-emu</code>
 
Later, if you wish to update your local copy you run following command and proceed with the following steps.<br/>
<code>git pull origin</code>
 
==Step 3 - Building Dolphin==
Create a build subdirectory, and change into it. <br/>
<code>mkdir Build && cd Build</code>
 
Configure the build.<br/>
<code>cmake ..</code>
 
You may also want to 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/>
<br/>
From here build and install in the standard make way.<br/>
<code>make && make install</code>
 
Note that you may need superuser privileges for the last command.<br/>
<br/>
If you must insist on having the "local" build setup from the deprecated scons build you can configure the build with the following command.<br/>
<code>cmake -Dbindir=../Binary/Linux -Ddatadir=../Binary/Linux ..</code>
 
==Step 4 - Run Dolphin!==
You can run dolphin from anywhere by typing:<br/>
<code>dolphin-emu</code>
 
If you changed the prefix and $prefix/bin is not in your path, then you will have to precede this with the path to the executable.
 
==FAQ==
'''Is there a forum to find answers or ask questions?'''<br>
you can go to the official forum [http://forums.dolphin-emulator.com/]. But try to find anwers there before asking anything.
<br>
'''My build failt, what did I do wrong?'''
You pulled the latest build from the repository which sometimes contain errors. Just take a new build tomorrow or the day after when its fixed. If this does not help report your problem on the forum.
 
==Addendum A - dependencies==
This addendum lists the dependencies to build Dolphin.
 
* Build Dependencies
* git
* cmake
* g++
* wx2.8-headers
* libwxbase2.8-dev
* libwxgtk2.8-dev
* libgtk2.0-dev
* nvidia-cg-toolkit
* 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)
* libglew1.5-dev (optional, if not found will be built statically)
* 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)

Latest revision as of 05:07, 5 January 2024

This page has been moved to GitHub. Click here to be redirected.