Updated compile instructions for Mac OS (#286)

* Updated CompileHowto to not use X11 on a Mac, also added a way to get the available number of cpu cores for make

* bin path adjusted for Mac OS

* changed cmake command

I’ve changed the cmake command according to RedPanther’s suggestion.
This makes disabling of V4L and X11 not necessary anymore.

* Reverted changes to include flags for Mac OS compilation, changed folder to make install folder for effects

* Forgot effects folder in copy command

* Update to the CompileHowto to reflect changes in upstream
This commit is contained in:
Markus Rudel 2016-11-21 23:06:10 +01:00 committed by redPanther
parent 98cb922c74
commit 9360183f2e

View File

@ -78,7 +78,7 @@ brew install doxygen
After which you can run cmake with the correct qt5 path: 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.7.0 .. cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.7.0 ..
``` ```
# Run make to build Hyperion # Run make to build Hyperion
@ -87,6 +87,13 @@ The `-j $(nproc)` specifies the amount of CPU cores to use.
make -j $(nproc) make -j $(nproc)
``` ```
On a mac you can use ``sysctl -n hw.ncpu`` to get the number of available CPU cores to use.
```bash
make -j $(sysctl -n hw.ncpu)
```
#After compile, to remove any stuff not needed for a release version. #After compile, to remove any stuff not needed for a release version.
``` ```
strip bin/* strip bin/*
@ -97,7 +104,26 @@ sudo cp ./bin/hyperion-remote /usr/bin/
sudo cp ./bin/hyperiond /usr/bin/ sudo cp ./bin/hyperiond /usr/bin/
``` ```
On a Mac with Sierra you won't be able to copy these files to the ``/usr/bin/`` folder due to Sierra's file protection. You can copy those files to ``/usr/local/bin`` instead.
```bash
cp ./bin/hyperion-remote /usr/local/bin
cp ./bin/hyperiond /usr/local/bin
```
The better way to do this is to use the make install script, which copies all necessary files to ``/usr/local/share/hyperion``:
```bash
sudo make install
```
You can combine the install command with the strip command to install and cleanup in one task:
```bash
sudo make install/strip
```
# Copy the effect folder (if you did not use the normal installation methode before) # 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/ sudo mkdir -p /usr/local/share/hyperion/effects && sudo cp -R ../effects/ /usr/local/share/hyperion/effects/
``` ```