Update guide

Andreas 2016-05-22 15:33:54 +02:00
parent 08d0b84fa5
commit de2b8786a8
1 changed files with 23 additions and 33 deletions

@ -1,10 +1,10 @@
This is a tutorial on how to build Clementine on the Raspberry Pi. I used revision B with 512 MB ram and the Raspian OS.
This is a tutorial on how to build Clementine on the Raspberry Pi. I used a Raspberry Pi 3 and the Raspian OS.
Note: Building Clementine on the Pi takes a lot of time, around 8 hours.
## What you need
* A [Raspberry Pi](http://www.raspberrypi.org/) obviously
* A [Raspberry Pi](http://www.raspberrypi.org/) obviously (Pi 2 or 3 recommended)
* At least a 8GB flash card (16GB recommended)
* [Raspbian](http://www.raspbian.org/). Other distros might work as well.
@ -14,36 +14,22 @@ The same as on any linux distro:
sudo apt-get install liblastfm-dev libtag1-dev gettext libboost-dev \
libboost-serialization-dev libqt4-dev qt4-dev-tools libqt4-opengl-dev \
cmake libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev \
cmake libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
libglew1.5-dev libqjson-dev libgpod-dev libplist-dev \
libusbmuxd-dev libmtp-dev libcdio-dev \
protobuf-compiler libprotobuf-dev libqca2-dev libqca2-plugin-ossl \
libfftw3-dev libsparsehash-dev libsqlite3-dev
user comments: this dependancy is not sufficent, loads of gstreamer missing, the follow commands fixed it for me
sudo add-apt-repository ppa:gstreamer-developers/ppa
sudo apt-get update
sudo apt-get install liblastfm-dev libtag1-dev gettext libboost-dev \
libboost-serialization-dev libqt4-dev qt4-dev-tools libqt4-opengl-dev \
cmake libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
libglew1.5-dev libqjson-dev libgpod-dev libplist-dev \
libusbmuxd-dev libmtp-dev libcdio-dev \
protobuf-compiler libprotobuf-dev libqca2-dev libqca2-plugin-ossl \
libfftw3-dev libsparsehash-dev libsqlite3-dev libpulse-dev \
libqtwebkit-dev
protobuf-compiler libprotobuf-dev libcrypto++-dev \
libfftw3-dev libsparsehash-dev libsqlite3-dev libpulse-dev \
libqtwebkit-dev libechonest-dev libchromaprint-dev libqca2-dev
## Get the source
We will compile the stable 1.2.2 release. If you want to compile the master branch, don't execute `git checkout release-1.2`. I haven't tested it, so it might not work! `mkdir bin` is not necessary if you compile the master branch.
We will compile the stable 1.3.1 release. If you want to compile the master branch, don't execute `git checkout release-1.3`. I haven't tested it, so it might not work! `mkdir bin` is not necessary if you compile the master branch.
git clone https://github.com/clementine-player/Clementine.git && cd Clementine
git checkout release-1.2
mkdir bin
git checkout release-1.3
cd bin
## Preparing the build enviroment
Since the Raspberry Pi has only a limited amount of ram, we need to create a swap file. Without it, compiling fails when building the translations.
If you still use an old Raspberry Pi 1 with 512MB ram, you have to enable swap to compile Clementine:
sudo dd if=/dev/zero of=swapfile bs=1M count=512
sudo mkswap swapfile
@ -51,9 +37,7 @@ Since the Raspberry Pi has only a limited amount of ram, we need to create a swa
## Compile
cmake ..
make -j2
Wait. A (very long) time.
make -j4
## After compiling
A swap file on a flash memory is not healty, so we remove the created swap file after compiling.
@ -62,21 +46,27 @@ A swap file on a flash memory is not healty, so we remove the created swap file
sudo rm swapfile
## Install Clementine runtime dependencies
Raspbian doesn't have gstreamer plugins installed by default, so we have to do this now.
Raspbian doesn't have all necessary dependencies installed by default, so we have to do this now.
sudo apt-get install gstreamer0.10-alsa gstreamer0.10-tools gstreamer0.10-ffmpeg \
gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-fluendo-mp3
sudo apt-get install libcrypto++ libechonest2.1 libgpod4 liblastfm1 libprotobuf9 libqjson0 libqt4-opengl libqt4-sql gstreamer1.0-plugins-ugly gstreamer1.0-pulseaudio
## Setting up Clementine
Start Clementine with `./clementine`. The first start takes quite long as Clementine has to setup the database. After you see the main window, you should disable moodbar generation and glowing. They take too many resources you need for playback.
For me setting the output plugin to `Audio sink (ALSA)` and output device to `hw:0,0` gave pretty good audio results. I don't recommend using pulseaudio.
Now you can add your music to your library and listen to it!
Note: Clementine is quite slow on the Raspberry Pi, so be patient when using it. Clementine Remote works very well on the Raspberry Pi.
## Credits
http://sentryytech.blogspot.de/2012/10/compiling-retroshare-for-raspberry-pi.html for swap file
## Spotify
Download and libspotify 12.1.103 beta from [here](https://developer.spotify.com/technologies/libspotify/)
http://blog.scphillips.com/2013/01/using-a-raspberry-pi-with-android-phones-for-media-streaming/ for gstreamer tips
wget https://developer.spotify.com/download/libspotify/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release.tar.gz
tar -xf libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release.tar.gz
cd libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/
sudo make install
Download the `clementine-spotifyblob` compiled for `armhf` from [here](https://drive.google.com/open?id=0BxtNs9Rdrjl3Sy02YlVGV0dyYVk) and paste it to `.config/Clementine/spotifyblob/version16-32bit/blob` (`blob` is the filename`)
mkdir -p .config/Clementine/spotifyblob/version16-32bit/
cp clementine-spotifyblob-armhf .config/Clementine/spotifyblob/version16-32bit/blob