Dolphin, the GameCube and Wii emulator - Forums

Full Version: Dolphin installation script for Ubuntu/Debian based distributions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all! I wrote a simple Bash script to install the latest development version of Dolphin on Ubuntu. I wrote it as a simple script for myself as I was running 15.10 at the time and couldn't install Dolphin via the Downloads page. It became increasingly annoying for me to keep pasting the commands from the wiki into the Terminal to upgrade to each new Development version to I wrote a script to do it for me. I figured that I should share it here in case anyone else wanted to use it. Maybe someone out there will find it useful. Just paste it into a text editor of your choice and save it as whatever you want. Have a great day! Smile

Code:
#!/bin/bash

ver="0.1"
dev="Eamonn Rea"
sysinfo=$(lsb_release -sd)

echo "Dolphin Linux Installer"
echo "Version" $ver
echo "System Information:" $sysinfo

# Installs any packages that may be needed for Dolphin to run
printf "\nCheck for and install any missing packages? [Y/n] "
read check

if [ "${check,,}" == "y" ]
then
  sudo apt-get install cmake pkg-config git g++ libao-dev libasound2-dev libavcodec-dev libavformat-dev libbluetooth-dev libenet-dev libgtk2.0-dev liblzo2-dev libminiupnpc-dev libopenal-dev libpolarssl-dev libpulse-dev libreadline-dev libsfml-dev libsoil-dev libsoundtouch-dev libswscale-dev libusb-1.0-0-dev libwxbase3.0-dev libwxgtk3.0-dev libxext-dev libxrandr-dev portaudio19-dev zlib1g-dev libudev-dev libevdev-dev
  sudo apt-get install git
fi

# Assumes name of install is "dolphin-emu", since that's the name of the cloned repository
if [ -d dolphin-emu ]
then
  # Updates the currently existing Dolphin installation
  cd dolphin-emu
  git pull origin
else
  git clone https://github.com/dolphin-emu/dolphin.git dolphin-emu
fi

cd dolphin-emu && mkdir Build
cd Build && sudo cmake ..
sudo make && sudo make install

echo "Dolphin installed successfully! Run Dolphin? [Y/n] "
read run

if [ "${run,,}" == "y" ]
then
  dolphin-emu
else
  echo "Exiting program..."
fi
This should work for 16.04 users with one small tweak. replace libpolarssl-dev with... I think it's now libmbed... something.

Do apt-cache polarssl to find it's replacement.
Why don't you just use the PPA?

https://launchpad.net/~dolphin-emu/+archive/ubuntu/ppa

The dolphin-emu-master package is updated almost weekly.
One reason against using the PPA is that by tying it to your distro's update system, a full system update will update dolphin and invalidate your shader cache, causing stuttering all over again. And it's a pain to hold back individual packages and not something Not-An-Experinced Linux user would know how to do.
This is slightly off-topic, but is there a reason for invalidating the shader cache even when there haven't been any changes to shader-related code?
(05-16-2016, 07:13 PM)leolam Wrote: [ -> ]This is slightly off-topic, but is there a reason for invalidating the shader cache even when there haven't been any changes to shader-related code?

If we have a shader cache version number that developers need to change manually when they change anything in the shader code, it's easy for developers to forget to do it and accidentally cause bad shader cache problems. I'm not sure if there's any good middle ground between that and what we're doing now.
excellent work. Let me ask.. what is the current version of Dolphin for Ubuntu 14.04?
(05-16-2016, 08:26 PM)JosJuice Wrote: [ -> ]If we have a shader cache version number that developers need to change manually when they change anything in the shader code, it's easy for developers to forget to do it and accidentally cause bad shader cache problems. I'm not sure if there's any good middle ground between that and what we're doing now.

Maybe only invalidate when the shader code changed? git log -n 1 --format='%H' -- Source/Core/VideoCommon/ Source/Core/VideoBackends/ gives the last commit which changed video code; perhaps that revision hash could be used instead of the "global" git hash.
(05-16-2016, 08:29 PM)Bluerose5 Wrote: [ -> ]excellent work. Let me ask.. what is the current version of Dolphin for Ubuntu 14.04?

In the official repos, it's 4.0.2. Probably not what you will want.

In the PPA, Dolphin is updated once a week, so it's fairly up-to-date with master. But not recommended since updating your OS will update Dolphin (unless you hold the package) and invalidate the shader cache, as said above.