This repository has been archived by the owner on May 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 233
/
CompileHowto.txt
71 lines (59 loc) · 3.34 KB
/
CompileHowto.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Install the required tools and dependencies
sudo apt-get update
sudo apt-get install git cmake build-essential libqt4-dev libusb-1.0-0-dev python-dev libxrender-dev python
# OSMC dependencies
sudo apt-get install rbp-userland-dev-osmc
# Arch/ALARM dependencies
sudo pacman -S --needed git cmake base-devel qt4 libusb libxrender icu
# RPI ONLY: when you build on the raspberry pi and include the dispmanx grabber (which is the default)
# 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"
git clone --depth 1 https://github.com/raspberrypi/firmware.git "$FIRMWARE_DIR"
sudo cp -R "$FIRMWARE_DIR/hardfp/opt/" /opt
# OpenCV HDMI grabber dependencies (must be version 2.x) (check with: pkg-config --modversion opencv)
sudo apt-get install libopencv*
# create hyperion directory and checkout the code from github
# You might want to add "--depth 1" if you only want to recompile the current source or don't want to use git any further
export HYPERION_DIR="hyperion"
git clone --recursive https://github.com/tvdzwan/hyperion.git "$HYPERION_DIR"
# if you forget the --recursive in above statement or you are updating an existing clone you need
# to clone the protobuf submodule by running the following two statements:
git submodule init
git submodule update
# create and enter the build directory
mkdir "$HYPERION_DIR/build"
cd "$HYPERION_DIR/build"
# run cmake to generate make files on the raspberry pi WITHOUT PWM SUPPORT
cmake -DCMAKE_BUILD_TYPE=Release -DPLATFORM="rpi" -Wno-dev ..
# run cmake to generate make files on the raspberry pi WITH PWM SUPPORT
cmake -DCMAKE_BUILD_TYPE=Release -DPLATFORM="rpi-pwm" -Wno-dev ..
# or if you are not compiling on the raspberry pi (e.g. OrangePi) and need to disable the Dispmanx grabber and support for spi devices
cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF -DENABLE_X11=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
# to enable the HDMI OpenCV grabber append cmake parameter
ENABLE_OPENCV=ON
# on amlogic platforms
cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF -DENABLE_AMLOGIC=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
# as an alternative for the dispmanx grabber on non-rpi devices (e.g. cubox-i) you could try the framebuffer grabber
cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF -DENABLE_FB=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
# for OSX build you need XCode, qt4 libraries and cmake (maybe libusb too). You can use macport or homebrew(recommended) to install them:
#for port:
sudo port install qt4-mac
sudo port install cmake
#sudo port install libusb
#for brew:
sudo brew tap cartr/qt4
sudo brew tap-pin cartr/qt4
sudo brew install qt@4
sudo brew install cmake
#sudo brew install libusb
cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF -DENABLE_V4L2=OFF -DENABLE_OSX=ON ..
# run make to build Hyperion
make -j $(nproc)
#after compile, to remove any stuff not needed for a release version.
strip bin/*
# The binaries are built 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/
# Copy the effect folder (if you did not use the normal installation method before)
sudo mkdir -p /opt/hyperion/effects && sudo cp -R ../effects/ /opt/hyperion/