mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Update and rename CompileHowto.txt to CompileHowto.md (#149)
* Update and rename CompileHowto.txt to CompileHowto.md * Update CompileHowto.md * Update CompileHowto.md
This commit is contained in:
parent
bfb06966de
commit
356aa86b49
103
CompileHowto.md
Normal file
103
CompileHowto.md
Normal file
@ -0,0 +1,103 @@
|
||||
# Install the required tools and dependencies
|
||||
|
||||
```
|
||||
sudo apt-get update
|
||||
sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev
|
||||
```
|
||||
|
||||
# RPI Only
|
||||
when you build on the rapberry 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
|
||||
```
|
||||
|
||||
# Create hyperion directory and checkout the code from github
|
||||
|
||||
You might want to add `--depth 1` to the `git` command if you only want to compile the current source and have no need for the entire git repository
|
||||
|
||||
```
|
||||
export HYPERION_DIR="hyperion"
|
||||
git clone --recursive https://github.com/hyperion-project/hyperion.ng.git "$HYPERION_DIR"
|
||||
```
|
||||
|
||||
**Note:** If you forget the --recursive in above statement or you are updating an existing clone you need to clone the protobuf submodule by runnning the follwing two statements:
|
||||
```
|
||||
git submodule init
|
||||
git submodule update
|
||||
```
|
||||
|
||||
# Create and enter the build directory
|
||||
```
|
||||
mkdir "$HYPERION_DIR/build"
|
||||
cd "$HYPERION_DIR/build"
|
||||
```
|
||||
|
||||
# Generate the make files:
|
||||
|
||||
To generate make files on the raspberry pi WITHOUT PWM SUPPORT:
|
||||
```
|
||||
cmake -DPLATFORM=rpi -DCMAKE_BUILD_TYPE=Release ..
|
||||
```
|
||||
|
||||
To generate make files on the raspberry pi WITH PWM SUPPORT:
|
||||
```
|
||||
cmake -DPLATFORM=rpi-pwm -DCMAKE_BUILD_TYPE=Release ..
|
||||
```
|
||||
|
||||
To generate make files on a regular x86 or amd64 system:
|
||||
```
|
||||
cmake -DPLATFORM=x86 -DCMAKE_BUILD_TYPE=Release ..
|
||||
```
|
||||
|
||||
To generate make files on a amlogic system:
|
||||
```
|
||||
cmake -DPLATFORM=aml -DCMAKE_BUILD_TYPE=Release ..
|
||||
```
|
||||
|
||||
To use framebuffer instead of dispmanx (for example on the *cubox-i*):
|
||||
```
|
||||
cmake -DENABLE_FB=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
```
|
||||
|
||||
To generate make files on OS X:
|
||||
|
||||
To install on OS X you either need Homebrew or Macport but Homebrew is the recommended way to install the packages. To use Homebrew XCode is required as well, use `brew doctor` to check your install.
|
||||
|
||||
First you need to install the dependencies:
|
||||
```
|
||||
brew install qt5
|
||||
brew install cmake
|
||||
brew install libusb
|
||||
brew install doxygen
|
||||
```
|
||||
|
||||
After which you can run cmake with the correct qt5 path:
|
||||
```
|
||||
cmake -DENABLE_V4L2=OFF -DENABLE_OSX=ON -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.6.1-1 ..
|
||||
```
|
||||
|
||||
# Run make to build Hyperion
|
||||
The `-j $(nproc)` specifies the amount of CPU cores to use.
|
||||
```
|
||||
make -j $(nproc)
|
||||
```
|
||||
|
||||
#After compile, to remove any stuff not needed for a release version.
|
||||
```
|
||||
strip bin/*
|
||||
```
|
||||
# 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/
|
||||
```
|
||||
|
||||
# Copy the effect folder (if you did not use the normal installation methode before)
|
||||
```
|
||||
sudo mkdir -p /usr/share/hyperion/effects && sudo cp -R ../effects/ /usr/share/hyperion/
|
||||
```
|
@ -1,58 +0,0 @@
|
||||
# Install the required tools and dependencies
|
||||
sudo apt-get update
|
||||
sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev
|
||||
|
||||
# RPI ONLY: when you build on the rapberry 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
|
||||
|
||||
# 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 dont want to use git any further
|
||||
export HYPERION_DIR="hyperion"
|
||||
git clone --recursive https://github.com/hyperion-project/hyperion.ng.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 runnning the follwing 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 -DPLATFORM=rpi -DCMAKE_BUILD_TYPE=Release ..
|
||||
# run cmake to generate make files on the raspberry pi WITH PWM SUPPORT
|
||||
cmake -DPLATFORM=rpi-pwm -DCMAKE_BUILD_TYPE=Release ..
|
||||
# or if you want to compile on x86x64
|
||||
cmake -DPLATFORM=x86 -DCMAKE_BUILD_TYPE=Release ..
|
||||
# on amlogic platforms
|
||||
cmake -DPLATFORM=aml -DCMAKE_BUILD_TYPE=Release ..
|
||||
# as an alternative for the dispmanx grabber on non-rpi devices (e.g. cubox-i) you could try the framebuffer grabber
|
||||
cmake -DENABLE_FB=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
# 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:
|
||||
#for port:
|
||||
sudo port install qt4-mac
|
||||
sudo port install cmake
|
||||
#sudo port install libusb
|
||||
#for brew:
|
||||
sudo brew install qt4-mac
|
||||
sudo brew install cmake
|
||||
#sudo brew install libusb
|
||||
cmake -DENABLE_V4L2=OFF -DENABLE_OSX=ON ..
|
||||
|
||||
# run make to build Hyperion (all available cpu cores are used)
|
||||
make -j $(nproc)
|
||||
|
||||
#after compile, to remove any stuff not needed for a release version.
|
||||
strip bin/*
|
||||
|
||||
# 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/
|
||||
|
||||
# Copy the effect folder (if you did not use the normal installation methode before)
|
||||
sudo mkdir -p /usr/share/hyperion/effects && sudo cp -R ../effects/ /usr/share/hyperion/
|
Loading…
Reference in New Issue
Block a user