Compilation guide on Raspberry Raspbian Jessie

Rémy Mathieu edited this page Dec 3, 2016 · 17 revisions

It is possible to run mehstation on a Raspberry, you will need to manually compile it. You'll need to compile some libraries such as SDL2, SDL2_image and SDL2_ttf but everything is explained in this page.

Target

This guide has been redacted using Raspbian Jessie on Raspberry Pi 2 but mehstation is known to be working on the Raspberry Pi 1 type B.

Basics

We'll free some disk space by removing useless packages:

sudo apt-get remove wolfram-engine libreoffice-core pypy-upstream pypy-upstream-doc oracle-java8-jdk nodejs nodejs-legacy

Some basics packages are needed to compile everything:

sudo apt-get install git cmake build-essential libfreeimage-dev libopenal-dev libpango1.0-dev libsndfile-dev libudev-dev libasound2-dev libjpeg-dev libtiff5-dev libwebp-dev automake cmake libsqlite3-dev libavutil-dev libavcodec-dev libavformat-dev

If you don't want to manually compile the following SDL2 dependencies you can use the packages available from the Raspbian Jessie Repositories (you should only have to compile SDL2 packages manually on raspbian Wheezy)

sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev

SDL2

Download the latest release of SDL2 and open it. As the time of writing:

wget https://www.libsdl.org/release/SDL2-2.0.3.tar.gz
tar xf SDL2-2.0.3.tar.gz
cd SDL2-2.0.3

We will configure the build to ensure the use of the OpenGL ES backend. This way, we can start mehstation with or without having an X11 instance running.

./configure --prefix=/usr/local --host=armv7l-raspberry-linux-gnueabihf --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland --disable-video-x11 --disable-video-opengl
make
sudo make install

SDL2_image

Download and compile the latest version from https://www.libsdl.org/projects/SDL_image/.

wget https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.0.tar.gz
tar xf SDL2_image-2.0.0.tar.gz
cd SDL2_image-2.0.0
./configure --prefix=/usr/local
make
sudo make install

SDL2_ttf

Download and compile the latest version from https://www.libsdl.org/projects/SDL_ttf/.

wget https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.12.tar.gz
tar xf SDL2_ttf-2.0.12.tar.gz
cd SDL2_ttf-2.0.12
./configure --prefix=/usr/local
make
sudo make install

mehstation

The system is now ready to compile mehstation from its git repository:

git clone https://github.com/remeh/mehstation
cd mehstation
cmake .
make
sudo make install

The binary mehstation will now be ready to start using this syntax:

LD_LIBRARY_PATH=/usr/local/lib mehstation

mehstation-config

The configuration tool can also be compiled to run on the Raspberry Pi.

First, install some packages:

sudo apt-get install qt5-qmake qtbase5-dev

Then, we'll download the latest sources of mehstation-config and compile them:

git clone https://github.com/remeh/mehstation-config
cd mehstation-config
/usr/lib/arm-linux-gnueabihf/qt5/bin/qmake
make

The app can now be started by typing: ./mehstation-config

mehtadata

mehtadata is a console-line app developed for mehstation-config which deals with scraping all the games information, description and so on. If you don't need to scrape games resources, it's not mandatory to do this chapter but the "Scraping" feature won't be usable in mehstation-config.

First, we need to setup Go:

sudo apt-get install golang-go

Then, gets the mehtadata sources and compile it:

mkdir gopath
export GOPATH=$(pwd)/gopath
go get github.com/remeh/mehtadata
cp gopath/bin/mehtadata .

It creates a binary called mehtadata which must be copied in the same directory as mehstation-config.

Sources

This guide has been redacted with help from:

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.