From 0940872870a98484669157d383134402b1be1bd4 Mon Sep 17 00:00:00 2001 From: redPanther Date: Tue, 24 May 2016 19:56:43 +0200 Subject: [PATCH] create debian packages / multiple configs (#650) * implement make install set CMAKE_INSTALL_PREFIX e.g. to /opt to install to /opt/hyperion set ENABLE_SYSTEM_INSTALL to ON to activate installation after compiling use make install or make install/strip (for performance/size optimized binaries - compile in Release to get best performance) * cleanup cmake files use cmake -DINSTALL_PREFIX=/opt/hyperion .. to install all files to hyperion or cmake -DINSTALL_PREFIX=/usr/ to install to usr. install folders are linux standard. bin go to bin folder and additionals (effects) go to share/hyperion * add uninstall target - be patient with that, this will remove files from your system install service files to share/hyperion - if you want to use them you have to make a symlink to your location of service files * optimize build release script install service files into hyperion share folder (services not activated, this must be done by distribution package script) initial support of cmake option -DPLATFORM= option. This selects platform specific cmake flags. no need for -DENABLE_... options (unless you want some special things) automatic detect for apple build * update submodule * fix cmake error when no platform is given * initial support for deb,rpm and tgz packages - no usefull content atm! * make packeages contain usefull stuff * add license make packes more functional. package specific install missing yet * implement debian postinstall * disable rpm generation until it has a working state * add hypercon compat * add posibility for multiple config files. first one found is taken Former-commit-id: 1c2669961da98fd05a97359e75f1d6d68e126715 --- CMakeLists.txt | 19 +++--- LICENSE | 21 +++++++ bin/create_all_releases.sh | 17 +++--- bin/service/hyperion.init.sh | 2 +- bin/service/hyperion.initctl.sh | 2 +- bin/service/hyperion.systemd.sh | 2 +- .../Toolchain-imx6.cmake | 0 .../Toolchain-rpi.cmake | 0 .../Toolchain-x32.cmake | 0 cmake/debian/postinst | 60 +++++++++++++++++++ cmake/packages.cmake | 35 ++++++++++- cmake/rpm/postinst | 57 ++++++++++++++++++ config/hyperion_x86.config.json | 2 +- src/hyperion-aml/CMakeLists.txt | 5 +- src/hyperion-dispmanx/CMakeLists.txt | 6 +- src/hyperion-framebuffer/CMakeLists.txt | 5 +- src/hyperion-osx/CMakeLists.txt | 2 +- src/hyperion-remote/CMakeLists.txt | 5 +- src/hyperion-v4l2/CMakeLists.txt | 5 +- src/hyperion-x11/CMakeLists.txt | 5 +- src/hyperiond/CMakeLists.txt | 15 ++--- src/hyperiond/hyperiond.cpp | 13 +++- 22 files changed, 218 insertions(+), 60 deletions(-) create mode 100644 LICENSE rename Toolchain-imx6.cmake => cmake/Toolchain-imx6.cmake (100%) rename Toolchain-rpi.cmake => cmake/Toolchain-rpi.cmake (100%) rename Toolchain-x32.cmake => cmake/Toolchain-x32.cmake (100%) create mode 100644 cmake/debian/postinst create mode 100644 cmake/rpm/postinst diff --git a/CMakeLists.txt b/CMakeLists.txt index 2bb70d167..d2f14ab45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # Define the main-project name -project(hyperiond) +project(hyperion) # define the minimum cmake version (as required by cmake) cmake_minimum_required(VERSION 2.8) @@ -12,6 +12,7 @@ SET ( DEFAULT_DISPMANX OFF ) SET ( DEFAULT_FB OFF ) SET ( DEFAULT_OSX OFF ) SET ( DEFAULT_X11 OFF ) +SET ( DEFAULT_SPIDEV OFF ) SET ( DEFAULT_WS2812BPWM OFF ) SET ( DEFAULT_WS281XPWM OFF ) @@ -19,14 +20,19 @@ if (APPLE) SET ( DEFAULT_OSX ON ) else () if ( "${PLATFORM}" STREQUAL "rpi" ) + SET ( DEFAULT_DISPMANX ON ) + SET ( DEFAULT_SPIDEV ON ) + elseif ( "${PLATFORM}" STREQUAL "rpi-pwm" ) SET ( DEFAULT_DISPMANX ON ) SET ( DEFAULT_WS2812BPWM ON ) SET ( DEFAULT_WS281XPWM ON ) + SET ( DEFAULT_SPIDEV ON ) elseif ( "${PLATFORM}" STREQUAL "wetek" ) SET ( DEFAULT_AMLOGIC ON ) SET ( DEFAULT_FB ON ) elseif ( "${PLATFORM}" STREQUAL "x86" ) SET ( DEFAULT_X11 ON ) + SET ( DEFAULT_FB ON ) elseif ( "${PLATFORM}" STREQUAL "imx6" ) SET ( DEFAULT_FB ON ) endif() @@ -48,7 +54,7 @@ message(STATUS "ENABLE_OSX = " ${ENABLE_OSX}) option(ENABLE_PROTOBUF "Enable PROTOBUF server" ON) message(STATUS "ENABLE_PROTOBUF = " ${ENABLE_PROTOBUF}) -option(ENABLE_SPIDEV "Enable the SPIDEV device" ON) +option(ENABLE_SPIDEV "Enable the SPIDEV device" ${DEFAULT_SPIDEV} ) message(STATUS "ENABLE_SPIDEV = " ${ENABLE_SPIDEV}) option(ENABLE_TINKERFORGE "Enable the TINKERFORGE device" ON) @@ -88,13 +94,6 @@ if(ENABLE_OSX AND ENABLE_DISPMANX) message(FATAL_ERROR "dispmanx grabber and osx grabber cannot be used at the same time") endif() -if (DEFINED INSTALL_PREFIX) - SET( ENABLE_SYSTEM_INSTALL ON) - SET( CMAKE_INSTALL_PREFIX "${INSTALL_PREFIX}" ) -else() - SET(ENABLE_SYSTEM_INSTALL OFF) -endif() - SET ( PROTOBUF_INSTALL_BIN_DIR ${CMAKE_BINARY_DIR}/proto ) SET ( PROTOBUF_INSTALL_LIB_DIR ${CMAKE_BINARY_DIR}/proto ) @@ -125,7 +124,7 @@ endif() # Define the global output path of binaries SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) -SET(DEPLOY_DIR "${CMAKE_SOURCE_DIR}/deploy/hyperion" ) + file(MAKE_DIRECTORY ${LIBRARY_OUTPUT_PATH}) file(MAKE_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..cb9da7b42 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2014 hyperion team + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/bin/create_all_releases.sh b/bin/create_all_releases.sh index 4318d3a6b..614325ae5 100644 --- a/bin/create_all_releases.sh +++ b/bin/create_all_releases.sh @@ -11,10 +11,13 @@ make_release() shift 2 mkdir -p build-${RELEASE} + mkdir -p deploy/${RELEASE} cd build-${RELEASE} - cmake -DPLATFORM=${PLATFORM} $@ -DCMAKE_BUILD_TYPE=Release -Wno-dev .. || exit 1 + cmake -DCMAKE_INSTALL_PREFIX=/usr -DPLATFORM=${PLATFORM} $@ -DCMAKE_BUILD_TYPE=Release -Wno-dev .. || exit 1 make -j $(nproc) || exit 1 - strip bin/* + #strip bin/* + make package -j $(nproc) + mv hyperion-*-ambilight.* ../deploy/${RELEASE} cd .. bin/create_release.sh . ${RELEASE} } @@ -22,10 +25,10 @@ make_release() export PATH="$PATH:$HOME/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin" CMAKE_PROTOC_FLAG="-DIMPORT_PROTOC=../build-x86x64/protoc_export.cmake" -make_release x86x64 x86 -#make_release x32 x86 ${CMAKE_PROTOC_FLAG} -make_release rpi rpi -DCMAKE_TOOLCHAIN_FILE="../Toolchain-rpi.cmake" ${CMAKE_PROTOC_FLAG} -make_release wetek rpi -DCMAKE_TOOLCHAIN_FILE="../Toolchain-rpi.cmake" ${CMAKE_PROTOC_FLAG} -#make_release imx6 imx6 -DCMAKE_TOOLCHAIN_FILE="../Toolchain-imx6.cmake" ${CMAKE_PROTOC_FLAG} +make_release x86x64 x86 +#make_release x32 x86 ${CMAKE_PROTOC_FLAG} +make_release rpi rpi-pwm -DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-rpi.cmake" ${CMAKE_PROTOC_FLAG} +make_release wetek wetek -DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-rpi.cmake" ${CMAKE_PROTOC_FLAG} +#make_release imx6 imx6 -DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-imx6.cmake" ${CMAKE_PROTOC_FLAG} diff --git a/bin/service/hyperion.init.sh b/bin/service/hyperion.init.sh index 3ed78f5bd..f296a458b 100644 --- a/bin/service/hyperion.init.sh +++ b/bin/service/hyperion.init.sh @@ -13,7 +13,7 @@ ### END INIT INFO DAEMON=hyperiond -DAEMONOPTS="/opt/hyperion/config/hyperion.config.json" +DAEMONOPTS="/opt/hyperion/hyperion.config.json /etc/hyperion/hyperion.config.json" DAEMON_PATH="/usr/bin" NAME=$DAEMON diff --git a/bin/service/hyperion.initctl.sh b/bin/service/hyperion.initctl.sh index 58f6f79f3..774e20b9b 100644 --- a/bin/service/hyperion.initctl.sh +++ b/bin/service/hyperion.initctl.sh @@ -8,4 +8,4 @@ stop on (runlevel [!2345]) respawn -exec /usr/bin/hyperiond /opt/hyperion/config/hyperion.config.json \ No newline at end of file +exec /usr/bin/hyperiond /opt/hyperion/hyperion.config.json /etc/hyperion/hyperion.config.json diff --git a/bin/service/hyperion.systemd.sh b/bin/service/hyperion.systemd.sh index b3503c7ca..8fe2bc407 100644 --- a/bin/service/hyperion.systemd.sh +++ b/bin/service/hyperion.systemd.sh @@ -6,7 +6,7 @@ Type=simple User=root Group=root UMask=007 -ExecStart=/opt/hyperion/bin/hyperiond /opt/hyperion/config/hyperion.config.json +ExecStart=/usr/bin/hyperiond /opt/hyperion/hyperion.config.json /etc/hyperion/hyperion.config.json ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure TimeoutStopSec=10 diff --git a/Toolchain-imx6.cmake b/cmake/Toolchain-imx6.cmake similarity index 100% rename from Toolchain-imx6.cmake rename to cmake/Toolchain-imx6.cmake diff --git a/Toolchain-rpi.cmake b/cmake/Toolchain-rpi.cmake similarity index 100% rename from Toolchain-rpi.cmake rename to cmake/Toolchain-rpi.cmake diff --git a/Toolchain-x32.cmake b/cmake/Toolchain-x32.cmake similarity index 100% rename from Toolchain-x32.cmake rename to cmake/Toolchain-x32.cmake diff --git a/cmake/debian/postinst b/cmake/debian/postinst new file mode 100644 index 000000000..69ba8fc6a --- /dev/null +++ b/cmake/debian/postinst @@ -0,0 +1,60 @@ +#!/bin/sh + +install_file() +{ + src="$1" + dest="$2" + + if [ -e "$dest" ] && ! cmp --quiet "$src" "$dest" + then + cp "$src" "${dest}.new" + else + cp "$src" "${dest}" + fi +} + + +echo "--- hyperion ambilight postinstall ---" +echo "- install configuration template" +mkdir -p /etc/hyperion +install_file /usr/share/hyperion/config/hyperion.config.json /etc/hyperion/hyperion.config.json + + +if grep -m1 systemd /proc/1/comm > /dev/null +then + # systemd + echo + systemctl stop hyperion 2> /dev/null + install_file /usr/share/hyperion/service/hyperion.systemd.sh /etc/systemd/system/hyperion.service + systemctl -q enable hyperion.service +# if [ $OS_OSMC -eq 1 ]; then +# echo '---> Modify systemd script for OSMC usage' +# # Wait until kodi is sarted (for kodi checker) +# sed -i '/After = mediacenter.service/d' /etc/systemd/system/hyperion.service +# sed -i '/Unit/a After = mediacenter.service' /etc/systemd/system/hyperion.service +# sed -i 's/User=osmc/User=root/g' /etc/systemd/system/hyperion.service +# sed -i 's/Group=osmc/Group=root/g' /etc/systemd/system/hyperion.service +# systemctl -q daemon-reload +# fi + systemctl start hyperion + +elif [ -e /sbin/initctl ] +then + # upstart + install_file /usr/share/hyperion/service/hyperion.initctl.sh /etc/init/hyperion.conf + initctl reload-configuration + initctl start hyperion + +else + # sysV + service hyperion stop 2>/dev/null + install_file /usr/share/hyperion/service/hyperion.init.sh /etc/init.d/hyperion + chmod +x /etc/init.d/hyperion + update-rc.d hyperion defaults 98 02 + service hyperion start +fi +echo "- done" + +# hypercon compat +mkdir -p /opt/hyperion/config +ln -sf /usr/share/hyperion/effects /opt/hyperion/effects diff --git a/cmake/packages.cmake b/cmake/packages.cmake index 17b21485c..ed8fe87c7 100644 --- a/cmake/packages.cmake +++ b/cmake/packages.cmake @@ -1,3 +1,32 @@ -SET(CPACK_GENERATOR "DEB" "RPM" "TGZ" ) -SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "hyperion team") -include (CPack) +# cmake file for generating distribution packages + +SET ( CPACK_GENERATOR "DEB" "TGZ" "STGZ" ) # "RPM" + +SET ( CPACK_PACKAGE_NAME "hyperion" ) +SET ( CPACK_PACKAGE_DESCRIPTION_SUMMARY "Hyperion is an opensource 'AmbiLight' implementation" ) +SET ( CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md" ) +SET ( CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" ) + +SET ( CPACK_DEBIAN_PACKAGE_MAINTAINER "hyperion team") +SET ( CPACK_DEBIAN_PACKAGE_NAME "hyperion" ) +SET ( CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/cmake/debian/postinst" ) +SET ( CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/hyperion-project/hyperion" ) +SET ( CPACK_DEBIAN_PACKAGE_DEPENDS "libqtcore4 (>= 4:4.8.0), libqt4-network (>= 4:4.8.0)" ) +SET ( CPACK_DEBIAN_PACKAGE_SECTION "Miscellaneous" ) + +SET ( CPACK_RPM_PACKAGE_NAME "hyperion" ) +SET ( CPACK_RPM_PACKAGE_URL "https://github.com/hyperion-project/hyperion" ) +SET ( CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/rpm/postinst" ) + +SET(CPACK_PACKAGE_VERSION_MAJOR "1") +SET(CPACK_PACKAGE_VERSION_MINOR "3") +SET(CPACK_PACKAGE_VERSION_PATCH "0") + +SET ( CPACK_COMPONENTS_ALL ambilight ) +SET ( CPACK_ARCHIVE_COMPONENT_INSTALL ON ) +SET ( CPACK_DEB_COMPONENT_INSTALL ON ) +SET ( CPACK_RPM_COMPONENT_INSTALL ON ) +SET ( CPACK_STRIP_FILES ON ) + +# no code after following line! +INCLUDE ( CPack ) diff --git a/cmake/rpm/postinst b/cmake/rpm/postinst new file mode 100644 index 000000000..677ddc661 --- /dev/null +++ b/cmake/rpm/postinst @@ -0,0 +1,57 @@ +#!/bin/sh + +install_file() +{ + src="$1" + dest="$2" + + if [ -e "$dest" ] && ! cmp --quiet "$src" "$dest" + then + cp "$src" "${dest}.new" + else + cp "$src" "${dest}" + fi +} + + +echo "--- hyperion ambilight postinstall ---" +echo "- install configuration template" +mkdir -p /etc/hyperion +install_file /usr/share/hyperion/config/hyperion.config.json /etc/hyperion/hyperion.config.json + + +if grep -m1 systemd /proc/1/comm > /dev/null +then + # systemd + echo + systemctl stop hyperion 2> /dev/null + install_file /usr/share/hyperion/service/hyperion.systemd.sh /etc/systemd/system/hyperion.service + systemctl -q enable hyperion.service +# if [ $OS_OSMC -eq 1 ]; then +# echo '---> Modify systemd script for OSMC usage' +# # Wait until kodi is sarted (for kodi checker) +# sed -i '/After = mediacenter.service/d' /etc/systemd/system/hyperion.service +# sed -i '/Unit/a After = mediacenter.service' /etc/systemd/system/hyperion.service +# sed -i 's/User=osmc/User=root/g' /etc/systemd/system/hyperion.service +# sed -i 's/Group=osmc/Group=root/g' /etc/systemd/system/hyperion.service +# systemctl -q daemon-reload +# fi + systemctl start hyperion + +elif [ -e /sbin/initctl ] +then + # upstart + install_file /usr/share/hyperion/service/hyperion.initctl.sh /etc/init/hyperion.conf + initctl reload-configuration + initctl start hyperion + +else + # sysV + service hyperion stop 2>/dev/null + install_file /usr/share/hyperion/service/hyperion.init.sh /etc/init.d/hyperion + chmod +x /etc/init.d/hyperion + update-rc.d hyperion defaults 98 02 + service hyperion start +fi +echo "- done" + diff --git a/config/hyperion_x86.config.json b/config/hyperion_x86.config.json index 4abd64dbb..329ff248f 100644 --- a/config/hyperion_x86.config.json +++ b/config/hyperion_x86.config.json @@ -363,7 +363,7 @@ { "paths" : [ - "/home/dincs/projects/hyperion/effects" + "/opt/hyperion/effects" ] }, diff --git a/src/hyperion-aml/CMakeLists.txt b/src/hyperion-aml/CMakeLists.txt index a53e1c70c..1f4b6a8fa 100644 --- a/src/hyperion-aml/CMakeLists.txt +++ b/src/hyperion-aml/CMakeLists.txt @@ -61,7 +61,4 @@ else() qt4_use_modules(${PROJECT_NAME} Core Gui Network ) endif() -install ( TARGETS ${PROJECT_NAME} DESTINATION "${DEPLOY_DIR}/bin" ) -if (ENABLE_SYSTEM_INSTALL) - install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" ) -endif() +install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight ) diff --git a/src/hyperion-dispmanx/CMakeLists.txt b/src/hyperion-dispmanx/CMakeLists.txt index 07eabd9bf..987c37d9c 100644 --- a/src/hyperion-dispmanx/CMakeLists.txt +++ b/src/hyperion-dispmanx/CMakeLists.txt @@ -60,8 +60,4 @@ else() qt4_use_modules(${PROJECT_NAME} Core Gui Network ) endif() - -install ( TARGETS ${PROJECT_NAME} DESTINATION "${DEPLOY_DIR}/bin" ) -if (ENABLE_SYSTEM_INSTALL) - install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" ) -endif() +install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight ) diff --git a/src/hyperion-framebuffer/CMakeLists.txt b/src/hyperion-framebuffer/CMakeLists.txt index cac8f1353..e9056b541 100644 --- a/src/hyperion-framebuffer/CMakeLists.txt +++ b/src/hyperion-framebuffer/CMakeLists.txt @@ -56,7 +56,4 @@ else() qt4_use_modules(${PROJECT_NAME} Core Gui Network ) endif() -install ( TARGETS ${PROJECT_NAME} DESTINATION "${DEPLOY_DIR}/bin" ) -if (ENABLE_SYSTEM_INSTALL) - install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" ) -endif() +install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight ) diff --git a/src/hyperion-osx/CMakeLists.txt b/src/hyperion-osx/CMakeLists.txt index de8215625..c492de6b4 100644 --- a/src/hyperion-osx/CMakeLists.txt +++ b/src/hyperion-osx/CMakeLists.txt @@ -56,5 +56,5 @@ else() qt4_use_modules(${PROJECT_NAME} Core Gui Network ) endif() -install ( TARGETS ${PROJECT_NAME} DESTINATION "${DEPLOY_DIR}/bin" ) +install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight ) diff --git a/src/hyperion-remote/CMakeLists.txt b/src/hyperion-remote/CMakeLists.txt index d78c5506e..6af8fd033 100644 --- a/src/hyperion-remote/CMakeLists.txt +++ b/src/hyperion-remote/CMakeLists.txt @@ -42,8 +42,5 @@ else() qt4_use_modules(${PROJECT_NAME} Core Gui Network ) endif() -install ( TARGETS ${PROJECT_NAME} DESTINATION "${DEPLOY_DIR}/bin" ) -if (ENABLE_SYSTEM_INSTALL) - install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" ) -endif() +install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight ) diff --git a/src/hyperion-v4l2/CMakeLists.txt b/src/hyperion-v4l2/CMakeLists.txt index 1bd54ce29..1c09746dd 100644 --- a/src/hyperion-v4l2/CMakeLists.txt +++ b/src/hyperion-v4l2/CMakeLists.txt @@ -60,7 +60,4 @@ else() qt4_use_modules(${PROJECT_NAME} Core Gui Network ) endif() -install ( TARGETS ${PROJECT_NAME} DESTINATION "${DEPLOY_DIR}/bin" ) -if (ENABLE_SYSTEM_INSTALL) - install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" ) -endif() +install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight ) diff --git a/src/hyperion-x11/CMakeLists.txt b/src/hyperion-x11/CMakeLists.txt index a3a17d7ce..6ddbe5dae 100644 --- a/src/hyperion-x11/CMakeLists.txt +++ b/src/hyperion-x11/CMakeLists.txt @@ -62,7 +62,4 @@ else() qt4_use_modules(${PROJECT_NAME} Core Gui Network ) endif() -install ( TARGETS ${PROJECT_NAME} DESTINATION "${DEPLOY_DIR}/bin" ) -if (ENABLE_SYSTEM_INSTALL) - install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" ) -endif() +install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight ) diff --git a/src/hyperiond/CMakeLists.txt b/src/hyperiond/CMakeLists.txt index ea0591382..2e214eee0 100644 --- a/src/hyperiond/CMakeLists.txt +++ b/src/hyperiond/CMakeLists.txt @@ -34,12 +34,9 @@ if (ENABLE_PROTOBUF) target_link_libraries(hyperiond protoserver) endif () -install ( TARGETS hyperiond DESTINATION "${DEPLOY_DIR}/bin" ) -install ( DIRECTORY ${CMAKE_SOURCE_DIR}/effects DESTINATION "${DEPLOY_DIR}/share/hyperion/" ) -install ( DIRECTORY ${CMAKE_SOURCE_DIR}/bin/service DESTINATION "${DEPLOY_DIR}/share/hyperion/" ) - -if (ENABLE_SYSTEM_INSTALL) - install ( TARGETS hyperiond DESTINATION "bin" ) - install ( DIRECTORY ${CMAKE_SOURCE_DIR}/effects DESTINATION "share/hyperion/" ) - install ( DIRECTORY ${CMAKE_SOURCE_DIR}/bin/service DESTINATION "share/hyperion/" ) -endif() +install ( TARGETS hyperiond DESTINATION "bin" COMPONENT ambilight ) +install ( DIRECTORY ${CMAKE_SOURCE_DIR}/effects DESTINATION "share/hyperion/" COMPONENT ambilight ) +install ( DIRECTORY ${CMAKE_SOURCE_DIR}/bin/service DESTINATION "share/hyperion/" COMPONENT ambilight ) +install ( DIRECTORY ${CMAKE_SOURCE_DIR}/config DESTINATION "share/hyperion/" COMPONENT ambilight ) + + diff --git a/src/hyperiond/hyperiond.cpp b/src/hyperiond/hyperiond.cpp index cd4271751..00ab7a3f1 100644 --- a/src/hyperiond/hyperiond.cpp +++ b/src/hyperiond/hyperiond.cpp @@ -7,6 +7,7 @@ #include #include #include +#include // config includes #include "HyperionConfig.h" @@ -114,7 +115,17 @@ int main(int argc, char** argv) return 1; } - const std::string configFile = argv[1]; + int argvId = 1; + for ( int i=1; i