Add the linux build instructions

Lioncash 2014-06-19 15:09:08 -07:00
parent 3b4f538f65
commit dbdf185cce

108
Building-for-Linux.md Normal file

@ -0,0 +1,108 @@
# Linux Build
## Introduction
---
Dolphin runs on 64-bit Linux distributions. These instructions explain how to build Dolphin on Linux using the cmake build system.
## Step 1 Install the Correct Dependencies
---
**Ubuntu 12.04 and newer**
`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`
**Ubuntu 11.04**
`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 versions**
See the [build dependencies](#build-dependencies) below for a list of packages you will need to install.
## Step 2 Get the Dolphin Repository
---
Get a local copy of the dolphin-emu repository:
```bash
git clone https://github.com/dolphin-emu/dolphin.git dolphin-emu
```
Change to the directory created:
```bash
cd dolphin-emu
```
Later, if you wish to update your local copy:
```bash
git pull origin master
```
## Step 3 Building Dolphin
---
Create a build subdirectory, and change into it:
```bash
mkdir Build && cd Build
```
Configure the build:
```bash
cmake ..
```
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`.
From here build and install in the standard make way:
```bash
make && make install
```
Note that you may need superuser privileges for the last command.
## Step 4 Run Dolphin!
---
You can run dolphin from anywhere by typing:
`dolphin-emu`
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
---
**Where can I get help?**
Go to the [forums](http://forums.dolphin-emu.org/). 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.
## 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)