2013-12-10 15:50:11 +01:00
# Install the required tools and dependencies
sudo apt-get update
2016-06-20 17:24:23 +02:00
sudo apt-get install git cmake build-essential qtbase5-dev libusb-1.0-0-dev python-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev
2013-12-10 15:50:11 +01:00
2015-11-15 10:32:33 +01:00
# RPI ONLY: when you build on the rapberry pi and include the dispmanx grabber (which is the default)
2013-12-10 15:50:11 +01:00
# you also need the firmware including headers installed. This downloads the firmware from the raspberrypi github
# and copies the required files to the correct place. The firmware directory can be deleted afterwards if desired.
export FIRMWARE_DIR="raspberrypi-firmware"
2015-11-15 10:32:33 +01:00
git clone --depth 1 https://github.com/raspberrypi/firmware.git "$FIRMWARE_DIR"
sudo cp -R "$FIRMWARE_DIR/hardfp/opt/" /opt
2013-12-10 15:50:11 +01:00
# create hyperion directory and checkout the code from github
2015-11-15 10:32:33 +01:00
# You might want to add "--depth 1" if you only want to recompile the current source or dont want to use git any further
2013-12-10 15:50:11 +01:00
export HYPERION_DIR="hyperion"
2016-06-20 17:32:56 +02:00
git clone --recursive https://github.com/hyperion-project/hyperion.ng.git "$HYPERION_DIR"
2013-12-10 15:50:11 +01:00
2016-03-10 22:25:04 +01:00
# if you forget the --recursive in above statement or you are updating an existing clone you need
2015-01-16 09:10:23 +01:00
# to clone the protobuf submodule by runnning the follwing two statements:
git submodule init
git submodule update
2013-12-10 15:50:11 +01:00
# create and enter the build directory
mkdir "$HYPERION_DIR/build"
cd "$HYPERION_DIR/build"
2016-03-13 13:55:56 +01:00
# run cmake to generate make files on the raspberry pi WITHOUT PWM SUPPORT
2016-06-20 19:48:23 +02:00
cmake -DPLATFORM=rpi -DCMAKE_BUILD_TYPE=Release ..
2016-03-13 13:55:56 +01:00
# run cmake to generate make files on the raspberry pi WITH PWM SUPPORT
2016-06-20 19:48:23 +02:00
cmake -DPLATFORM=rpi-pwm -DCMAKE_BUILD_TYPE=Release ..
# or if you want to compile on x86x64
cmake -DPLATFORM=x86 -DCMAKE_BUILD_TYPE=Release ..
2016-04-28 14:46:53 +02:00
# on amlogic platforms
2016-06-20 19:48:23 +02:00
cmake -DPLATFORM=aml -DCMAKE_BUILD_TYPE=Release ..
2015-01-18 00:04:45 +01:00
# as an alternative for the dispmanx grabber on non-rpi devices (e.g. cubox-i) you could try the framebuffer grabber
2016-06-20 19:48:23 +02:00
cmake -DENABLE_FB=ON -DCMAKE_BUILD_TYPE=Release ..
2016-06-20 17:38:05 +02:00
# ToDo: QT5 libs!! for OSX build you need XCode, qt4 libraries and cmake (maybe libusb too). You can use macport or homebrew(recommended) to install them:
2016-03-10 22:25:04 +01:00
#for port:
2015-01-24 23:42:22 +01:00
sudo port install qt4-mac
sudo port install cmake
2016-03-10 22:25:04 +01:00
#sudo port install libusb
#for brew:
sudo brew install qt4-mac
sudo brew install cmake
#sudo brew install libusb
2016-06-20 17:38:05 +02:00
cmake -DENABLE_V4L2=OFF -DENABLE_OSX=ON ..
2013-12-10 15:50:11 +01:00
# run make to build Hyperion
make
2016-02-27 18:06:04 +01:00
# or if you have a system with more then 1 cpu core
make -j 4
2016-03-13 13:55:56 +01:00
# "4" is the number of cpu cores (e.g. 4 on RPi2 and RPi3), this makes compile faster
2016-02-27 18:06:04 +01:00
#after compile, to remove any stuff not needed for a release version.
strip bin/*
2013-12-11 11:11:41 +01:00
# The binaries are build in "$HYPERION_DIR/build/bin". You could copy those to /usr/bin
sudo cp ./bin/hyperion-remote /usr/bin/
sudo cp ./bin/hyperiond /usr/bin/
2015-11-15 11:14:44 +01:00
# Copy the effect folder (if you did not use the normal installation methode before)
2016-06-20 19:48:23 +02:00
sudo mkdir -p /usr/share/hyperion/effects && sudo cp -R ../effects/ /usr/share/hyperion/