mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Hyperion Light 2 (#1428)
* Hyperion Light - Have EffectEngine as component * Hyperion light - Build switches for LED Devices (Serial, Network) * Fix file uri generation * Fix missing guard for Windows * Fix file uri generation * Update jsonschema and checkschema * Allow to provide cmake build args to docker build
This commit is contained in:
parent
9e4b58d5c6
commit
5078688dc8
176
CMakeLists.txt
176
CMakeLists.txt
@ -38,16 +38,6 @@ if ( CCACHE_FOUND )
|
|||||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
|
||||||
endif(CCACHE_FOUND)
|
endif(CCACHE_FOUND)
|
||||||
|
|
||||||
if ("${CMAKE_VERSION}" VERSION_LESS "3.12.0")
|
|
||||||
set(Python_ADDITIONAL_VERSIONS 3.5)
|
|
||||||
find_package(PythonInterp 3.5 REQUIRED)
|
|
||||||
else()
|
|
||||||
find_package(Python3 3.5 COMPONENTS Interpreter Development REQUIRED)
|
|
||||||
if(Python3_FOUND)
|
|
||||||
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Set build variables
|
# Set build variables
|
||||||
# Grabber
|
# Grabber
|
||||||
SET ( DEFAULT_AMLOGIC OFF )
|
SET ( DEFAULT_AMLOGIC OFF )
|
||||||
@ -71,43 +61,47 @@ SET ( DEFAULT_FORWARDER ON )
|
|||||||
SET ( DEFAULT_FLATBUF_CONNECT ON )
|
SET ( DEFAULT_FLATBUF_CONNECT ON )
|
||||||
|
|
||||||
# LED-Devices
|
# LED-Devices
|
||||||
SET ( DEFAULT_SPIDEV OFF )
|
SET ( DEFAULT_DEV_NETWORK ON )
|
||||||
SET ( DEFAULT_TINKERFORGE OFF )
|
SET ( DEFAULT_DEV_SERIAL ON )
|
||||||
SET ( DEFAULT_USB_HID OFF )
|
SET ( DEFAULT_DEV_SPI OFF )
|
||||||
SET ( DEFAULT_WS281XPWM OFF )
|
SET ( DEFAULT_DEV_TINKERFORGE OFF )
|
||||||
|
SET ( DEFAULT_DEV_USB_HID OFF )
|
||||||
|
SET ( DEFAULT_DEV_WS281XPWM OFF )
|
||||||
|
|
||||||
# Services
|
# Services
|
||||||
SET ( DEFAULT_AVAHI ON )
|
SET ( DEFAULT_AVAHI ON )
|
||||||
|
SET ( DEFAULT_EFFECTENGINE ON )
|
||||||
SET ( DEFAULT_EXPERIMENTAL OFF )
|
SET ( DEFAULT_EXPERIMENTAL OFF )
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
SET ( DEFAULT_TESTS OFF )
|
SET ( DEFAULT_JSONCHECKS ON )
|
||||||
SET ( DEFAULT_DEPLOY_DEPENDENCIES ON )
|
SET ( DEFAULT_DEPLOY_DEPENDENCIES ON )
|
||||||
SET ( DEFAULT_USE_SHARED_AVAHI_LIBS ON )
|
SET ( DEFAULT_USE_SHARED_AVAHI_LIBS ON )
|
||||||
SET ( DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS OFF )
|
SET ( DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS OFF )
|
||||||
SET ( DEFAULT_USE_SYSTEM_PROTO_LIBS OFF )
|
SET ( DEFAULT_USE_SYSTEM_PROTO_LIBS OFF )
|
||||||
SET ( DEFAULT_USE_SYSTEM_MBEDTLS_LIBS OFF )
|
SET ( DEFAULT_USE_SYSTEM_MBEDTLS_LIBS OFF )
|
||||||
|
SET ( DEFAULT_TESTS OFF )
|
||||||
|
|
||||||
# Build Hyperion with a reduced set of functionality, overwrites other default values
|
# Build Hyperion with a reduced set of functionality, overwrites other default values
|
||||||
SET ( DEFAULT_HYPERION_LIGHT OFF )
|
SET ( DEFAULT_HYPERION_LIGHT OFF )
|
||||||
|
|
||||||
IF ( ${CMAKE_SYSTEM} MATCHES "Linux" )
|
IF ( ${CMAKE_SYSTEM} MATCHES "Linux" )
|
||||||
SET ( DEFAULT_FB ON )
|
SET ( DEFAULT_FB ON )
|
||||||
SET ( DEFAULT_V4L2 ON )
|
SET ( DEFAULT_V4L2 ON )
|
||||||
SET ( DEFAULT_SPIDEV ON )
|
SET ( DEFAULT_DEV_SPIV ON )
|
||||||
SET ( DEFAULT_TINKERFORGE ON )
|
SET ( DEFAULT_DEV_TINKERFORGE ON )
|
||||||
SET ( DEFAULT_USB_HID ON )
|
SET ( DEFAULT_DEV_USB_HID ON )
|
||||||
SET ( DEFAULT_CEC ON )
|
SET ( DEFAULT_CEC ON )
|
||||||
ELSEIF ( WIN32 )
|
ELSEIF ( WIN32 )
|
||||||
SET ( DEFAULT_DX ON )
|
SET ( DEFAULT_DX ON )
|
||||||
SET ( DEFAULT_MF ON )
|
SET ( DEFAULT_MF ON )
|
||||||
ELSE()
|
ELSE()
|
||||||
SET ( DEFAULT_FB OFF )
|
SET ( DEFAULT_FB OFF )
|
||||||
SET ( DEFAULT_V4L2 OFF )
|
SET ( DEFAULT_V4L2 OFF )
|
||||||
SET ( DEFAULT_SPIDEV OFF )
|
SET ( DEFAULT_DEV_SPI OFF )
|
||||||
SET ( DEFAULT_TINKERFORGE OFF )
|
SET ( DEFAULT_DEV_TINKERFORGE OFF )
|
||||||
SET ( DEFAULT_USB_HID OFF )
|
SET ( DEFAULT_DEV_USB_HID OFF )
|
||||||
SET ( DEFAULT_CEC OFF )
|
SET ( DEFAULT_CEC OFF )
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
if ( NOT DEFINED PLATFORM )
|
if ( NOT DEFINED PLATFORM )
|
||||||
@ -158,10 +152,10 @@ if ( "${PLATFORM}" MATCHES "osx" )
|
|||||||
|
|
||||||
include_directories("/opt/X11/include/")
|
include_directories("/opt/X11/include/")
|
||||||
SET ( DEFAULT_OSX ON )
|
SET ( DEFAULT_OSX ON )
|
||||||
SET ( DEFAULT_USB_HID ON )
|
SET ( DEFAULT_DEV_USB_HID ON )
|
||||||
elseif ( "${PLATFORM}" MATCHES "rpi" )
|
elseif ( "${PLATFORM}" MATCHES "rpi" )
|
||||||
SET ( DEFAULT_DISPMANX ON )
|
SET ( DEFAULT_DISPMANX ON )
|
||||||
SET ( DEFAULT_WS281XPWM ON )
|
SET ( DEFAULT_DEV_WS281XPWM ON )
|
||||||
elseif ( "${PLATFORM}" STREQUAL "amlogic" )
|
elseif ( "${PLATFORM}" STREQUAL "amlogic" )
|
||||||
SET ( DEFAULT_AMLOGIC ON )
|
SET ( DEFAULT_AMLOGIC ON )
|
||||||
elseif ( "${PLATFORM}" STREQUAL "amlogic-dev" )
|
elseif ( "${PLATFORM}" STREQUAL "amlogic-dev" )
|
||||||
@ -176,7 +170,7 @@ elseif ( "${PLATFORM}" MATCHES "x11" )
|
|||||||
SET ( DEFAULT_XCB ON )
|
SET ( DEFAULT_XCB ON )
|
||||||
if ( "${PLATFORM}" STREQUAL "x11-dev" )
|
if ( "${PLATFORM}" STREQUAL "x11-dev" )
|
||||||
SET ( DEFAULT_AMLOGIC ON)
|
SET ( DEFAULT_AMLOGIC ON)
|
||||||
SET ( DEFAULT_WS281XPWM ON )
|
SET ( DEFAULT_DEV_WS281XPWM ON )
|
||||||
endif()
|
endif()
|
||||||
elseif ( "${PLATFORM}" STREQUAL "imx6" )
|
elseif ( "${PLATFORM}" STREQUAL "imx6" )
|
||||||
SET ( DEFAULT_FB ON )
|
SET ( DEFAULT_FB ON )
|
||||||
@ -221,6 +215,9 @@ if (HYPERION_LIGHT)
|
|||||||
# Disable Output Connectors
|
# Disable Output Connectors
|
||||||
SET ( DEFAULT_FORWARDER OFF )
|
SET ( DEFAULT_FORWARDER OFF )
|
||||||
SET ( DEFAULT_FLATBUF_CONNECT OFF )
|
SET ( DEFAULT_FLATBUF_CONNECT OFF )
|
||||||
|
|
||||||
|
# Disable Services
|
||||||
|
SET ( DEFAULT_EFFECTENGINE OFF )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message(STATUS "Grabber options:")
|
message(STATUS "Grabber options:")
|
||||||
@ -298,23 +295,32 @@ removeIndent()
|
|||||||
message(STATUS "LED-Device options:")
|
message(STATUS "LED-Device options:")
|
||||||
addIndent(" - ")
|
addIndent(" - ")
|
||||||
|
|
||||||
option(ENABLE_SPIDEV "Enable the SPIDEV device" ${DEFAULT_SPIDEV} )
|
option(ENABLE_DEV_NETWORK "Enable the Network devices" ${DEFAULT_DEV_NETWORK} )
|
||||||
message(STATUS "ENABLE_SPIDEV = ${ENABLE_SPIDEV}")
|
message(STATUS "DEFAULT_DEV_NETWORK = ${DEFAULT_DEV_NETWORK}")
|
||||||
|
|
||||||
option(ENABLE_TINKERFORGE "Enable the TINKERFORGE device" ${DEFAULT_TINKERFORGE})
|
option(ENABLE_DEV_SERIAL "Enable the Serial devices" ${DEFAULT_DEV_SERIAL} )
|
||||||
message(STATUS "ENABLE_TINKERFORGE = ${ENABLE_TINKERFORGE}")
|
message(STATUS "DEFAULT_DEV_SERIAL = ${DEFAULT_DEV_SERIAL}")
|
||||||
|
|
||||||
option(ENABLE_USB_HID "Enable the libusb and hid devices" ${DEFAULT_USB_HID} )
|
option(ENABLE_DEV_SPI "Enable the SPI device" ${DEFAULT_DEV_SPI} )
|
||||||
message(STATUS "ENABLE_USB_HID = ${ENABLE_USB_HID}")
|
message(STATUS "ENABLE_DEV_SPI = ${ENABLE_DEV_SPI}")
|
||||||
|
|
||||||
option(ENABLE_WS281XPWM "Enable the WS281x-PWM device" ${DEFAULT_WS281XPWM} )
|
option(ENABLE_DEV_TINKERFORGE "Enable the TINKERFORGE device" ${DEFAULT_DEV_TINKERFORGE})
|
||||||
message(STATUS "ENABLE_WS281XPWM = ${ENABLE_WS281XPWM}")
|
message(STATUS "ENABLE_DEV_TINKERFORGE = ${ENABLE_DEV_TINKERFORGE}")
|
||||||
|
|
||||||
|
option(ENABLE_DEV_USB_HID "Enable the libusb and hid devices" ${DEFAULT_DEV_USB_HID} )
|
||||||
|
message(STATUS "ENABLE_DEV_USB_HID = ${ENABLE_DEV_USB_HID}")
|
||||||
|
|
||||||
|
option(ENABLE_DEV_WS281XPWM "Enable the WS281x-PWM device" ${DEFAULT_DEV_WS281XPWM} )
|
||||||
|
message(STATUS "ENABLE_DEV_WS281XPWM = ${ENABLE_DEV_WS281XPWM}")
|
||||||
|
|
||||||
removeIndent()
|
removeIndent()
|
||||||
|
|
||||||
message(STATUS "Services options:")
|
message(STATUS "Services options:")
|
||||||
addIndent(" - ")
|
addIndent(" - ")
|
||||||
|
|
||||||
|
option(ENABLE_EFFECTENGINE "Enable Effect-Engine" ${DEFAULT_EFFECTENGINE})
|
||||||
|
message(STATUS "ENABLE_EFFECTENGINE = " ${ENABLE_EFFECTENGINE})
|
||||||
|
|
||||||
option(ENABLE_AVAHI "Enable Zeroconf" ${DEFAULT_AVAHI})
|
option(ENABLE_AVAHI "Enable Zeroconf" ${DEFAULT_AVAHI})
|
||||||
message(STATUS "ENABLE_AVAHI = " ${ENABLE_AVAHI})
|
message(STATUS "ENABLE_AVAHI = " ${ENABLE_AVAHI})
|
||||||
|
|
||||||
@ -326,11 +332,8 @@ removeIndent()
|
|||||||
message(STATUS "Build options:")
|
message(STATUS "Build options:")
|
||||||
addIndent(" - ")
|
addIndent(" - ")
|
||||||
|
|
||||||
option(ENABLE_TESTS "Compile additional test applications" ${DEFAULT_TESTS})
|
option(ENABLE_JSONCHECKS "Validate json schema files" ${DEFAULT_JSONCHECKS})
|
||||||
message(STATUS "ENABLE_TESTS = ${ENABLE_TESTS}")
|
message(STATUS "ENABLE_JSONCHECKS = ${ENABLE_JSONCHECKS}")
|
||||||
|
|
||||||
option(ENABLE_PROFILER "enable profiler capabilities - not for release code" OFF)
|
|
||||||
message(STATUS "ENABLE_PROFILER = ${ENABLE_PROFILER}")
|
|
||||||
|
|
||||||
option(ENABLE_DEPLOY_DEPENDENCIES "Deploy with dependencies" ${DEFAULT_DEPLOY_DEPENDENCIES})
|
option(ENABLE_DEPLOY_DEPENDENCIES "Deploy with dependencies" ${DEFAULT_DEPLOY_DEPENDENCIES})
|
||||||
message(STATUS "ENABLE_DEPLOY_DEPENDENCIES = ${ENABLE_DEPLOY_DEPENDENCIES}")
|
message(STATUS "ENABLE_DEPLOY_DEPENDENCIES = ${ENABLE_DEPLOY_DEPENDENCIES}")
|
||||||
@ -342,6 +345,12 @@ message(STATUS "DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS = ${DEFAULT_USE_SYSTEM_FLATB
|
|||||||
message(STATUS "DEFAULT_USE_SYSTEM_MBEDTLS_LIBS = ${DEFAULT_USE_SYSTEM_MBEDTLS_LIBS}")
|
message(STATUS "DEFAULT_USE_SYSTEM_MBEDTLS_LIBS = ${DEFAULT_USE_SYSTEM_MBEDTLS_LIBS}")
|
||||||
message(STATUS "DEFAULT_USE_SYSTEM_PROTO_LIBS = ${DEFAULT_USE_SYSTEM_PROTO_LIBS}")
|
message(STATUS "DEFAULT_USE_SYSTEM_PROTO_LIBS = ${DEFAULT_USE_SYSTEM_PROTO_LIBS}")
|
||||||
|
|
||||||
|
option(ENABLE_PROFILER "enable profiler capabilities - not for release code" OFF)
|
||||||
|
message(STATUS "ENABLE_PROFILER = ${ENABLE_PROFILER}")
|
||||||
|
|
||||||
|
option(ENABLE_TESTS "Compile additional test applications" ${DEFAULT_TESTS})
|
||||||
|
message(STATUS "ENABLE_TESTS = ${ENABLE_TESTS}")
|
||||||
|
|
||||||
removeIndent()
|
removeIndent()
|
||||||
|
|
||||||
SET ( FLATBUFFERS_INSTALL_BIN_DIR ${CMAKE_BINARY_DIR}/flatbuf )
|
SET ( FLATBUFFERS_INSTALL_BIN_DIR ${CMAKE_BINARY_DIR}/flatbuf )
|
||||||
@ -350,40 +359,53 @@ SET ( FLATBUFFERS_INSTALL_LIB_DIR ${CMAKE_BINARY_DIR}/flatbuf )
|
|||||||
SET ( PROTOBUF_INSTALL_BIN_DIR ${CMAKE_BINARY_DIR}/proto )
|
SET ( PROTOBUF_INSTALL_BIN_DIR ${CMAKE_BINARY_DIR}/proto )
|
||||||
SET ( PROTOBUF_INSTALL_LIB_DIR ${CMAKE_BINARY_DIR}/proto )
|
SET ( PROTOBUF_INSTALL_LIB_DIR ${CMAKE_BINARY_DIR}/proto )
|
||||||
|
|
||||||
# check all json files
|
if(ENABLE_JSONCHECKS OR ENABLE_EFFECTENGINE)
|
||||||
FILE ( GLOB_RECURSE HYPERION_SCHEMAS RELATIVE ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/libsrc/*schema*.json )
|
if ("${CMAKE_VERSION}" VERSION_LESS "3.12.0")
|
||||||
SET( JSON_FILES ${CMAKE_BINARY_DIR}/config/hyperion.config.json.default ${HYPERION_SCHEMAS})
|
set(Python_ADDITIONAL_VERSIONS 3.5)
|
||||||
|
find_package(PythonInterp 3.5 REQUIRED)
|
||||||
|
else()
|
||||||
|
find_package(Python3 3.5 COMPONENTS Interpreter Development REQUIRED)
|
||||||
|
if(Python3_FOUND)
|
||||||
|
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
EXECUTE_PROCESS (
|
if(ENABLE_JSONCHECKS)
|
||||||
COMMAND ${PYTHON_EXECUTABLE} test/jsonchecks/checkjson.py ${JSON_FILES}
|
# check all json files
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
FILE ( GLOB_RECURSE HYPERION_SCHEMAS RELATIVE ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/libsrc/*schema*.json )
|
||||||
RESULT_VARIABLE CHECK_JSON_FAILED
|
SET( JSON_FILES ${CMAKE_BINARY_DIR}/config/hyperion.config.json.default ${HYPERION_SCHEMAS})
|
||||||
)
|
|
||||||
IF ( ${CHECK_JSON_FAILED} )
|
|
||||||
MESSAGE (FATAL_ERROR "check of json files failed" )
|
|
||||||
ENDIF ()
|
|
||||||
|
|
||||||
EXECUTE_PROCESS (
|
|
||||||
COMMAND ${PYTHON_EXECUTABLE} test/jsonchecks/checkeffects.py effects effects/schema
|
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
|
||||||
RESULT_VARIABLE CHECK_EFFECTS_FAILED
|
|
||||||
)
|
|
||||||
IF ( ${CHECK_EFFECTS_FAILED} )
|
|
||||||
MESSAGE (FATAL_ERROR "check of json effect files failed" )
|
|
||||||
ENDIF ()
|
|
||||||
|
|
||||||
# for python 3 the checkschema.py file must be rewritten
|
|
||||||
# TODO on windows it can't resolve the path inside the file (Das System kann den angegebenen Pfad nicht finden: '\\schema\\schema-general.json')
|
|
||||||
IF (NOT WIN32)
|
|
||||||
EXECUTE_PROCESS (
|
EXECUTE_PROCESS (
|
||||||
COMMAND python test/jsonchecks/checkschema.py ${CMAKE_BINARY_DIR}/config/hyperion.config.json.default libsrc/hyperion/hyperion.schema.json
|
COMMAND ${PYTHON_EXECUTABLE} test/jsonchecks/checkjson.py ${JSON_FILES}
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
RESULT_VARIABLE CHECK_JSON_FAILED
|
||||||
|
)
|
||||||
|
IF ( ${CHECK_JSON_FAILED} )
|
||||||
|
MESSAGE (FATAL_ERROR "check of json files failed" )
|
||||||
|
ENDIF ()
|
||||||
|
|
||||||
|
if(ENABLE_EFFECTENGINE)
|
||||||
|
EXECUTE_PROCESS (
|
||||||
|
COMMAND ${PYTHON_EXECUTABLE} test/jsonchecks/checkeffects.py effects effects/schema
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
RESULT_VARIABLE CHECK_EFFECTS_FAILED
|
||||||
|
)
|
||||||
|
IF ( ${CHECK_EFFECTS_FAILED} )
|
||||||
|
MESSAGE (FATAL_ERROR "check of json effect files failed" )
|
||||||
|
ENDIF ()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
EXECUTE_PROCESS (
|
||||||
|
COMMAND ${PYTHON_EXECUTABLE} test/jsonchecks/checkschema.py ${CMAKE_BINARY_DIR}/config/hyperion.config.json.default libsrc/hyperion/hyperion.schema.json
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
RESULT_VARIABLE CHECK_CONFIG_FAILED
|
RESULT_VARIABLE CHECK_CONFIG_FAILED
|
||||||
)
|
)
|
||||||
ENDIF()
|
|
||||||
IF ( ${CHECK_CONFIG_FAILED} )
|
IF ( ${CHECK_CONFIG_FAILED} )
|
||||||
MESSAGE (FATAL_ERROR "check of json default config failed" )
|
MESSAGE (FATAL_ERROR "check of json default config failed" )
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
endif(ENABLE_JSONCHECKS)
|
||||||
|
|
||||||
# Add project specific cmake modules (find, etc)
|
# Add project specific cmake modules (find, etc)
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||||
@ -481,7 +503,7 @@ endif()
|
|||||||
message( STATUS "CMAKE_PREFIX_PATH used: ${CMAKE_PREFIX_PATH}" )
|
message( STATUS "CMAKE_PREFIX_PATH used: ${CMAKE_PREFIX_PATH}" )
|
||||||
|
|
||||||
# find QT libs
|
# find QT libs
|
||||||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui Network SerialPort Sql Widgets REQUIRED)
|
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui Network Sql Widgets REQUIRED)
|
||||||
message( STATUS "Found Qt Version: ${QT_VERSION}" )
|
message( STATUS "Found Qt Version: ${QT_VERSION}" )
|
||||||
|
|
||||||
if (${QT_VERSION_MAJOR} GREATER_EQUAL 6 )
|
if (${QT_VERSION_MAJOR} GREATER_EQUAL 6 )
|
||||||
@ -494,7 +516,7 @@ IF ( "${QT_VERSION}" VERSION_LESS "${QT_MIN_VERSION}" )
|
|||||||
message( FATAL_ERROR "Your Qt version is to old! Minimum required ${QT_MIN_VERSION}" )
|
message( FATAL_ERROR "Your Qt version is to old! Minimum required ${QT_MIN_VERSION}" )
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
find_package(Qt${QT_VERSION_MAJOR} ${QT_VERSION} COMPONENTS Core Gui Network SerialPort Sql Widgets REQUIRED)
|
find_package(Qt${QT_VERSION_MAJOR} ${QT_VERSION} COMPONENTS Core Gui Network Sql Widgets REQUIRED)
|
||||||
|
|
||||||
message( STATUS "Qt version used: ${QT_VERSION}" )
|
message( STATUS "Qt version used: ${QT_VERSION}" )
|
||||||
|
|
||||||
@ -519,10 +541,16 @@ add_subdirectory(resources)
|
|||||||
|
|
||||||
# remove generated files on make cleaan too
|
# remove generated files on make cleaan too
|
||||||
LIST( APPEND GENERATED_QRC
|
LIST( APPEND GENERATED_QRC
|
||||||
${CMAKE_BINARY_DIR}/EffectEngine.qrc
|
|
||||||
${CMAKE_BINARY_DIR}/WebConfig.qrc
|
${CMAKE_BINARY_DIR}/WebConfig.qrc
|
||||||
${CMAKE_BINARY_DIR}/HyperionConfig.h
|
${CMAKE_BINARY_DIR}/HyperionConfig.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(ENABLE_EFFECTENGINE)
|
||||||
|
LIST( APPEND GENERATED_QRC
|
||||||
|
${CMAKE_BINARY_DIR}/EffectEngine.qrc
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
|
||||||
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${GENERATED_QRC}" )
|
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${GENERATED_QRC}" )
|
||||||
|
|
||||||
# enable C++11; MSVC doesn't have c++11 feature switch
|
# enable C++11; MSVC doesn't have c++11 feature switch
|
||||||
|
@ -51,21 +51,30 @@
|
|||||||
// Define to enable protocol buffer connect
|
// Define to enable protocol buffer connect
|
||||||
#cmakedefine ENABLE_PROTOBUF_CONNECT
|
#cmakedefine ENABLE_PROTOBUF_CONNECT
|
||||||
|
|
||||||
// Define to enable the SPI-Device
|
// Define to enable the network devices
|
||||||
#cmakedefine ENABLE_SPIDEV
|
#cmakedefine ENABLE_DEV_NETWORK
|
||||||
|
|
||||||
// Define to enable the Tinkerforge device
|
// Define to enable the Serial devices
|
||||||
#cmakedefine ENABLE_TINKERFORGE
|
#cmakedefine ENABLE_DEV_SERIAL
|
||||||
|
|
||||||
|
// Define to enable the SPI devices
|
||||||
|
#cmakedefine ENABLE_DEV_SPI
|
||||||
|
|
||||||
|
// Define to enable the Tinkerforge devices
|
||||||
|
#cmakedefine ENABLE_DEV_TINKERFORGE
|
||||||
|
|
||||||
// Define to enable the USB / HID devices
|
// Define to enable the USB / HID devices
|
||||||
#cmakedefine ENABLE_USB_HID
|
#cmakedefine ENABLE_DEV_USB_HID
|
||||||
|
|
||||||
// Define to enable the WS281x-PWM-via-DMA-device using jgarff's library
|
// Define to enable the WS281x-PWM-via-DMA-device using jgarff's library
|
||||||
#cmakedefine ENABLE_WS281XPWM
|
#cmakedefine ENABLE_DEV_WS281XPWM
|
||||||
|
|
||||||
// Define to enable AVAHI
|
// Define to enable AVAHI
|
||||||
#cmakedefine ENABLE_AVAHI
|
#cmakedefine ENABLE_AVAHI
|
||||||
|
|
||||||
|
// Define to enable EFFECTENGINE
|
||||||
|
#cmakedefine ENABLE_EFFECTENGINE
|
||||||
|
|
||||||
// Define to enable experimental features
|
// Define to enable experimental features
|
||||||
#cmakedefine ENABLE_EXPERIMENTAL
|
#cmakedefine ENABLE_EXPERIMENTAL
|
||||||
|
|
||||||
|
@ -1,106 +1,107 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<h3 class="page-header"><i class="fa fa-wifi fa-fw"></i><span data-i18n="main_menu_remotecontrol_token">Remote Control</span></h3>
|
<h3 class="page-header"><i class="fa fa-wifi fa-fw"></i><span data-i18n="main_menu_remotecontrol_token">Remote Control</span></h3>
|
||||||
|
|
||||||
<div class="panel panel-default" style="border:0px;">
|
<div class="panel panel-default" style="border:0px;">
|
||||||
<div class="panel-heading panel-instance" style="border-radius:3px; border-bottom:0px;">
|
<div class="panel-heading panel-instance" style="border-radius:3px; border-bottom:0px;">
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<a id="active_instance_dropdown" class="dropdown-toggle" data-toggle="dropdown" href="#" style="text-decoration:none;display:flex;align-items:center;">
|
<a id="active_instance_dropdown" class="dropdown-toggle" data-toggle="dropdown" href="#" style="text-decoration:none;display:flex;align-items:center;">
|
||||||
<div id="active_instance_friendly_name"></div>
|
<div id="active_instance_friendly_name"></div>
|
||||||
<div id="btn_hypinstanceswitch" style="white-space:nowrap;"><span class="mdi mdi-lightbulb-group mdi-24px" style="margin-right:0; margin-left:5px;"></span><span class="mdi mdi-menu-down mdi-24px"></span></div>
|
<div id="btn_hypinstanceswitch" style="white-space:nowrap;"><span class="mdi mdi-lightbulb-group mdi-24px" style="margin-right:0; margin-left:5px;"></span><span class="mdi mdi-menu-down mdi-24px"></span></div>
|
||||||
</a>
|
</a>
|
||||||
<ul id="hyp_inst_listing" class="dropdown-menu dropdown-alerts" style="cursor:pointer;"></ul>
|
<ul id="hyp_inst_listing" class="dropdown-menu dropdown-alerts" style="cursor:pointer;"></ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12 col-lg-8 col-xxl-8">
|
<div class="col-md-12 col-lg-8 col-xxl-8">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading"><i class="fa fa-wifi fa-fw"></i><span data-i18n="remote_input_label">Source selection</span></div>
|
<div class="panel-heading"><i class="fa fa-wifi fa-fw"></i><span data-i18n="remote_input_label">Source selection</span></div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div id="sstcont"></div>
|
<div id="sstcont"></div>
|
||||||
<div id="auto_btn"></div>
|
<div id="auto_btn"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6 col-lg-4 col-xxl-4">
|
<div class="col-md-6 col-lg-4 col-xxl-4">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading"><i class="fa fa-wifi fa-fw"></i><span data-i18n="remote_components_label">Components control</span></div>
|
<div class="panel-heading"><i class="fa fa-wifi fa-fw"></i><span data-i18n="remote_components_label">Components control</span></div>
|
||||||
<div class="panel-body" id="comp_intro">
|
<div class="panel-body" id="comp_intro">
|
||||||
<div id="componentsbutton"></div>
|
<div id="componentsbutton"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6 col-lg-6 col-xxl-4">
|
<div class="col-md-6 col-lg-6 col-xxl-4">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading"><i class="fa fa-wifi fa-fw"></i><span data-i18n="remote_color_label">Colors/Effects</span></div>
|
<div class="panel-heading"><i class="fa fa-wifi fa-fw"></i><span data-i18n="remote_color_label">Colors/Effects</span></div>
|
||||||
<div class="panel-body" id="color_intro">
|
<div class="panel-body" id="color_intro">
|
||||||
<table class="table borderless">
|
<table class="table borderless">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="vertical-align:middle"><label for="cpeff" data-i18n="remote_color_label_color"></label></td>
|
<td style="vertical-align:middle"><label for="cpeff" data-i18n="remote_color_label_color"></label></td>
|
||||||
<td>
|
<td>
|
||||||
<div id="cp2" class="colorpicker-component input-group">
|
<div id="cp2" class="colorpicker-component input-group">
|
||||||
<input type="text" id="cpeff" class="form-control" />
|
<input type="text" id="cpeff" class="form-control" />
|
||||||
<span class="input-group-addon"><i></i></span>
|
<span class="input-group-addon"><i></i></span>
|
||||||
<span class="input-group-addon" id="remote_input_rescol" title="Repeat Color" style="cursor:pointer"><i class="fa fa-repeat"></i></span>
|
<span class="input-group-addon" id="remote_input_rescol" title="Repeat Color" style="cursor:pointer"><i class="fa fa-repeat"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr id="effect_row">
|
||||||
<td style="vertical-align:middle"><label for="effect_select" data-i18n="remote_effects_label_effects">Effect:</label></td>
|
<td style="vertical-align:middle"><label for="effect_select" data-i18n="remote_effects_label_effects">Effect:</label></td>
|
||||||
<td class="input-group">
|
<td class="input-group">
|
||||||
<select id="effect_select" class="form-control"></select>
|
<select id="effect_select" class="form-control"></select>
|
||||||
<span class="input-group-addon" id="remote_input_reseff" title="Repeat Effect" style="cursor:pointer"><i class="fa fa-repeat"></i></span>
|
<span class="input-group-addon" id="remote_input_reseff" title="Repeat Effect" style="cursor:pointer"><i class="fa fa-repeat"></i></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="vertical-align:middle"><label for="remote_input_img" data-i18n="remote_effects_label_picture">Picture:</label></td>
|
<td style="vertical-align:middle"><label for="remote_input_img" data-i18n="remote_effects_label_picture">Picture:</label></td>
|
||||||
<td class="input-group custom-file">
|
<td class="input-group custom-file">
|
||||||
<input class="form-control" id="remote_input_img" type="file" accept="image/*" />
|
<input class="form-control" id="remote_input_img" type="file" accept="image/*" />
|
||||||
<span class="input-group-addon" id="remote_input_repimg" title="Repeat Image" style="cursor:pointer"><i class="fa fa-repeat"></i></span>
|
<span class="input-group-addon" id="remote_input_repimg" title="Repeat Image" style="cursor:pointer"><i class="fa fa-repeat"></i></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="vertical-align:middle"><label for="remote_duration" data-i18n="remote_input_duration"></label></td>
|
<td style="vertical-align:middle"><label for="remote_duration" data-i18n="remote_input_duration"></label></td>
|
||||||
<td class="input-group">
|
<td class="input-group">
|
||||||
<input id="remote_duration" type="number" class="form-control" value="0" min="0" />
|
<input id="remote_duration" type="number" class="form-control" value="0" min="0" />
|
||||||
<span class="input-group-addon" data-i18n="edt_append_s"></span>
|
<span class="input-group-addon" data-i18n="edt_append_s"></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<button data-i18n="remote_color_button_reset" type="button" class="btn btn-primary" id="reset_color" style="margin-top:10px;">Reset Color/Effect</button>
|
<button data-i18n="remote_color_button_reset" type="button" class="btn btn-primary" id="reset_color" style="margin-top:10px;">Reset Color/Effect</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 col-lg-6 col-xxl-3">
|
<div class="col-md-6 col-lg-6 col-xxl-3">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading"><i class="fa fa-wifi fa-fw"></i><span data-i18n="remote_maptype_label">Mapping types</span></div>
|
<div class="panel-heading"><i class="fa fa-wifi fa-fw"></i><span data-i18n="remote_maptype_label">Mapping types</span></div>
|
||||||
<div class="panel-body" id="maptype_intro">
|
<div class="panel-body" id="maptype_intro">
|
||||||
<div id="mappingsbutton"></div>
|
<div id="mappingsbutton"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 col-lg-6 col-xxl-5">
|
<div class="col-md-6 col-lg-6 col-xxl-5">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading"><i class="fa fa-wifi fa-fw"></i><span data-i18n="remote_videoMode_label"></span></div>
|
<div class="panel-heading"><i class="fa fa-wifi fa-fw"></i><span data-i18n="remote_videoMode_label"></span></div>
|
||||||
<div class="panel-body" id="videomode_intro">
|
<div class="panel-body" id="videomode_intro">
|
||||||
<div id="videomodebtns"></div>
|
<div id="videomodebtns"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 col-lg-6 col-xxl-5">
|
<div class="col-md-6 col-lg-6 col-xxl-5">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading"><i class="fa fa-wifi fa-fw"></i><span data-i18n="remote_adjustment_label"></span></div>
|
<div class="panel-heading"><i class="fa fa-wifi fa-fw"></i><span data-i18n="remote_adjustment_label"></span></div>
|
||||||
<div class="panel-body" id="adjust_content">
|
<div class="panel-body" id="adjust_content">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="/js/content_remote.js" ></script>
|
<script src="/js/content_remote.js"></script>
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@
|
|||||||
<li> <a class="inactive mnava" id="MenuItemGrabber" href="#conf_grabber"><i class="fa fa-camera fa-fw"></i><span data-i18n="main_menu_grabber_conf_token">Capturing Hardware</span></a> </li>
|
<li> <a class="inactive mnava" id="MenuItemGrabber" href="#conf_grabber"><i class="fa fa-camera fa-fw"></i><span data-i18n="main_menu_grabber_conf_token">Capturing Hardware</span></a> </li>
|
||||||
<li> <a class="inactive mnava" id="MenuItemNetwork" href="#conf_network"><i class="fa fa-sitemap fa-fw"></i><span data-i18n="main_menu_network_conf_token">Network</span></a> </li>
|
<li> <a class="inactive mnava" id="MenuItemNetwork" href="#conf_network"><i class="fa fa-sitemap fa-fw"></i><span data-i18n="main_menu_network_conf_token">Network</span></a> </li>
|
||||||
<li> <a class="inactive mnava" href="#remote"><i class="fa fa-wifi fa-fw"></i><span data-i18n="main_menu_remotecontrol_token">Remote Control</span></a> </li>
|
<li> <a class="inactive mnava" href="#remote"><i class="fa fa-wifi fa-fw"></i><span data-i18n="main_menu_remotecontrol_token">Remote Control</span></a> </li>
|
||||||
<li> <a class="inactive mnava" href="#effects_configurator"><i class="fa fa-cogs fa-fw"></i><span data-i18n="main_menu_effectsconfigurator_token">Effects Configurator</span></a> </li>
|
<li> <a class="inactive mnava" id="MenuItemEffectsConfig" href="#effects_configurator"><i class="fa fa-cogs fa-fw"></i><span data-i18n="main_menu_effectsconfigurator_token">Effects Configurator</span></a> </li>
|
||||||
<li> <a class="inactive mnava" href="#support"><i class="fa fa-info fa-fw"></i><span data-i18n="main_menu_support_token">Support</span></a> </li>
|
<li> <a class="inactive mnava" href="#support"><i class="fa fa-info fa-fw"></i><span data-i18n="main_menu_support_token">Support</span></a> </li>
|
||||||
<li>
|
<li>
|
||||||
<a class="inactive"><i class="fa fa-industry fa-fw"></i><span data-i18n="main_menu_system_token">System</span><span class="fa arrow"></span></a>
|
<a class="inactive"><i class="fa fa-industry fa-fw"></i><span data-i18n="main_menu_system_token">System</span><span class="fa arrow"></span></a>
|
||||||
|
@ -1,72 +1,89 @@
|
|||||||
$(document).ready( function() {
|
$(document).ready(function () {
|
||||||
performTranslation();
|
performTranslation();
|
||||||
|
|
||||||
// update instance listing
|
var EFFECTENGINE_ENABLED = (jQuery.inArray("effectengine", window.serverInfo.services) !== -1);
|
||||||
updateHyperionInstanceListing();
|
|
||||||
|
|
||||||
var oldEffects = [];
|
// update instance listing
|
||||||
var effects_editor = null;
|
updateHyperionInstanceListing();
|
||||||
var confFgEff = window.serverConfig.foregroundEffect.effect;
|
|
||||||
var confBgEff = window.serverConfig.backgroundEffect.effect;
|
|
||||||
var foregroundEffect_editor = null;
|
|
||||||
var backgroundEffect_editor = null;
|
|
||||||
|
|
||||||
if(window.showOptHelp)
|
var oldEffects = [];
|
||||||
{
|
var effects_editor = null;
|
||||||
//foreground effect
|
var confFgEff = window.serverConfig.foregroundEffect.effect;
|
||||||
$('#conf_cont').append(createRow('conf_cont_fge'));
|
var confBgEff = window.serverConfig.backgroundEffect.effect;
|
||||||
$('#conf_cont_fge').append(createOptPanel('fa-spinner', $.i18n("edt_conf_fge_heading_title"), 'editor_container_foregroundEffect', 'btn_submit_foregroundEffect'));
|
var foregroundEffect_editor = null;
|
||||||
|
var backgroundEffect_editor = null;
|
||||||
|
|
||||||
|
if (!EFFECTENGINE_ENABLED) {
|
||||||
|
window.schema.foregroundEffect.properties.type.enum.splice(1, 1);
|
||||||
|
window.schema.foregroundEffect.properties.type.options.enum_titles.splice(1, 1);
|
||||||
|
window.schema.foregroundEffect.properties.type.default = "color";
|
||||||
|
delete window.schema.foregroundEffect.properties.effect;
|
||||||
|
|
||||||
|
window.schema.backgroundEffect.properties.type.enum.splice(1, 1);
|
||||||
|
window.schema.backgroundEffect.properties.type.options.enum_titles.splice(1, 1);
|
||||||
|
window.schema.backgroundEffect.properties.type.default = "color";
|
||||||
|
delete window.schema.backgroundEffect.properties.effect;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (window.showOptHelp) {
|
||||||
|
//foreground effect
|
||||||
|
$('#conf_cont').append(createRow('conf_cont_fge'));
|
||||||
|
$('#conf_cont_fge').append(createOptPanel('fa-spinner', $.i18n("edt_conf_fge_heading_title"), 'editor_container_foregroundEffect', 'btn_submit_foregroundEffect'));
|
||||||
$('#conf_cont_fge').append(createHelpTable(window.schema.foregroundEffect.properties, $.i18n("edt_conf_fge_heading_title"), "foregroundEffectHelpPanelId"));
|
$('#conf_cont_fge').append(createHelpTable(window.schema.foregroundEffect.properties, $.i18n("edt_conf_fge_heading_title"), "foregroundEffectHelpPanelId"));
|
||||||
|
|
||||||
//background effect
|
//background effect
|
||||||
$('#conf_cont').append(createRow('conf_cont_bge'));
|
$('#conf_cont').append(createRow('conf_cont_bge'));
|
||||||
$('#conf_cont_bge').append(createOptPanel('fa-spinner', $.i18n("edt_conf_bge_heading_title"), 'editor_container_backgroundEffect', 'btn_submit_backgroundEffect'));
|
$('#conf_cont_bge').append(createOptPanel('fa-spinner', $.i18n("edt_conf_bge_heading_title"), 'editor_container_backgroundEffect', 'btn_submit_backgroundEffect'));
|
||||||
$('#conf_cont_bge').append(createHelpTable(window.schema.backgroundEffect.properties, $.i18n("edt_conf_bge_heading_title"), "backgroundEffectHelpPanelId"));
|
$('#conf_cont_bge').append(createHelpTable(window.schema.backgroundEffect.properties, $.i18n("edt_conf_bge_heading_title"), "backgroundEffectHelpPanelId"));
|
||||||
|
|
||||||
//effect path
|
if (EFFECTENGINE_ENABLED) {
|
||||||
if(storedAccess != 'default')
|
//effect path
|
||||||
{
|
if (storedAccess != 'default') {
|
||||||
$('#conf_cont').append(createRow('conf_cont_ef'));
|
$('#conf_cont').append(createRow('conf_cont_ef'));
|
||||||
$('#conf_cont_ef').append(createOptPanel('fa-spinner', $.i18n("edt_conf_effp_heading_title"), 'editor_container_effects', 'btn_submit_effects'));
|
$('#conf_cont_ef').append(createOptPanel('fa-spinner', $.i18n("edt_conf_effp_heading_title"), 'editor_container_effects', 'btn_submit_effects'));
|
||||||
$('#conf_cont_ef').append(createHelpTable(window.schema.effects.properties, $.i18n("edt_conf_effp_heading_title")));
|
$('#conf_cont_ef').append(createHelpTable(window.schema.effects.properties, $.i18n("edt_conf_effp_heading_title")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
else {
|
||||||
$('#conf_cont').addClass('row');
|
$('#conf_cont').addClass('row');
|
||||||
$('#conf_cont').append(createOptPanel('fa-spinner', $.i18n("edt_conf_fge_heading_title"), 'editor_container_foregroundEffect', 'btn_submit_foregroundEffect'));
|
$('#conf_cont').append(createOptPanel('fa-spinner', $.i18n("edt_conf_fge_heading_title"), 'editor_container_foregroundEffect', 'btn_submit_foregroundEffect'));
|
||||||
$('#conf_cont').append(createOptPanel('fa-spinner', $.i18n("edt_conf_bge_heading_title"), 'editor_container_backgroundEffect', 'btn_submit_backgroundEffect'));
|
$('#conf_cont').append(createOptPanel('fa-spinner', $.i18n("edt_conf_bge_heading_title"), 'editor_container_backgroundEffect', 'btn_submit_backgroundEffect'));
|
||||||
if(storedAccess != 'default')
|
if (EFFECTENGINE_ENABLED) {
|
||||||
$('#conf_cont').append(createOptPanel('fa-spinner', $.i18n("edt_conf_effp_heading_title"), 'editor_container_effects', 'btn_submit_effects'));
|
if (storedAccess != 'default')
|
||||||
}
|
$('#conf_cont').append(createOptPanel('fa-spinner', $.i18n("edt_conf_effp_heading_title"), 'editor_container_effects', 'btn_submit_effects'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(storedAccess != 'default')
|
if (EFFECTENGINE_ENABLED) {
|
||||||
{
|
if (storedAccess != 'default') {
|
||||||
effects_editor = createJsonEditor('editor_container_effects', {
|
effects_editor = createJsonEditor('editor_container_effects', {
|
||||||
effects : window.schema.effects
|
effects: window.schema.effects
|
||||||
}, true, true);
|
}, true, true);
|
||||||
|
|
||||||
effects_editor.on('change',function() {
|
effects_editor.on('change', function () {
|
||||||
effects_editor.validate().length || window.readOnlyMode ? $('#btn_submit_effects').attr('disabled', true) : $('#btn_submit_effects').attr('disabled', false);
|
effects_editor.validate().length || window.readOnlyMode ? $('#btn_submit_effects').attr('disabled', true) : $('#btn_submit_effects').attr('disabled', false);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#btn_submit_effects').off().on('click',function() {
|
$('#btn_submit_effects').off().on('click', function () {
|
||||||
requestWriteConfig(effects_editor.getValue());
|
requestWriteConfig(effects_editor.getValue());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foregroundEffect_editor = createJsonEditor('editor_container_foregroundEffect', {
|
foregroundEffect_editor = createJsonEditor('editor_container_foregroundEffect', {
|
||||||
foregroundEffect : window.schema.foregroundEffect
|
foregroundEffect: window.schema.foregroundEffect
|
||||||
}, true, true);
|
}, true, true);
|
||||||
|
|
||||||
backgroundEffect_editor = createJsonEditor('editor_container_backgroundEffect', {
|
backgroundEffect_editor = createJsonEditor('editor_container_backgroundEffect', {
|
||||||
backgroundEffect : window.schema.backgroundEffect
|
backgroundEffect: window.schema.backgroundEffect
|
||||||
}, true, true);
|
}, true, true);
|
||||||
|
|
||||||
|
foregroundEffect_editor.on('ready', function () {
|
||||||
foregroundEffect_editor.on('ready',function() {
|
if (EFFECTENGINE_ENABLED) {
|
||||||
updateEffectlist();
|
updateEffectlist();
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
|
||||||
foregroundEffect_editor.on('change', function () {
|
foregroundEffect_editor.on('change', function () {
|
||||||
var foregroundEffectEnable = foregroundEffect_editor.getEditor("root.foregroundEffect.enable").getValue();
|
var foregroundEffectEnable = foregroundEffect_editor.getEditor("root.foregroundEffect.enable").getValue();
|
||||||
@ -79,8 +96,8 @@ $(document).ready( function() {
|
|||||||
$('#foregroundEffectHelpPanelId').hide();
|
$('#foregroundEffectHelpPanelId').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
foregroundEffect_editor.validate().length || window.readOnlyMode ? $('#btn_submit_foregroundEffect').attr('disabled', true) : $('#btn_submit_foregroundEffect').attr('disabled', false);
|
foregroundEffect_editor.validate().length || window.readOnlyMode ? $('#btn_submit_foregroundEffect').attr('disabled', true) : $('#btn_submit_foregroundEffect').attr('disabled', false);
|
||||||
});
|
});
|
||||||
|
|
||||||
backgroundEffect_editor.on('change', function () {
|
backgroundEffect_editor.on('change', function () {
|
||||||
var backgroundEffectEnable = backgroundEffect_editor.getEditor("root.backgroundEffect.enable").getValue();
|
var backgroundEffectEnable = backgroundEffect_editor.getEditor("root.backgroundEffect.enable").getValue();
|
||||||
@ -93,62 +110,62 @@ $(document).ready( function() {
|
|||||||
$('#backgroundEffectHelpPanelId').hide();
|
$('#backgroundEffectHelpPanelId').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
backgroundEffect_editor.validate().length || window.readOnlyMode ? $('#btn_submit_backgroundEffect').attr('disabled', true) : $('#btn_submit_backgroundEffect').attr('disabled', false);
|
backgroundEffect_editor.validate().length || window.readOnlyMode ? $('#btn_submit_backgroundEffect').attr('disabled', true) : $('#btn_submit_backgroundEffect').attr('disabled', false);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#btn_submit_foregroundEffect').off().on('click',function() {
|
$('#btn_submit_foregroundEffect').off().on('click', function () {
|
||||||
var value = foregroundEffect_editor.getValue();
|
var value = foregroundEffect_editor.getValue();
|
||||||
if(typeof value.foregroundEffect.effect == 'undefined')
|
if (typeof value.foregroundEffect.effect == 'undefined')
|
||||||
value.foregroundEffect.effect = window.serverConfig.foregroundEffect.effect;
|
value.foregroundEffect.effect = window.serverConfig.foregroundEffect.effect;
|
||||||
requestWriteConfig(value);
|
requestWriteConfig(value);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#btn_submit_backgroundEffect').off().on('click',function() {
|
$('#btn_submit_backgroundEffect').off().on('click', function () {
|
||||||
var value = backgroundEffect_editor.getValue();
|
var value = backgroundEffect_editor.getValue();
|
||||||
if(typeof value.backgroundEffect.effect == 'undefined')
|
if (typeof value.backgroundEffect.effect == 'undefined')
|
||||||
value.backgroundEffect.effect = window.serverConfig.backgroundEffect.effect;
|
value.backgroundEffect.effect = window.serverConfig.backgroundEffect.effect;
|
||||||
requestWriteConfig(value);
|
requestWriteConfig(value);
|
||||||
});
|
});
|
||||||
|
|
||||||
//create introduction
|
//create introduction
|
||||||
if(window.showOptHelp)
|
if (window.showOptHelp) {
|
||||||
{
|
if (EFFECTENGINE_ENABLED) {
|
||||||
createHint("intro", $.i18n('conf_effect_path_intro'), "editor_container_effects");
|
createHint("intro", $.i18n('conf_effect_path_intro'), "editor_container_effects");
|
||||||
createHint("intro", $.i18n('conf_effect_fgeff_intro'), "editor_container_foregroundEffect");
|
}
|
||||||
createHint("intro", $.i18n('conf_effect_bgeff_intro'), "editor_container_backgroundEffect");
|
createHint("intro", $.i18n('conf_effect_fgeff_intro'), "editor_container_foregroundEffect");
|
||||||
}
|
createHint("intro", $.i18n('conf_effect_bgeff_intro'), "editor_container_backgroundEffect");
|
||||||
|
}
|
||||||
|
|
||||||
function updateEffectlist(){
|
function updateEffectlist() {
|
||||||
var newEffects = window.serverInfo.effects;
|
var newEffects = window.serverInfo.effects;
|
||||||
if (newEffects.length != oldEffects.length)
|
if (newEffects.length != oldEffects.length) {
|
||||||
{
|
$('#root_foregroundEffect_effect').html('');
|
||||||
$('#root_foregroundEffect_effect').html('');
|
var usrEffArr = [];
|
||||||
var usrEffArr = [];
|
var sysEffArr = [];
|
||||||
var sysEffArr = [];
|
|
||||||
|
|
||||||
for(var i = 0; i < newEffects.length; i++)
|
for (var i = 0; i < newEffects.length; i++) {
|
||||||
{
|
var effectName = newEffects[i].name;
|
||||||
var effectName = newEffects[i].name;
|
if (!/^\:/.test(newEffects[i].file))
|
||||||
if(!/^\:/.test(newEffects[i].file))
|
usrEffArr.push(effectName);
|
||||||
usrEffArr.push(effectName);
|
else
|
||||||
else
|
sysEffArr.push(effectName);
|
||||||
sysEffArr.push(effectName);
|
}
|
||||||
}
|
$('#root_foregroundEffect_effect').append(createSel(usrEffArr, $.i18n('remote_optgroup_usreffets')));
|
||||||
$('#root_foregroundEffect_effect').append(createSel(usrEffArr, $.i18n('remote_optgroup_usreffets')));
|
$('#root_foregroundEffect_effect').append(createSel(sysEffArr, $.i18n('remote_optgroup_syseffets')));
|
||||||
$('#root_foregroundEffect_effect').append(createSel(sysEffArr, $.i18n('remote_optgroup_syseffets')));
|
$('#root_backgroundEffect_effect').html($('#root_foregroundEffect_effect').html());
|
||||||
$('#root_backgroundEffect_effect').html($('#root_foregroundEffect_effect').html());
|
oldEffects = newEffects;
|
||||||
oldEffects = newEffects;
|
|
||||||
|
|
||||||
$('#root_foregroundEffect_effect').val(confFgEff);
|
$('#root_foregroundEffect_effect').val(confFgEff);
|
||||||
$('#root_backgroundEffect_effect').val(confBgEff);
|
$('#root_backgroundEffect_effect').val(confBgEff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//interval update
|
//interval update
|
||||||
$(window.hyperion).on("cmd-effects-update", function(event){
|
$(window.hyperion).on("cmd-effects-update", function (event) {
|
||||||
window.serverInfo.effects = event.response.data.effects
|
window.serverInfo.effects = event.response.data.effects
|
||||||
updateEffectlist();
|
updateEffectlist();
|
||||||
});
|
});
|
||||||
|
|
||||||
removeOverlay();
|
removeOverlay();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -228,6 +228,11 @@ $(document).ready(function () {
|
|||||||
$("#MenuItemGrabber").attr('style', 'display:none')
|
$("#MenuItemGrabber").attr('style', 'display:none')
|
||||||
$("#MenuItemInstCapture").attr('style', 'display:none')
|
$("#MenuItemInstCapture").attr('style', 'display:none')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Hide effectsconfigurator menu entry, if effectengine is not available
|
||||||
|
if (jQuery.inArray("effectengine", window.serverInfo.services) === -1) {
|
||||||
|
$("#MenuItemEffectsConfig").attr('style', 'display:none')
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(window.hyperion).on("cmd-adjustment-update", function (event) {
|
$(window.hyperion).on("cmd-adjustment-update", function (event) {
|
||||||
@ -312,14 +317,14 @@ $(document).ready(function () {
|
|||||||
window.scrollTo(0, 0);
|
window.scrollTo(0, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
$(window).scroll(function() {
|
$(window).scroll(function () {
|
||||||
if ($(window).scrollTop() > 65)
|
if ($(window).scrollTop() > 65)
|
||||||
$("#navbar_brand_logo").css("display", "none");
|
$("#navbar_brand_logo").css("display", "none");
|
||||||
else
|
else
|
||||||
$("#navbar_brand_logo").css("display", "");
|
$("#navbar_brand_logo").css("display", "");
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#side-menu li a, #side-menu li ul li a').click(function() {
|
$('#side-menu li a, #side-menu li ul li a').click(function () {
|
||||||
$('#side-menu').find('.active').toggleClass('inactive'); // find all active classes and set inactive;
|
$('#side-menu').find('.active').toggleClass('inactive'); // find all active classes and set inactive;
|
||||||
$(this).addClass('active');
|
$(this).addClass('active');
|
||||||
});
|
});
|
||||||
@ -370,8 +375,8 @@ function SwitchToMenuItem(target, item) {
|
|||||||
cl_object.addClass('in'); // Add class "in" to expand header in sidebar menu;
|
cl_object.addClass('in'); // Add class "in" to expand header in sidebar menu;
|
||||||
if (item) { // Jump to div "item" if available. Time limit 3 seconds
|
if (item) { // Jump to div "item" if available. Time limit 3 seconds
|
||||||
function scrollTo(counter) {
|
function scrollTo(counter) {
|
||||||
if(counter < 30) {
|
if (counter < 30) {
|
||||||
setTimeout(function() {
|
setTimeout(function () {
|
||||||
counter++;
|
counter++;
|
||||||
if ($('#' + item).length)
|
if ($('#' + item).length)
|
||||||
$('#' + item)[0].scrollIntoView();
|
$('#' + item)[0].scrollIntoView();
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
performTranslation();
|
performTranslation();
|
||||||
|
|
||||||
|
var EFFECTENGINE_ENABLED = (jQuery.inArray("effectengine", window.serverInfo.services) !== -1);
|
||||||
|
|
||||||
// update instance listing
|
// update instance listing
|
||||||
updateHyperionInstanceListing();
|
updateHyperionInstanceListing();
|
||||||
|
|
||||||
@ -337,10 +339,13 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$("#remote_input_reseff, #remote_input_rescol").off().on("click", function () {
|
$("#remote_input_reseff, #remote_input_rescol").off().on("click", function () {
|
||||||
if (this.id == "remote_input_rescol")
|
if (this.id == "remote_input_rescol") {
|
||||||
sendColor();
|
sendColor();
|
||||||
else
|
} else {
|
||||||
sendEffect();
|
if (EFFECTENGINE_ENABLED) {
|
||||||
|
sendEffect();
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#remote_input_repimg").off().on("click", function () {
|
$("#remote_input_repimg").off().on("click", function () {
|
||||||
@ -365,7 +370,12 @@ $(document).ready(function () {
|
|||||||
updateInputSelect();
|
updateInputSelect();
|
||||||
updateLedMapping();
|
updateLedMapping();
|
||||||
updateVideoMode();
|
updateVideoMode();
|
||||||
updateEffectlist();
|
if (EFFECTENGINE_ENABLED) {
|
||||||
|
updateEffectlist();
|
||||||
|
} else {
|
||||||
|
$('#effect_row').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// interval updates
|
// interval updates
|
||||||
|
|
||||||
|
@ -1232,7 +1232,9 @@ function getSystemInfo() {
|
|||||||
info += '- Kernel: ' + sys.kernelType + ' (' + sys.kernelVersion + ' (WS: ' + sys.wordSize + '))\n';
|
info += '- Kernel: ' + sys.kernelType + ' (' + sys.kernelVersion + ' (WS: ' + sys.wordSize + '))\n';
|
||||||
info += '- Root/Admin: ' + sys.isUserAdmin + '\n';
|
info += '- Root/Admin: ' + sys.isUserAdmin + '\n';
|
||||||
info += '- Qt Version: ' + sys.qtVersion + '\n';
|
info += '- Qt Version: ' + sys.qtVersion + '\n';
|
||||||
info += '- Python Version: ' + sys.pyVersion + '\n';
|
if (jQuery.inArray("effectengine", window.serverInfo.services) !== -1) {
|
||||||
|
info += '- Python Version: ' + sys.pyVersion + '\n';
|
||||||
|
}
|
||||||
info += '- Browser: ' + navigator.userAgent;
|
info += '- Browser: ' + navigator.userAgent;
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
@ -1349,3 +1351,4 @@ function isValidHostnameOrIP4(value) {
|
|||||||
function isValidHostnameOrIP(value) {
|
function isValidHostnameOrIP(value) {
|
||||||
return (isValidHostnameOrIP4(value) || isValidIPv6(value));
|
return (isValidHostnameOrIP4(value) || isValidIPv6(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@ make_release()
|
|||||||
|
|
||||||
cd build-${RELEASE}
|
cd build-${RELEASE}
|
||||||
|
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=/usr -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
|
||||||
#cmake -DCMAKE_INSTALL_PREFIX=/usr -DPLATFORM=${PLATFORM} $@ -DCMAKE_BUILD_TYPE=Debug .. || exit 1
|
#cmake -DCMAKE_INSTALL_PREFIX=/usr -DPLATFORM=${PLATFORM} -DCMAKE_BUILD_TYPE=Debug $@ .. || exit 1
|
||||||
make -j $(nproc) || exit 1
|
make -j $(nproc) || exit 1
|
||||||
strip bin/*
|
strip bin/*
|
||||||
make package -j $(nproc)
|
make package -j $(nproc)
|
||||||
@ -27,16 +27,14 @@ make_release()
|
|||||||
bin/create_release.sh . ${RELEASE}
|
bin/create_release.sh . ${RELEASE}
|
||||||
}
|
}
|
||||||
|
|
||||||
#export QTDIR="/opt/Qt/6.2.0/gcc_64"
|
#export QTDIR="/opt/Qt/6.2.2/gcc_64"
|
||||||
#export QTDIR=="/opt/Qt/5.15.2/gcc_64"
|
#export QTDIR="/opt/Qt/5.15.2/gcc_64"
|
||||||
|
|
||||||
CMAKE_PROTOC_FLAG="-DIMPORT_PROTOC=../build-x86x64/protoc_export.cmake"
|
CMAKE_PROTOC_FLAG="-DIMPORT_PROTOC=../build-x86x64/protoc_export.cmake"
|
||||||
CMAKE_FLATC_FLAG="-DIMPORT_FLATC=../build-x86x64/flatc_export.cmake"
|
CMAKE_FLATC_FLAG="-DIMPORT_FLATC=../build-x86x64/flatc_export.cmake"
|
||||||
|
|
||||||
make_release x86x64 x11
|
make_release x86x64 x11 $@
|
||||||
#make_release x32 x11 -DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-x32.cmake" ${CMAKE_PROTOC_FLAG} ${CMAKE_FLATC_FLAG}
|
#make_release x32 x11 $@ -DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-x32.cmake" ${CMAKE_PROTOC_FLAG} ${CMAKE_FLATC_FLAG}
|
||||||
#make_release rpi rpi -DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-rpi.cmake" ${CMAKE_PROTOC_FLAG} ${CMAKE_FLATC_FLAG}
|
#make_release rpi rpi $@ -DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-rpi.cmake" ${CMAKE_PROTOC_FLAG} ${CMAKE_FLATC_FLAG}
|
||||||
#make_release wetek wetek -DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-rpi.cmake" ${CMAKE_PROTOC_FLAG} ${CMAKE_FLATC_FLAG}
|
#make_release wetek wetek $@ -DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-rpi.cmake" ${CMAKE_PROTOC_FLAG} ${CMAKE_FLATC_FLAG}
|
||||||
#make_release imx6 imx6 -DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-imx6.cmake" ${CMAKE_PROTOC_FLAG} ${CMAKE_FLATC_FLAG}
|
#make_release imx6 imx6 $@ -DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-imx6.cmake" ${CMAKE_PROTOC_FLAG} ${CMAKE_FLATC_FLAG}
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,6 +23,8 @@ BUILD_LOCAL=0
|
|||||||
BUILD_INCREMENTAL=0
|
BUILD_INCREMENTAL=0
|
||||||
#Verbose output
|
#Verbose output
|
||||||
_VERBOSE=0
|
_VERBOSE=0
|
||||||
|
#Additional args
|
||||||
|
BUILD_ARGS=""
|
||||||
|
|
||||||
# get current path to this script, independent of calling
|
# get current path to this script, independent of calling
|
||||||
pushd . > /dev/null
|
pushd . > /dev/null
|
||||||
@ -62,20 +64,23 @@ echo "########################################################
|
|||||||
## Requires installed Docker: https://www.docker.com/
|
## Requires installed Docker: https://www.docker.com/
|
||||||
## Without arguments it will compile Hyperion for Debian Buster (x86_64) and uses Hyperion code from GitHub repository.
|
## Without arguments it will compile Hyperion for Debian Buster (x86_64) and uses Hyperion code from GitHub repository.
|
||||||
## Supports Raspberry Pi (armv6l, armv7l) cross compilation (Debian Stretch/Buster) and native compilation (Raspbian Stretch/Buster)
|
## Supports Raspberry Pi (armv6l, armv7l) cross compilation (Debian Stretch/Buster) and native compilation (Raspbian Stretch/Buster)
|
||||||
|
## For all images and tags currently available, see https://github.com/orgs/hyperion-project/packages
|
||||||
##
|
##
|
||||||
## Homepage: https://www.hyperion-project.org
|
## Homepage: https://www.hyperion-project.org
|
||||||
## Forum: https://hyperion-project.org/forum/
|
## Forum: https://hyperion-project.org/forum/
|
||||||
########################################################
|
########################################################
|
||||||
# These are possible arguments to modify the script behaviour with their default values
|
# These are possible arguments to modify the script behaviour with their default values
|
||||||
#
|
#
|
||||||
# docker-compile.sh -h # Show this help message
|
# docker-compile.sh -h, --help # Show this help message
|
||||||
# docker-compile.sh -i x86_64 # The docker image, one of x86_64 | armv6l | armv7l | rpi-raspbian
|
# docker-compile.sh -i, --image # The docker image, e.g., x86_64, armv6l, armv7l, aarch64, rpi-raspbian
|
||||||
# docker-compile.sh -t buster # The docker tag, stretch, buster or bullseye
|
# docker-compile.sh -t, --tag # The docker tag, e.g., stretch, buster, bullseye, bookworm
|
||||||
# docker-compile.sh -b Release # cmake Release or Debug build
|
# docker-compile.sh -b, --type # Release or Debug build
|
||||||
# docker-compile.sh -p true # If true, build packages with CPack
|
# docker-compile.sh -p, --packages # If true, build packages with CPack
|
||||||
# docker-compile.sh -l # Run build using local code files
|
# docker-compile.sh -l, --local # Run build using local code files
|
||||||
# docker-compile.sh -c # Run incremental build, i.e. do not delete files created during previous build
|
# docker-compile.sh -c, --incremental # Run incremental build, i.e. do not delete files created during previous build
|
||||||
# docker-compile.sh -f x11 # cmake PLATFORM parameter
|
# docker-compile.sh -f, --platform # cmake PLATFORM parameter, e.g. x11, amlogic-dev
|
||||||
|
# docker-compile.sh -v, --verbose # Run the script in verbose mode
|
||||||
|
# docker-compile.sh -- args # Additonal cmake arguments, e.g., -DHYPERION_LIGHT=ON
|
||||||
# More informations to docker tags at: https://github.com/Hyperion-Project/hyperion.docker-ci"
|
# More informations to docker tags at: https://github.com/Hyperion-Project/hyperion.docker-ci"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,23 +91,54 @@ function log () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo "Compile Hyperion using a Docker container"
|
echo "Compile Hyperion using a Docker container"
|
||||||
|
options=$(getopt -l "image:,tag:,type:,packages:,platform:,local,incremental,verbose,help" -o "i:t:b:p:f:lcvh" -a -- "$@")
|
||||||
|
|
||||||
while getopts i:t:b:p:f:lcvh option
|
eval set -- "$options"
|
||||||
|
while true
|
||||||
do
|
do
|
||||||
case "${option}"
|
case $1 in
|
||||||
in
|
-i|--image)
|
||||||
i) BUILD_IMAGE=${OPTARG};;
|
shift
|
||||||
t) BUILD_TAG=${OPTARG};;
|
BUILD_IMAGE=$1
|
||||||
b) BUILD_TYPE=${OPTARG};;
|
;;
|
||||||
p) BUILD_PACKAGES=${OPTARG};;
|
-t|--tag)
|
||||||
f) BUILD_PLATFORM=${OPTARG,,};;
|
shift
|
||||||
l) BUILD_LOCAL=1;;
|
BUILD_TAG=$1
|
||||||
c) BUILD_INCREMENTAL=1;;
|
;;
|
||||||
v) _VERBOSE=1;;
|
-b|--type)
|
||||||
h) printHelp; exit 0;;
|
shift
|
||||||
esac
|
BUILD_TYPE=$1
|
||||||
|
;;
|
||||||
|
-p|--packages)
|
||||||
|
shift
|
||||||
|
BUILD_PACKAGES=$1
|
||||||
|
;;
|
||||||
|
-f|--platform)
|
||||||
|
shift
|
||||||
|
BUILD_PLATFORM=$1
|
||||||
|
;;
|
||||||
|
-l|--local)
|
||||||
|
BUILD_LOCAL=1
|
||||||
|
;;
|
||||||
|
-c|--incremental)
|
||||||
|
BUILD_INCREMENTAL=1
|
||||||
|
;;
|
||||||
|
-v|--verbose)
|
||||||
|
_VERBOSE=1
|
||||||
|
;;
|
||||||
|
-h|--help)
|
||||||
|
printHelp
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
--)
|
||||||
|
shift
|
||||||
|
break;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
BUILD_ARGS=$@
|
||||||
|
|
||||||
# determine package creation
|
# determine package creation
|
||||||
if [ ${BUILD_PACKAGES} == "true" ]; then
|
if [ ${BUILD_PACKAGES} == "true" ]; then
|
||||||
PACKAGES="package"
|
PACKAGES="package"
|
||||||
@ -164,7 +200,7 @@ $DOCKER run --rm \
|
|||||||
-v "${CODE_PATH}/:/source:rw" \
|
-v "${CODE_PATH}/:/source:rw" \
|
||||||
${REGISTRY_URL}/${BUILD_IMAGE}:${BUILD_TAG} \
|
${REGISTRY_URL}/${BUILD_IMAGE}:${BUILD_TAG} \
|
||||||
/bin/bash -c "mkdir -p /source/${BUILD_DIR} && cd /source/${BUILD_DIR} &&
|
/bin/bash -c "mkdir -p /source/${BUILD_DIR} && cd /source/${BUILD_DIR} &&
|
||||||
cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${PLATFORM} .. || exit 2 &&
|
cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${PLATFORM} ${BUILD_ARGS} .. || exit 2 &&
|
||||||
make -j $(nproc) ${PACKAGES} || exit 3 || : &&
|
make -j $(nproc) ${PACKAGES} || exit 3 || : &&
|
||||||
exit 0;
|
exit 0;
|
||||||
exit 1 " || { echo "---> Hyperion compilation failed! Abort"; exit 4; }
|
exit 1 " || { echo "---> Hyperion compilation failed! Abort"; exit 4; }
|
||||||
|
@ -47,34 +47,36 @@ macro(DeployMacOS TARGET)
|
|||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
include(BundleUtilities)
|
if(ENABLE_EFFECTENGINE)
|
||||||
fixup_bundle("${CMAKE_INSTALL_PREFIX}/${TARGET_BUNDLE_NAME}" "${QT_PLUGINS}" "" IGNORE_ITEM "python;python3;Python;Python3;.Python;.Python3")
|
include(BundleUtilities)
|
||||||
|
fixup_bundle("${CMAKE_INSTALL_PREFIX}/${TARGET_BUNDLE_NAME}" "${QT_PLUGINS}" "" IGNORE_ITEM "python;python3;Python;Python3;.Python;.Python3")
|
||||||
|
|
||||||
# Detect the Python version and modules directory
|
# Detect the Python version and modules directory
|
||||||
find_package(Python3 3.5 REQUIRED)
|
find_package(Python3 3.5 REQUIRED)
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${Python3_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(standard_lib=True))"
|
COMMAND ${Python3_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(standard_lib=True))"
|
||||||
OUTPUT_VARIABLE PYTHON_MODULES_DIR
|
OUTPUT_VARIABLE PYTHON_MODULES_DIR
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
|
||||||
|
|
||||||
# Copy Python modules to '/../Frameworks/Python.framework/Versions/Current/lib/PythonMAJOR.MINOR' and ignore the unnecessary stuff listed below
|
|
||||||
if (PYTHON_MODULES_DIR)
|
|
||||||
set(PYTHON_VERSION_MAJOR_MINOR "${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}")
|
|
||||||
file(
|
|
||||||
COPY ${PYTHON_MODULES_DIR}/
|
|
||||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/${TARGET_BUNDLE_NAME}/Contents/Frameworks/Python.framework/Versions/Current/lib/python${PYTHON_VERSION_MAJOR_MINOR}"
|
|
||||||
PATTERN "*.pyc" EXCLUDE # compiled bytecodes
|
|
||||||
PATTERN "__pycache__" EXCLUDE # any cache
|
|
||||||
PATTERN "config-${PYTHON_VERSION_MAJOR_MINOR}*" EXCLUDE # static libs
|
|
||||||
PATTERN "lib2to3" EXCLUDE # automated Python 2 to 3 code translation
|
|
||||||
PATTERN "tkinter" EXCLUDE # Tk interface
|
|
||||||
PATTERN "turtledemo" EXCLUDE # Tk demo folder
|
|
||||||
PATTERN "turtle.py" EXCLUDE # Tk demo file
|
|
||||||
PATTERN "test" EXCLUDE # unittest module
|
|
||||||
PATTERN "sitecustomize.py" EXCLUDE # site-specific configs
|
|
||||||
)
|
)
|
||||||
endif(PYTHON_MODULES_DIR)
|
|
||||||
|
# Copy Python modules to '/../Frameworks/Python.framework/Versions/Current/lib/PythonMAJOR.MINOR' and ignore the unnecessary stuff listed below
|
||||||
|
if (PYTHON_MODULES_DIR)
|
||||||
|
set(PYTHON_VERSION_MAJOR_MINOR "${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}")
|
||||||
|
file(
|
||||||
|
COPY ${PYTHON_MODULES_DIR}/
|
||||||
|
DESTINATION "${CMAKE_INSTALL_PREFIX}/${TARGET_BUNDLE_NAME}/Contents/Frameworks/Python.framework/Versions/Current/lib/python${PYTHON_VERSION_MAJOR_MINOR}"
|
||||||
|
PATTERN "*.pyc" EXCLUDE # compiled bytecodes
|
||||||
|
PATTERN "__pycache__" EXCLUDE # any cache
|
||||||
|
PATTERN "config-${PYTHON_VERSION_MAJOR_MINOR}*" EXCLUDE # static libs
|
||||||
|
PATTERN "lib2to3" EXCLUDE # automated Python 2 to 3 code translation
|
||||||
|
PATTERN "tkinter" EXCLUDE # Tk interface
|
||||||
|
PATTERN "turtledemo" EXCLUDE # Tk demo folder
|
||||||
|
PATTERN "turtle.py" EXCLUDE # Tk demo file
|
||||||
|
PATTERN "test" EXCLUDE # unittest module
|
||||||
|
PATTERN "sitecustomize.py" EXCLUDE # site-specific configs
|
||||||
|
)
|
||||||
|
endif(PYTHON_MODULES_DIR)
|
||||||
|
endif(ENABLE_EFFECTENGINE)
|
||||||
]] COMPONENT "Hyperion")
|
]] COMPONENT "Hyperion")
|
||||||
|
|
||||||
else()
|
else()
|
||||||
@ -225,36 +227,38 @@ macro(DeployLinux TARGET)
|
|||||||
)
|
)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# Detect the Python version and modules directory
|
if(ENABLE_EFFECTENGINE)
|
||||||
if (NOT CMAKE_VERSION VERSION_LESS "3.12")
|
# Detect the Python version and modules directory
|
||||||
set(PYTHON_VERSION_MAJOR_MINOR "${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}")
|
if (NOT CMAKE_VERSION VERSION_LESS "3.12")
|
||||||
set(PYTHON_MODULES_DIR "${Python3_STDLIB}")
|
set(PYTHON_VERSION_MAJOR_MINOR "${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}")
|
||||||
else()
|
set(PYTHON_MODULES_DIR "${Python3_STDLIB}")
|
||||||
set(PYTHON_VERSION_MAJOR_MINOR "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
|
else()
|
||||||
execute_process(
|
set(PYTHON_VERSION_MAJOR_MINOR "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
|
||||||
COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(standard_lib=True))"
|
execute_process(
|
||||||
OUTPUT_VARIABLE PYTHON_MODULES_DIR
|
COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(standard_lib=True))"
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_VARIABLE PYTHON_MODULES_DIR
|
||||||
)
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
endif()
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Copy Python modules to 'share/hyperion/lib/pythonMAJOR.MINOR' and ignore the unnecessary stuff listed below
|
# Copy Python modules to 'share/hyperion/lib/pythonMAJOR.MINOR' and ignore the unnecessary stuff listed below
|
||||||
if (PYTHON_MODULES_DIR)
|
if (PYTHON_MODULES_DIR)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY ${PYTHON_MODULES_DIR}/
|
DIRECTORY ${PYTHON_MODULES_DIR}/
|
||||||
DESTINATION "share/hyperion/lib/python${PYTHON_VERSION_MAJOR_MINOR}"
|
DESTINATION "share/hyperion/lib/python${PYTHON_VERSION_MAJOR_MINOR}"
|
||||||
COMPONENT "Hyperion"
|
COMPONENT "Hyperion"
|
||||||
PATTERN "*.pyc" EXCLUDE # compiled bytecodes
|
PATTERN "*.pyc" EXCLUDE # compiled bytecodes
|
||||||
PATTERN "__pycache__" EXCLUDE # any cache
|
PATTERN "__pycache__" EXCLUDE # any cache
|
||||||
PATTERN "config-${PYTHON_VERSION_MAJOR_MINOR}*" EXCLUDE # static libs
|
PATTERN "config-${PYTHON_VERSION_MAJOR_MINOR}*" EXCLUDE # static libs
|
||||||
PATTERN "lib2to3" EXCLUDE # automated Python 2 to 3 code translation
|
PATTERN "lib2to3" EXCLUDE # automated Python 2 to 3 code translation
|
||||||
PATTERN "tkinter" EXCLUDE # Tk interface
|
PATTERN "tkinter" EXCLUDE # Tk interface
|
||||||
PATTERN "turtle.py" EXCLUDE # Tk demo
|
PATTERN "turtle.py" EXCLUDE # Tk demo
|
||||||
PATTERN "test" EXCLUDE # unittest module
|
PATTERN "test" EXCLUDE # unittest module
|
||||||
PATTERN "sitecustomize.py" EXCLUDE # site-specific configs
|
PATTERN "sitecustomize.py" EXCLUDE # site-specific configs
|
||||||
)
|
)
|
||||||
endif(PYTHON_MODULES_DIR)
|
endif(PYTHON_MODULES_DIR)
|
||||||
|
endif(ENABLE_EFFECTENGINE)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
# Run CMake after target was built to run get_prerequisites on ${TARGET_FILE}
|
# Run CMake after target was built to run get_prerequisites on ${TARGET_FILE}
|
||||||
@ -388,44 +392,46 @@ macro(DeployWindows TARGET)
|
|||||||
COMPONENT "Hyperion"
|
COMPONENT "Hyperion"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Download embed python package (only release build package available)
|
if(ENABLE_EFFECTENGINE)
|
||||||
# Currently only cmake version >= 3.12 implemented
|
# Download embed python package (only release build package available)
|
||||||
set(url "https://www.python.org/ftp/python/${Python3_VERSION}/")
|
# Currently only cmake version >= 3.12 implemented
|
||||||
set(filename "python-${Python3_VERSION}-embed-amd64.zip")
|
set(url "https://www.python.org/ftp/python/${Python3_VERSION}/")
|
||||||
|
set(filename "python-${Python3_VERSION}-embed-amd64.zip")
|
||||||
|
|
||||||
if (NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/${filename}" OR NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/python")
|
if (NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/${filename}" OR NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/python")
|
||||||
file(DOWNLOAD "${url}${filename}" "${CMAKE_CURRENT_BINARY_DIR}/${filename}"
|
file(DOWNLOAD "${url}${filename}" "${CMAKE_CURRENT_BINARY_DIR}/${filename}"
|
||||||
STATUS result
|
STATUS result
|
||||||
)
|
)
|
||||||
|
|
||||||
# Check if the download is successful
|
# Check if the download is successful
|
||||||
list(GET result 0 result_code)
|
list(GET result 0 result_code)
|
||||||
if(NOT result_code EQUAL 0)
|
if(NOT result_code EQUAL 0)
|
||||||
list(GET result 1 reason)
|
list(GET result 1 reason)
|
||||||
message(FATAL_ERROR "Could not download file ${url}${filename}: ${reason}")
|
message(FATAL_ERROR "Could not download file ${url}${filename}: ${reason}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Unpack downloaded embed python
|
||||||
|
file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/python)
|
||||||
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/python)
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E tar -xfz "${CMAKE_CURRENT_BINARY_DIR}/${filename}"
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/python
|
||||||
|
OUTPUT_QUIET
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Unpack downloaded embed python
|
# Copy pythonXX.dll and pythonXX.zip to 'hyperion'
|
||||||
file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/python)
|
foreach(PYTHON_FILE
|
||||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/python)
|
"python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}.dll"
|
||||||
execute_process(
|
"python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}.zip"
|
||||||
COMMAND ${CMAKE_COMMAND} -E tar -xfz "${CMAKE_CURRENT_BINARY_DIR}/${filename}"
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/python
|
|
||||||
OUTPUT_QUIET
|
|
||||||
)
|
)
|
||||||
endif()
|
install(
|
||||||
|
FILES ${CMAKE_CURRENT_BINARY_DIR}/python/${PYTHON_FILE}
|
||||||
# Copy pythonXX.dll and pythonXX.zip to 'hyperion'
|
DESTINATION "bin"
|
||||||
foreach(PYTHON_FILE
|
COMPONENT "Hyperion"
|
||||||
"python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}.dll"
|
)
|
||||||
"python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}.zip"
|
endforeach()
|
||||||
)
|
endif(ENABLE_EFFECTENGINE)
|
||||||
install(
|
|
||||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/python/${PYTHON_FILE}
|
|
||||||
DESTINATION "bin"
|
|
||||||
COMPONENT "Hyperion"
|
|
||||||
)
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
if (ENABLE_DX)
|
if (ENABLE_DX)
|
||||||
# Download DirectX End-User Runtimes (June 2010)
|
# Download DirectX End-User Runtimes (June 2010)
|
||||||
|
245
dependencies/CMakeLists.txt
vendored
245
dependencies/CMakeLists.txt
vendored
@ -1,10 +1,10 @@
|
|||||||
add_subdirectory(build/hidapi)
|
add_subdirectory(build/hidapi)
|
||||||
|
|
||||||
if ( ENABLE_TINKERFORGE )
|
if (ENABLE_DEV_TINKERFORGE)
|
||||||
add_subdirectory(build/tinkerforge)
|
add_subdirectory(build/tinkerforge)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_WS281XPWM)
|
if(ENABLE_DEV_WS281XPWM)
|
||||||
add_library(ws281x
|
add_library(ws281x
|
||||||
external/rpi_ws281x/mailbox.c external/rpi_ws281x/ws2811.c
|
external/rpi_ws281x/mailbox.c external/rpi_ws281x/ws2811.c
|
||||||
external/rpi_ws281x/pwm.c external/rpi_ws281x/dma.c
|
external/rpi_ws281x/pwm.c external/rpi_ws281x/dma.c
|
||||||
@ -194,135 +194,138 @@ endif()
|
|||||||
# MBEDTLS
|
# MBEDTLS
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
|
|
||||||
set(USE_SYSTEM_MBEDTLS_LIBS ${DEFAULT_USE_SYSTEM_MBEDTLS_LIBS} CACHE BOOL "use mbedtls library from system")
|
if(ENABLE_DEV_NETWORK)
|
||||||
|
set(USE_SYSTEM_MBEDTLS_LIBS ${DEFAULT_USE_SYSTEM_MBEDTLS_LIBS} CACHE BOOL "use mbedtls library from system")
|
||||||
|
|
||||||
if (USE_SYSTEM_MBEDTLS_LIBS)
|
if (USE_SYSTEM_MBEDTLS_LIBS)
|
||||||
find_package(mbedtls REQUIRED)
|
find_package(mbedtls REQUIRED)
|
||||||
if (NOT MBEDTLS_FOUND)
|
if (NOT MBEDTLS_FOUND)
|
||||||
message(STATUS "Could NOT find mbedtls system libraries, build static mbedtls libraries")
|
message(STATUS "Could NOT find mbedtls system libraries, build static mbedtls libraries")
|
||||||
#Fallback: build mbedtls static libray inside project
|
#Fallback: build mbedtls static libray inside project
|
||||||
set(DEFAULT_USE_SYSTEM_MBEDTLS_LIBS OFF PARENT_SCOPE)
|
set(DEFAULT_USE_SYSTEM_MBEDTLS_LIBS OFF PARENT_SCOPE)
|
||||||
set(USE_SYSTEM_MBEDTLS_LIBS OFF)
|
set(USE_SYSTEM_MBEDTLS_LIBS OFF)
|
||||||
endif (NOT MBEDTLS_FOUND)
|
endif (NOT MBEDTLS_FOUND)
|
||||||
endif (USE_SYSTEM_MBEDTLS_LIBS)
|
endif (USE_SYSTEM_MBEDTLS_LIBS)
|
||||||
|
|
||||||
if (NOT USE_SYSTEM_MBEDTLS_LIBS)
|
if (NOT USE_SYSTEM_MBEDTLS_LIBS)
|
||||||
set(DEFAULT_USE_SYSTEM_MBEDTLS_LIBS OFF CACHE BOOL "system mbedtls libraries not found, disable use system mbedtls libraries")
|
set(DEFAULT_USE_SYSTEM_MBEDTLS_LIBS OFF CACHE BOOL "system mbedtls libraries not found, disable use system mbedtls libraries")
|
||||||
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared mbedtls libraries")
|
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared mbedtls libraries")
|
||||||
|
|
||||||
set(ENABLE_TESTING OFF CACHE BOOL "Disable mbedTLS tests")
|
set(ENABLE_TESTING OFF CACHE BOOL "Disable mbedTLS tests")
|
||||||
set(ENABLE_PROGRAMS OFF CACHE BOOL "Disable mbedTLS programs")
|
set(ENABLE_PROGRAMS OFF CACHE BOOL "Disable mbedTLS programs")
|
||||||
set(USE_SHARED_MBEDTLS_LIBRARY OFF CACHE BOOL "Disable mbedTLS shared libraries")
|
set(USE_SHARED_MBEDTLS_LIBRARY OFF CACHE BOOL "Disable mbedTLS shared libraries")
|
||||||
set(USE_STATIC_MBEDTLS_LIBRARY ON CACHE BOOL "Enable mbedTLS static libraries")
|
set(USE_STATIC_MBEDTLS_LIBRARY ON CACHE BOOL "Enable mbedTLS static libraries")
|
||||||
|
|
||||||
set(MBEDTLS_DOWNLOAD_DIR "${CMAKE_BINARY_DIR}/dependencies/external/mbedtls/download")
|
set(MBEDTLS_DOWNLOAD_DIR "${CMAKE_BINARY_DIR}/dependencies/external/mbedtls/download")
|
||||||
set(MBEDTLS_SOURCE_DIR "${CMAKE_BINARY_DIR}/dependencies/external/mbedtls/src")
|
set(MBEDTLS_SOURCE_DIR "${CMAKE_BINARY_DIR}/dependencies/external/mbedtls/src")
|
||||||
set(MBEDTLS_BINARY_DIR "${CMAKE_BINARY_DIR}/dependencies/external/mbedtls/build")
|
set(MBEDTLS_BINARY_DIR "${CMAKE_BINARY_DIR}/dependencies/external/mbedtls/build")
|
||||||
set(MBEDTLS_INSTALL_DIR "${CMAKE_BINARY_DIR}")
|
set(MBEDTLS_INSTALL_DIR "${CMAKE_BINARY_DIR}")
|
||||||
if(${CMAKE_BUILD_TYPE} AND ${CMAKE_BUILD_TYPE} EQUAL "Debug")
|
if(${CMAKE_BUILD_TYPE} AND ${CMAKE_BUILD_TYPE} EQUAL "Debug")
|
||||||
set(MBEDTLS_LOGGING 1)
|
set(MBEDTLS_LOGGING 1)
|
||||||
else ()
|
else ()
|
||||||
set(MBEDTLS_LOGGING 0)
|
set(MBEDTLS_LOGGING 0)
|
||||||
endif ()
|
|
||||||
|
|
||||||
set(MBEDTLS_CMAKE_ARGS
|
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH=${MBEDTLS_INSTALL_DIR}
|
|
||||||
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
|
|
||||||
-DUSE_SHARED_MBEDTLS_LIBRARY:BOOL=OFF
|
|
||||||
-DUSE_STATIC_MBEDTLS_LIBRARY:BOOL=ON
|
|
||||||
-DENABLE_TESTING:BOOL=OFF
|
|
||||||
-DENABLE_PROGRAMS:BOOL=OFF
|
|
||||||
-DLINK_WITH_PTHREAD:BOOL=ON
|
|
||||||
-Wno-dev
|
|
||||||
#-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=TRUE
|
|
||||||
)
|
|
||||||
|
|
||||||
set(ENABLE_MBEDTLS_FETCH_CONTENT ON)
|
|
||||||
|
|
||||||
if (ENABLE_MBEDTLS_FETCH_CONTENT AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.11)
|
|
||||||
|
|
||||||
include(FetchContent)
|
|
||||||
|
|
||||||
FetchContent_Declare(
|
|
||||||
mbedtls
|
|
||||||
GIT_REPOSITORY https://github.com/ARMmbed/mbedtls.git
|
|
||||||
GIT_TAG origin/master
|
|
||||||
BUILD_ALWAYS OFF
|
|
||||||
GIT_PROGRESS 1
|
|
||||||
DOWNLOAD_DIR "${MBEDTLS_DOWNLOAD_DIR}"
|
|
||||||
SOURCE_DIR "${MBEDTLS_SOURCE_DIR}"
|
|
||||||
BINARY_DIR "${MBEDTLS_BINARY_DIR}"
|
|
||||||
INSTALL_DIR "${MBEDTLS_INSTALL_DIR}"
|
|
||||||
CMAKE_ARGS ${MBEDTLS_CMAKE_ARGS}
|
|
||||||
BUILD_COMMAND ""
|
|
||||||
INSTALL_COMMAND ""
|
|
||||||
LOG_DOWNLOAD ${MBEDTLS_LOGGING}
|
|
||||||
LOG_UPDATE ${MBEDTLS_LOGGING}
|
|
||||||
LOG_PATCH ${MBEDTLS_LOGGING}
|
|
||||||
LOG_CONFIGURE ${MBEDTLS_LOGGING}
|
|
||||||
LOG_BUILD ${MBEDTLS_LOGGING}
|
|
||||||
LOG_INSTALL ${MBEDTLS_LOGGING}
|
|
||||||
LOG_TEST ${MBEDTLS_LOGGING}
|
|
||||||
LOG_MERGED_STDOUTERR ${MBEDTLS_LOGGING}
|
|
||||||
LOG_OUTPUT_ON_FAILURE ${MBEDTLS_LOGGING}
|
|
||||||
)
|
|
||||||
|
|
||||||
if (CMAKE_VERSION VERSION_LESS 3.14)
|
|
||||||
macro (FetchContent_MakeAvailable NAME)
|
|
||||||
FetchContent_GetProperties(${NAME})
|
|
||||||
if (NOT ${NAME}_POPULATED)
|
|
||||||
FetchContent_Populate(${NAME})
|
|
||||||
add_subdirectory(${${NAME}_SOURCE_DIR} ${${NAME}_BINARY_DIR})
|
|
||||||
endif ()
|
|
||||||
endmacro ()
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
FetchContent_MakeAvailable(mbedtls)
|
set(MBEDTLS_CMAKE_ARGS
|
||||||
else ()
|
-DCMAKE_INSTALL_PREFIX:PATH=${MBEDTLS_INSTALL_DIR}
|
||||||
set(ENABLE_MBEDTLS_FETCH_CONTENT OFF PARENT_SCOPE)
|
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
|
||||||
if(NOT DEFINED BUILD_MBEDTLS_ONCE)
|
-DUSE_SHARED_MBEDTLS_LIBRARY:BOOL=OFF
|
||||||
set(BUILD_MBEDTLS_ONCE CACHE INTERNAL "Done")
|
-DUSE_STATIC_MBEDTLS_LIBRARY:BOOL=ON
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/dependencies/CMakeLists-mbedtls.txt.in ${MBEDTLS_DOWNLOAD_DIR}/CMakeLists.txt @ONLY)
|
-DENABLE_TESTING:BOOL=OFF
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX:PATH=${MBEDTLS_INSTALL_DIR} -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -G "${CMAKE_GENERATOR}" . WORKING_DIRECTORY ${MBEDTLS_DOWNLOAD_DIR})
|
-DENABLE_PROGRAMS:BOOL=OFF
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} --build . WORKING_DIRECTORY ${MBEDTLS_DOWNLOAD_DIR})
|
-DLINK_WITH_PTHREAD:BOOL=ON
|
||||||
add_subdirectory(${MBEDTLS_SOURCE_DIR} ${MBEDTLS_BINARY_DIR})
|
-Wno-dev
|
||||||
endif()
|
#-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=TRUE
|
||||||
endif ()
|
)
|
||||||
|
|
||||||
set (MBEDTLS_INCLUDE_DIR "${MBEDTLS_SOURCE_DIR}/include")
|
set(ENABLE_MBEDTLS_FETCH_CONTENT ON)
|
||||||
set (MBEDTLS_INCLUDE_DIR ${MBEDTLS_INCLUDE_DIR} PARENT_SCOPE)
|
|
||||||
if (MBEDTLS_INCLUDE_DIR)
|
|
||||||
if (EXISTS "${MBEDTLS_INCLUDE_DIR}/mbedtls/build_info.h")
|
|
||||||
file(STRINGS ${MBEDTLS_INCLUDE_DIR}/mbedtls/build_info.h _MBEDTLS_VERSION_LINE REGEX "^#define[ \t]+MBEDTLS_VERSION_STRING[\t ].*")
|
|
||||||
string(REGEX REPLACE ".*MBEDTLS_VERSION_STRING[\t ]+\"(.*)\"" "\\1" MBEDTLS_VERSION ${_MBEDTLS_VERSION_LINE})
|
|
||||||
set (MBEDTLS_VERSION ${MBEDTLS_VERSION} PARENT_SCOPE)
|
|
||||||
message(STATUS "Using static mbedtls libraries (build version \"${MBEDTLS_VERSION}\")")
|
|
||||||
elseif(EXISTS "${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h")
|
|
||||||
file(STRINGS "${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h" _MBEDTLS_VERSION_STRING REGEX "^#[\t ]*define[\t ]+MBEDTLS_VERSION_STRING[\t ]+\"[0-9]+.[0-9]+.[0-9]+\"")
|
|
||||||
string(REGEX REPLACE "^.*MBEDTLS_VERSION_STRING.*([0-9]+.[0-9]+.[0-9]+).*" "\\1" MBEDTLS_VERSION "${_MBEDTLS_VERSION_STRING}")
|
|
||||||
set (MBEDTLS_VERSION ${MBEDTLS_VERSION} PARENT_SCOPE)
|
|
||||||
message(STATUS "Using static mbedtls libraries (build version \"${MBEDTLS_VERSION}\")")
|
|
||||||
endif()
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
include_directories(${MBEDTLS_INCLUDE_DIR})
|
if (ENABLE_MBEDTLS_FETCH_CONTENT AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.11)
|
||||||
|
|
||||||
if(WIN32)
|
include(FetchContent)
|
||||||
set (MBEDTLS_LIB_INSTALL_DIR_WITH_LIB_PREFIX "${MBEDTLS_INSTALL_DIR}/lib/${CMAKE_CFG_INTDIR}/")
|
|
||||||
else()
|
|
||||||
set (MBEDTLS_LIB_INSTALL_DIR_WITH_LIB_PREFIX "${MBEDTLS_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
set (MBEDTLS_SSL_LIBRARY "${MBEDTLS_LIB_INSTALL_DIR_WITH_LIB_PREFIX}mbedtls${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
FetchContent_Declare(
|
||||||
set (MBEDTLS_X509_LIBRARY "${MBEDTLS_LIB_INSTALL_DIR_WITH_LIB_PREFIX}mbedx509${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
mbedtls
|
||||||
set (MBEDTLS_CRYPTO_LIBRARY "${MBEDTLS_LIB_INSTALL_DIR_WITH_LIB_PREFIX}mbedcrypto${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
GIT_REPOSITORY https://github.com/ARMmbed/mbedtls.git
|
||||||
set (MBEDTLS_LIBRARIES ${MBEDTLS_SSL_LIBRARY} ${MBEDTLS_X509_LIBRARY} ${MBEDTLS_CRYPTO_LIBRARY})
|
GIT_TAG origin/master
|
||||||
set (MBEDTLS_LIBRARIES ${MBEDTLS_LIBRARIES} PARENT_SCOPE)
|
BUILD_ALWAYS OFF
|
||||||
|
GIT_PROGRESS 1
|
||||||
|
DOWNLOAD_DIR "${MBEDTLS_DOWNLOAD_DIR}"
|
||||||
|
SOURCE_DIR "${MBEDTLS_SOURCE_DIR}"
|
||||||
|
BINARY_DIR "${MBEDTLS_BINARY_DIR}"
|
||||||
|
INSTALL_DIR "${MBEDTLS_INSTALL_DIR}"
|
||||||
|
CMAKE_ARGS ${MBEDTLS_CMAKE_ARGS}
|
||||||
|
BUILD_COMMAND ""
|
||||||
|
INSTALL_COMMAND ""
|
||||||
|
LOG_DOWNLOAD ${MBEDTLS_LOGGING}
|
||||||
|
LOG_UPDATE ${MBEDTLS_LOGGING}
|
||||||
|
LOG_PATCH ${MBEDTLS_LOGGING}
|
||||||
|
LOG_CONFIGURE ${MBEDTLS_LOGGING}
|
||||||
|
LOG_BUILD ${MBEDTLS_LOGGING}
|
||||||
|
LOG_INSTALL ${MBEDTLS_LOGGING}
|
||||||
|
LOG_TEST ${MBEDTLS_LOGGING}
|
||||||
|
LOG_MERGED_STDOUTERR ${MBEDTLS_LOGGING}
|
||||||
|
LOG_OUTPUT_ON_FAILURE ${MBEDTLS_LOGGING}
|
||||||
|
)
|
||||||
|
|
||||||
if(${CMAKE_BUILD_TYPE} AND ${CMAKE_BUILD_TYPE} EQUAL "Debug")
|
if (CMAKE_VERSION VERSION_LESS 3.14)
|
||||||
message(STATUS "mbedtls libraries: ${MBEDTLS_LIBRARIES}")
|
macro (FetchContent_MakeAvailable NAME)
|
||||||
endif ()
|
FetchContent_GetProperties(${NAME})
|
||||||
|
if (NOT ${NAME}_POPULATED)
|
||||||
|
FetchContent_Populate(${NAME})
|
||||||
|
add_subdirectory(${${NAME}_SOURCE_DIR} ${${NAME}_BINARY_DIR})
|
||||||
|
endif ()
|
||||||
|
endmacro ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
mark_as_advanced (MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARIES MBEDTLS_SSL_LIBRARY MBEDTLS_X509_LIBRARY MBEDTLS_CRYPTO_LIBRARY)
|
FetchContent_MakeAvailable(mbedtls)
|
||||||
|
else ()
|
||||||
|
set(ENABLE_MBEDTLS_FETCH_CONTENT OFF PARENT_SCOPE)
|
||||||
|
if(NOT DEFINED BUILD_MBEDTLS_ONCE)
|
||||||
|
set(BUILD_MBEDTLS_ONCE CACHE INTERNAL "Done")
|
||||||
|
configure_file(${CMAKE_SOURCE_DIR}/dependencies/CMakeLists-mbedtls.txt.in ${MBEDTLS_DOWNLOAD_DIR}/CMakeLists.txt @ONLY)
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX:PATH=${MBEDTLS_INSTALL_DIR} -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -G "${CMAKE_GENERATOR}" . WORKING_DIRECTORY ${MBEDTLS_DOWNLOAD_DIR})
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} --build . WORKING_DIRECTORY ${MBEDTLS_DOWNLOAD_DIR})
|
||||||
|
add_subdirectory(${MBEDTLS_SOURCE_DIR} ${MBEDTLS_BINARY_DIR})
|
||||||
|
endif()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
set (MBEDTLS_INCLUDE_DIR "${MBEDTLS_SOURCE_DIR}/include")
|
||||||
|
set (MBEDTLS_INCLUDE_DIR ${MBEDTLS_INCLUDE_DIR} PARENT_SCOPE)
|
||||||
|
if (MBEDTLS_INCLUDE_DIR)
|
||||||
|
if (EXISTS "${MBEDTLS_INCLUDE_DIR}/mbedtls/build_info.h")
|
||||||
|
file(STRINGS ${MBEDTLS_INCLUDE_DIR}/mbedtls/build_info.h _MBEDTLS_VERSION_LINE REGEX "^#define[ \t]+MBEDTLS_VERSION_STRING[\t ].*")
|
||||||
|
string(REGEX REPLACE ".*MBEDTLS_VERSION_STRING[\t ]+\"(.*)\"" "\\1" MBEDTLS_VERSION ${_MBEDTLS_VERSION_LINE})
|
||||||
|
set (MBEDTLS_VERSION ${MBEDTLS_VERSION} PARENT_SCOPE)
|
||||||
|
message(STATUS "Using static mbedtls libraries (build version \"${MBEDTLS_VERSION}\")")
|
||||||
|
elseif(EXISTS "${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h")
|
||||||
|
file(STRINGS "${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h" _MBEDTLS_VERSION_STRING REGEX "^#[\t ]*define[\t ]+MBEDTLS_VERSION_STRING[\t ]+\"[0-9]+.[0-9]+.[0-9]+\"")
|
||||||
|
string(REGEX REPLACE "^.*MBEDTLS_VERSION_STRING.*([0-9]+.[0-9]+.[0-9]+).*" "\\1" MBEDTLS_VERSION "${_MBEDTLS_VERSION_STRING}")
|
||||||
|
set (MBEDTLS_VERSION ${MBEDTLS_VERSION} PARENT_SCOPE)
|
||||||
|
message(STATUS "Using static mbedtls libraries (build version \"${MBEDTLS_VERSION}\")")
|
||||||
|
endif()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
include_directories(${MBEDTLS_INCLUDE_DIR})
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
set (MBEDTLS_LIB_INSTALL_DIR_WITH_LIB_PREFIX "${MBEDTLS_INSTALL_DIR}/lib/${CMAKE_CFG_INTDIR}/")
|
||||||
|
else()
|
||||||
|
set (MBEDTLS_LIB_INSTALL_DIR_WITH_LIB_PREFIX "${MBEDTLS_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
set (MBEDTLS_SSL_LIBRARY "${MBEDTLS_LIB_INSTALL_DIR_WITH_LIB_PREFIX}mbedtls${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||||
|
set (MBEDTLS_X509_LIBRARY "${MBEDTLS_LIB_INSTALL_DIR_WITH_LIB_PREFIX}mbedx509${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||||
|
set (MBEDTLS_CRYPTO_LIBRARY "${MBEDTLS_LIB_INSTALL_DIR_WITH_LIB_PREFIX}mbedcrypto${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||||
|
set (MBEDTLS_LIBRARIES ${MBEDTLS_SSL_LIBRARY} ${MBEDTLS_X509_LIBRARY} ${MBEDTLS_CRYPTO_LIBRARY})
|
||||||
|
set (MBEDTLS_LIBRARIES ${MBEDTLS_LIBRARIES} PARENT_SCOPE)
|
||||||
|
|
||||||
|
if(${CMAKE_BUILD_TYPE} AND ${CMAKE_BUILD_TYPE} EQUAL "Debug")
|
||||||
|
message(STATUS "mbedtls libraries: ${MBEDTLS_LIBRARIES}")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
mark_as_advanced (MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARIES MBEDTLS_SSL_LIBRARY MBEDTLS_X509_LIBRARY MBEDTLS_CRYPTO_LIBRARY)
|
||||||
|
|
||||||
|
endif (NOT USE_SYSTEM_MBEDTLS_LIBS)
|
||||||
|
endif(ENABLE_DEV_NETWORK)
|
||||||
|
|
||||||
endif (NOT USE_SYSTEM_MBEDTLS_LIBS)
|
|
||||||
|
@ -107,6 +107,7 @@ protected:
|
|||||||
///
|
///
|
||||||
void setVideoMode(VideoMode mode, hyperion::Components callerComp = hyperion::COMP_INVALID);
|
void setVideoMode(VideoMode mode, hyperion::Components callerComp = hyperion::COMP_INVALID);
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
///
|
///
|
||||||
/// @brief Set an effect
|
/// @brief Set an effect
|
||||||
/// @param dat The effect data
|
/// @param dat The effect data
|
||||||
@ -115,6 +116,7 @@ protected:
|
|||||||
/// @return True on success else false
|
/// @return True on success else false
|
||||||
///
|
///
|
||||||
bool setEffect(const EffectCmdData &dat, hyperion::Components callerComp = hyperion::COMP_INVALID);
|
bool setEffect(const EffectCmdData &dat, hyperion::Components callerComp = hyperion::COMP_INVALID);
|
||||||
|
#endif
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Set source auto select enabled or disabled
|
/// @brief Set source auto select enabled or disabled
|
||||||
@ -213,6 +215,7 @@ protected:
|
|||||||
///
|
///
|
||||||
QString setInstanceName(quint8 index, const QString &name);
|
QString setInstanceName(quint8 index, const QString &name);
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
///
|
///
|
||||||
/// @brief Delete an effect. Requires ADMIN ACCESS
|
/// @brief Delete an effect. Requires ADMIN ACCESS
|
||||||
/// @param name The effect name
|
/// @param name The effect name
|
||||||
@ -226,6 +229,7 @@ protected:
|
|||||||
/// @return True on success else false
|
/// @return True on success else false
|
||||||
///
|
///
|
||||||
QString saveEffect(const QJsonObject &data);
|
QString saveEffect(const QJsonObject &data);
|
||||||
|
#endif
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Save settings object. Requires ADMIN ACCESS
|
/// @brief Save settings object. Requires ADMIN ACCESS
|
||||||
|
@ -148,6 +148,7 @@ private:
|
|||||||
///
|
///
|
||||||
void handleImageCommand(const QJsonObject &message, const QString &command, int tan);
|
void handleImageCommand(const QJsonObject &message, const QString &command, int tan);
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
///
|
///
|
||||||
/// Handle an incoming JSON Effect message
|
/// Handle an incoming JSON Effect message
|
||||||
///
|
///
|
||||||
@ -168,6 +169,7 @@ private:
|
|||||||
/// @param message the incoming message
|
/// @param message the incoming message
|
||||||
///
|
///
|
||||||
void handleDeleteEffectCommand(const QJsonObject &message, const QString &command, int tan);
|
void handleDeleteEffectCommand(const QJsonObject &message, const QString &command, int tan);
|
||||||
|
#endif
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Handle an incoming JSON System info message
|
/// Handle an incoming JSON System info message
|
||||||
|
@ -99,10 +99,12 @@ private slots:
|
|||||||
///
|
///
|
||||||
void handleVideoModeChange(VideoMode mode);
|
void handleVideoModeChange(VideoMode mode);
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
///
|
///
|
||||||
/// @brief Handle effect list change
|
/// @brief Handle effect list change
|
||||||
///
|
///
|
||||||
void handleEffectListChange();
|
void handleEffectListChange();
|
||||||
|
#endif
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Handle a config part change. This does NOT include (global) changes from other hyperion instances
|
/// @brief Handle a config part change. This does NOT include (global) changes from other hyperion instances
|
||||||
|
@ -22,8 +22,6 @@ class Effect : public QThread
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static const int ENDLESS;
|
|
||||||
|
|
||||||
friend class EffectModule;
|
friend class EffectModule;
|
||||||
|
|
||||||
Effect(Hyperion *hyperion
|
Effect(Hyperion *hyperion
|
||||||
|
@ -70,13 +70,13 @@ signals:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
/// Run the specified effect on the given priority channel and optionally specify a timeout
|
/// Run the specified effect on the given priority channel and optionally specify a timeout
|
||||||
int runEffect(const QString &effectName, int priority, int timeout = Effect::ENDLESS, const QString &origin="System");
|
int runEffect(const QString &effectName, int priority, int timeout = PriorityMuxer::ENDLESS, const QString &origin="System");
|
||||||
|
|
||||||
/// Run the specified effect on the given priority channel and optionally specify a timeout
|
/// Run the specified effect on the given priority channel and optionally specify a timeout
|
||||||
int runEffect(const QString &effectName
|
int runEffect(const QString &effectName
|
||||||
, const QJsonObject &args
|
, const QJsonObject &args
|
||||||
, int priority
|
, int priority
|
||||||
, int timeout = Effect::ENDLESS
|
, int timeout = PriorityMuxer::ENDLESS
|
||||||
, const QString &pythonScript = ""
|
, const QString &pythonScript = ""
|
||||||
, const QString &origin = "System"
|
, const QString &origin = "System"
|
||||||
, unsigned smoothCfg=0
|
, unsigned smoothCfg=0
|
||||||
@ -103,7 +103,7 @@ private:
|
|||||||
,const QString &name
|
,const QString &name
|
||||||
, const QJsonObject &args
|
, const QJsonObject &args
|
||||||
, int priority
|
, int priority
|
||||||
, int timeout = Effect::ENDLESS
|
, int timeout = PriorityMuxer::ENDLESS
|
||||||
, const QString &origin="System"
|
, const QString &origin="System"
|
||||||
, unsigned smoothCfg=0
|
, unsigned smoothCfg=0
|
||||||
, const QString &imageData = ""
|
, const QString &imageData = ""
|
||||||
|
@ -55,8 +55,12 @@ private slots:
|
|||||||
{
|
{
|
||||||
_isBgEffectConfigured = true;
|
_isBgEffectConfigured = true;
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
const QString bgTypeConfig = BGEffectConfig["type"].toString("effect");
|
const QString bgTypeConfig = BGEffectConfig["type"].toString("effect");
|
||||||
const QString bgEffectConfig = BGEffectConfig["effect"].toString("Warm mood blobs");
|
const QString bgEffectConfig = BGEffectConfig["effect"].toString("Warm mood blobs");
|
||||||
|
#else
|
||||||
|
const QString bgTypeConfig = "color";
|
||||||
|
#endif
|
||||||
const QJsonValue bgColorConfig = BGEffectConfig["color"];
|
const QJsonValue bgColorConfig = BGEffectConfig["color"];
|
||||||
if (bgTypeConfig.contains("color"))
|
if (bgTypeConfig.contains("color"))
|
||||||
{
|
{
|
||||||
@ -70,11 +74,13 @@ private slots:
|
|||||||
_hyperion->setColor(PriorityMuxer::BG_PRIORITY, bg_color);
|
_hyperion->setColor(PriorityMuxer::BG_PRIORITY, bg_color);
|
||||||
Info(Logger::getInstance("HYPERION"),"Initial background color set (%d %d %d)",bg_color.at(0).red, bg_color.at(0).green, bg_color.at(0).blue);
|
Info(Logger::getInstance("HYPERION"),"Initial background color set (%d %d %d)",bg_color.at(0).red, bg_color.at(0).green, bg_color.at(0).blue);
|
||||||
}
|
}
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int result = _hyperion->setEffect(bgEffectConfig, PriorityMuxer::BG_PRIORITY, Effect::ENDLESS);
|
int result = _hyperion->setEffect(bgEffectConfig, PriorityMuxer::BG_PRIORITY, PriorityMuxer::ENDLESS);
|
||||||
Info(Logger::getInstance("HYPERION"),"Initial background effect '%s' %s", QSTRING_CSTR(bgEffectConfig), ((result == 0) ? "started" : "failed"));
|
Info(Logger::getInstance("HYPERION"),"Initial background effect '%s' %s", QSTRING_CSTR(bgEffectConfig), ((result == 0) ? "started" : "failed"));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#undef BGCONFIG_ARRAY
|
#undef BGCONFIG_ARRAY
|
||||||
}
|
}
|
||||||
|
@ -24,11 +24,13 @@
|
|||||||
#include <hyperion/ColorAdjustment.h>
|
#include <hyperion/ColorAdjustment.h>
|
||||||
#include <hyperion/ComponentRegister.h>
|
#include <hyperion/ComponentRegister.h>
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
// Effect engine includes
|
// Effect engine includes
|
||||||
#include <effectengine/EffectDefinition.h>
|
#include <effectengine/EffectDefinition.h>
|
||||||
#include <effectengine/Effect.h>
|
#include <effectengine/Effect.h>
|
||||||
#include <effectengine/ActiveEffectDefinition.h>
|
#include <effectengine/ActiveEffectDefinition.h>
|
||||||
#include <effectengine/EffectSchema.h>
|
#include <effectengine/EffectSchema.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <leddevice/LedDevice.h>
|
#include <leddevice/LedDevice.h>
|
||||||
|
|
||||||
@ -42,7 +44,9 @@ class ImageProcessor;
|
|||||||
class MessageForwarder;
|
class MessageForwarder;
|
||||||
#endif
|
#endif
|
||||||
class LinearColorSmoothing;
|
class LinearColorSmoothing;
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
class EffectEngine;
|
class EffectEngine;
|
||||||
|
#endif
|
||||||
class MultiColorAdjustment;
|
class MultiColorAdjustment;
|
||||||
class ColorAdjustment;
|
class ColorAdjustment;
|
||||||
class SettingsManager;
|
class SettingsManager;
|
||||||
@ -138,7 +142,7 @@ public slots:
|
|||||||
/// @param clearEffect Should be true when NOT called from an effect
|
/// @param clearEffect Should be true when NOT called from an effect
|
||||||
/// @return True on success, false when priority is not found
|
/// @return True on success, false when priority is not found
|
||||||
///
|
///
|
||||||
bool setInput(int priority, const std::vector<ColorRgb>& ledColors, int timeout_ms = -1, bool clearEffect = true);
|
bool setInput(int priority, const std::vector<ColorRgb>& ledColors, int timeout_ms = PriorityMuxer::ENDLESS, bool clearEffect = true);
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Update the current image of a priority (prev registered with registerInput())
|
/// @brief Update the current image of a priority (prev registered with registerInput())
|
||||||
@ -149,7 +153,7 @@ public slots:
|
|||||||
/// @param clearEffect Should be true when NOT called from an effect
|
/// @param clearEffect Should be true when NOT called from an effect
|
||||||
/// @return True on success, false when priority is not found
|
/// @return True on success, false when priority is not found
|
||||||
///
|
///
|
||||||
bool setInputImage(int priority, const Image<ColorRgb>& image, int64_t timeout_ms = -1, bool clearEffect = true);
|
bool setInputImage(int priority, const Image<ColorRgb>& image, int64_t timeout_ms = PriorityMuxer::ENDLESS, bool clearEffect = true);
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Writes a single color to all the leds for the given time and priority
|
/// Writes a single color to all the leds for the given time and priority
|
||||||
@ -162,7 +166,7 @@ public slots:
|
|||||||
/// @param[in] origin The setter
|
/// @param[in] origin The setter
|
||||||
/// @param clearEffect Should be true when NOT called from an effect
|
/// @param clearEffect Should be true when NOT called from an effect
|
||||||
///
|
///
|
||||||
void setColor(int priority, const std::vector<ColorRgb> &ledColors, int timeout_ms = -1, const QString& origin = "System" ,bool clearEffects = true);
|
void setColor(int priority, const std::vector<ColorRgb> &ledColors, int timeout_ms = PriorityMuxer::ENDLESS, const QString& origin = "System" ,bool clearEffects = true);
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Set the given priority to inactive
|
/// @brief Set the given priority to inactive
|
||||||
@ -196,14 +200,15 @@ public slots:
|
|||||||
///
|
///
|
||||||
bool clear(int priority, bool forceClearAll=false);
|
bool clear(int priority, bool forceClearAll=false);
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
/// #############
|
/// #############
|
||||||
/// EFFECTENGINE
|
/// EFFECTENGINE
|
||||||
///
|
///
|
||||||
/// @brief Get a pointer to the effect engine
|
/// @brief Get a pointer to the effect engine
|
||||||
/// @return EffectEngine instance pointer
|
/// @return EffectEngine instance pointer
|
||||||
///
|
///
|
||||||
|
|
||||||
EffectEngine* getEffectEngineInstance() const { return _effectEngine; }
|
EffectEngine* getEffectEngineInstance() const { return _effectEngine; }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Save an effect
|
/// @brief Save an effect
|
||||||
/// @param obj The effect args
|
/// @param obj The effect args
|
||||||
@ -222,7 +227,7 @@ public slots:
|
|||||||
/// @param effectName Name of the effec to run
|
/// @param effectName Name of the effec to run
|
||||||
/// @param priority The priority channel of the effect
|
/// @param priority The priority channel of the effect
|
||||||
/// @param timeout The timeout of the effect (after the timout, the effect will be cleared)
|
/// @param timeout The timeout of the effect (after the timout, the effect will be cleared)
|
||||||
int setEffect(const QString & effectName, int priority, int timeout = Effect::ENDLESS, const QString & origin="System");
|
int setEffect(const QString & effectName, int priority, int timeout = PriorityMuxer::ENDLESS, const QString & origin="System");
|
||||||
|
|
||||||
/// Run the specified effect on the given priority channel and optionally specify a timeout
|
/// Run the specified effect on the given priority channel and optionally specify a timeout
|
||||||
/// @param effectName Name of the effec to run
|
/// @param effectName Name of the effec to run
|
||||||
@ -232,7 +237,7 @@ public slots:
|
|||||||
int setEffect(const QString &effectName
|
int setEffect(const QString &effectName
|
||||||
, const QJsonObject &args
|
, const QJsonObject &args
|
||||||
, int priority
|
, int priority
|
||||||
, int timeout = Effect::ENDLESS
|
, int timeout = PriorityMuxer::ENDLESS
|
||||||
, const QString &pythonScript = ""
|
, const QString &pythonScript = ""
|
||||||
, const QString &origin="System"
|
, const QString &origin="System"
|
||||||
, const QString &imageData = ""
|
, const QString &imageData = ""
|
||||||
@ -249,6 +254,7 @@ public slots:
|
|||||||
/// Get the list of available effect schema files
|
/// Get the list of available effect schema files
|
||||||
/// @return The list of available effect schema files
|
/// @return The list of available effect schema files
|
||||||
std::list<EffectSchema> getEffectSchemas() const;
|
std::list<EffectSchema> getEffectSchemas() const;
|
||||||
|
#endif
|
||||||
|
|
||||||
/// #############
|
/// #############
|
||||||
/// PRIORITYMUXER
|
/// PRIORITYMUXER
|
||||||
@ -444,10 +450,12 @@ signals:
|
|||||||
///
|
///
|
||||||
void adjustmentChanged();
|
void adjustmentChanged();
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
///
|
///
|
||||||
/// @brief Signal pipe from EffectEngine to external, emits when effect list has been updated
|
/// @brief Signal pipe from EffectEngine to external, emits when effect list has been updated
|
||||||
///
|
///
|
||||||
void effectListUpdated();
|
void effectListUpdated();
|
||||||
|
#endif
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Emits whenever new data should be pushed to the LedDeviceWrapper which forwards it to the threaded LedDevice
|
/// @brief Emits whenever new data should be pushed to the LedDeviceWrapper which forwards it to the threaded LedDevice
|
||||||
@ -533,8 +541,10 @@ private:
|
|||||||
/// The smoothing LedDevice
|
/// The smoothing LedDevice
|
||||||
LinearColorSmoothing * _deviceSmooth;
|
LinearColorSmoothing * _deviceSmooth;
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
/// Effect engine
|
/// Effect engine
|
||||||
EffectEngine * _effectEngine;
|
EffectEngine * _effectEngine;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(ENABLE_FORWARDER)
|
#if defined(ENABLE_FORWARDER)
|
||||||
// Message forwarder
|
// Message forwarder
|
||||||
|
@ -63,6 +63,8 @@ public:
|
|||||||
/// Timeout used to identify a non active priority
|
/// Timeout used to identify a non active priority
|
||||||
const static int TIMEOUT_NOT_ACTIVE_PRIO;
|
const static int TIMEOUT_NOT_ACTIVE_PRIO;
|
||||||
|
|
||||||
|
const static int ENDLESS;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Constructs the PriorityMuxer for the given number of LEDs (used to switch to black when
|
/// Constructs the PriorityMuxer for the given number of LEDs (used to switch to black when
|
||||||
/// there are no priority channels
|
/// there are no priority channels
|
||||||
@ -164,7 +166,7 @@ public:
|
|||||||
/// @param timeout_ms The new timeout (defaults to -1 endless)
|
/// @param timeout_ms The new timeout (defaults to -1 endless)
|
||||||
/// @return True on success, false when priority is not found
|
/// @return True on success, false when priority is not found
|
||||||
///
|
///
|
||||||
bool setInput(int priority, const std::vector<ColorRgb>& ledColors, int64_t timeout_ms = -1);
|
bool setInput(int priority, const std::vector<ColorRgb>& ledColors, int64_t timeout_ms = ENDLESS);
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Update the current image of a priority (prev registered with registerInput())
|
/// @brief Update the current image of a priority (prev registered with registerInput())
|
||||||
@ -173,7 +175,7 @@ public:
|
|||||||
/// @param timeout_ms The new timeout (defaults to -1 endless)
|
/// @param timeout_ms The new timeout (defaults to -1 endless)
|
||||||
/// @return True on success, false when priority is not found
|
/// @return True on success, false when priority is not found
|
||||||
///
|
///
|
||||||
bool setInputImage(int priority, const Image<ColorRgb>& image, int64_t timeout_ms = -1);
|
bool setInputImage(int priority, const Image<ColorRgb>& image, int64_t timeout_ms = ENDLESS);
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Set the given priority to inactive
|
/// @brief Set the given priority to inactive
|
||||||
@ -220,7 +222,7 @@ signals:
|
|||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Emits whenever something changes which influences the priorities listing
|
/// @brief Emits whenever something changes which influences the priorities listing
|
||||||
/// Emits also in 1s interval when a COLOR or EFFECT is running with a timeout > -1
|
/// Emits also in 1s interval when a COLOR or EFFECT is running with a timeout > -1 (endless)
|
||||||
///
|
///
|
||||||
void prioritiesChanged();
|
void prioritiesChanged();
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
#include "HyperionConfig.h"
|
||||||
|
|
||||||
class SysInfo : public QObject
|
class SysInfo : public QObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -24,7 +26,9 @@ public:
|
|||||||
QString domainName;
|
QString domainName;
|
||||||
bool isUserAdmin;
|
bool isUserAdmin;
|
||||||
QString qtVersion;
|
QString qtVersion;
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
QString pyVersion;
|
QString pyVersion;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
static HyperionSysInfo get();
|
static HyperionSysInfo get();
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
// fg effect
|
// fg effect
|
||||||
#include <hyperion/Hyperion.h>
|
#include <hyperion/Hyperion.h>
|
||||||
#include <hyperion/PriorityMuxer.h>
|
#include <hyperion/PriorityMuxer.h>
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
#include <effectengine/Effect.h>
|
#include <effectengine/Effect.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Provide utility methods for Hyperion class
|
/// @brief Provide utility methods for Hyperion class
|
||||||
@ -24,12 +26,16 @@ namespace hyperion {
|
|||||||
// initial foreground effect/color
|
// initial foreground effect/color
|
||||||
if (FGEffectConfig["enable"].toBool(true))
|
if (FGEffectConfig["enable"].toBool(true))
|
||||||
{
|
{
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
const QString fgTypeConfig = FGEffectConfig["type"].toString("effect");
|
const QString fgTypeConfig = FGEffectConfig["type"].toString("effect");
|
||||||
const QString fgEffectConfig = FGEffectConfig["effect"].toString("Rainbow swirl fast");
|
const QString fgEffectConfig = FGEffectConfig["effect"].toString("Rainbow swirl fast");
|
||||||
|
#else
|
||||||
|
const QString fgTypeConfig = "color";
|
||||||
|
#endif
|
||||||
const QJsonValue fgColorConfig = FGEffectConfig["color"];
|
const QJsonValue fgColorConfig = FGEffectConfig["color"];
|
||||||
int default_fg_duration_ms = 3000;
|
int default_fg_duration_ms = 3000;
|
||||||
int fg_duration_ms = FGEffectConfig["duration_ms"].toInt(default_fg_duration_ms);
|
int fg_duration_ms = FGEffectConfig["duration_ms"].toInt(default_fg_duration_ms);
|
||||||
if (fg_duration_ms <= Effect::ENDLESS)
|
if (fg_duration_ms <= PriorityMuxer::ENDLESS )
|
||||||
{
|
{
|
||||||
fg_duration_ms = default_fg_duration_ms;
|
fg_duration_ms = default_fg_duration_ms;
|
||||||
Warning(Logger::getInstance("HYPERION"), "foreground effect duration 'infinity' is forbidden, set to default value %d ms",default_fg_duration_ms);
|
Warning(Logger::getInstance("HYPERION"), "foreground effect duration 'infinity' is forbidden, set to default value %d ms",default_fg_duration_ms);
|
||||||
@ -46,11 +52,13 @@ namespace hyperion {
|
|||||||
hyperion->setColor(PriorityMuxer::FG_PRIORITY, fg_color, fg_duration_ms);
|
hyperion->setColor(PriorityMuxer::FG_PRIORITY, fg_color, fg_duration_ms);
|
||||||
Info(Logger::getInstance("HYPERION","I"+QString::number(hyperion->getInstanceIndex())),"Initial foreground color set (%d %d %d)",fg_color.at(0).red,fg_color.at(0).green,fg_color.at(0).blue);
|
Info(Logger::getInstance("HYPERION","I"+QString::number(hyperion->getInstanceIndex())),"Initial foreground color set (%d %d %d)",fg_color.at(0).red,fg_color.at(0).green,fg_color.at(0).blue);
|
||||||
}
|
}
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int result = hyperion->setEffect(fgEffectConfig, PriorityMuxer::FG_PRIORITY, fg_duration_ms);
|
int result = hyperion->setEffect(fgEffectConfig, PriorityMuxer::FG_PRIORITY, fg_duration_ms);
|
||||||
Info(Logger::getInstance("HYPERION","I"+QString::number(hyperion->getInstanceIndex())),"Initial foreground effect '%s' %s", QSTRING_CSTR(fgEffectConfig), ((result == 0) ? "started" : "failed"));
|
Info(Logger::getInstance("HYPERION","I"+QString::number(hyperion->getInstanceIndex())),"Initial foreground effect '%s' %s", QSTRING_CSTR(fgEffectConfig), ((result == 0) ? "started" : "failed"));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#undef FGCONFIG_ARRAY
|
#undef FGCONFIG_ARRAY
|
||||||
}
|
}
|
||||||
|
@ -26,18 +26,21 @@ endif()
|
|||||||
|
|
||||||
add_subdirectory(leddevice)
|
add_subdirectory(leddevice)
|
||||||
add_subdirectory(utils)
|
add_subdirectory(utils)
|
||||||
add_subdirectory(effectengine)
|
|
||||||
add_subdirectory(grabber)
|
add_subdirectory(grabber)
|
||||||
add_subdirectory(webserver)
|
add_subdirectory(webserver)
|
||||||
add_subdirectory(db)
|
add_subdirectory(db)
|
||||||
add_subdirectory(api)
|
add_subdirectory(api)
|
||||||
add_subdirectory(python)
|
|
||||||
|
|
||||||
add_subdirectory(ssdp)
|
add_subdirectory(ssdp)
|
||||||
|
|
||||||
if(ENABLE_AVAHI)
|
if(ENABLE_AVAHI)
|
||||||
add_subdirectory(bonjour)
|
add_subdirectory(bonjour)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_EFFECTENGINE)
|
||||||
|
add_subdirectory(effectengine)
|
||||||
|
add_subdirectory(python)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ENABLE_CEC)
|
if(ENABLE_CEC)
|
||||||
add_subdirectory(cec)
|
add_subdirectory(cec)
|
||||||
endif()
|
endif()
|
||||||
|
@ -224,6 +224,7 @@ void API::setVideoMode(VideoMode mode, hyperion::Components callerComp)
|
|||||||
QMetaObject::invokeMethod(_hyperion, "setVideoMode", Qt::QueuedConnection, Q_ARG(VideoMode, mode));
|
QMetaObject::invokeMethod(_hyperion, "setVideoMode", Qt::QueuedConnection, Q_ARG(VideoMode, mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
bool API::setEffect(const EffectCmdData &dat, hyperion::Components callerComp)
|
bool API::setEffect(const EffectCmdData &dat, hyperion::Components callerComp)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
@ -238,6 +239,7 @@ bool API::setEffect(const EffectCmdData &dat, hyperion::Components callerComp)
|
|||||||
|
|
||||||
return res >= 0;
|
return res >= 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void API::setSourceAutoSelect(bool state, hyperion::Components callerComp)
|
void API::setSourceAutoSelect(bool state, hyperion::Components callerComp)
|
||||||
{
|
{
|
||||||
@ -358,6 +360,7 @@ QString API::setInstanceName(quint8 index, const QString &name)
|
|||||||
return NO_AUTH;
|
return NO_AUTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
QString API::deleteEffect(const QString &name)
|
QString API::deleteEffect(const QString &name)
|
||||||
{
|
{
|
||||||
if (_adminAuthorized)
|
if (_adminAuthorized)
|
||||||
@ -379,6 +382,7 @@ QString API::saveEffect(const QJsonObject &data)
|
|||||||
}
|
}
|
||||||
return NO_AUTH;
|
return NO_AUTH;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool API::saveSettings(const QJsonObject &data)
|
bool API::saveSettings(const QJsonObject &data)
|
||||||
{
|
{
|
||||||
|
@ -185,12 +185,14 @@ proceed:
|
|||||||
handleColorCommand(message, command, tan);
|
handleColorCommand(message, command, tan);
|
||||||
else if (command == "image")
|
else if (command == "image")
|
||||||
handleImageCommand(message, command, tan);
|
handleImageCommand(message, command, tan);
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
else if (command == "effect")
|
else if (command == "effect")
|
||||||
handleEffectCommand(message, command, tan);
|
handleEffectCommand(message, command, tan);
|
||||||
else if (command == "create-effect")
|
else if (command == "create-effect")
|
||||||
handleCreateEffectCommand(message, command, tan);
|
handleCreateEffectCommand(message, command, tan);
|
||||||
else if (command == "delete-effect")
|
else if (command == "delete-effect")
|
||||||
handleDeleteEffectCommand(message, command, tan);
|
handleDeleteEffectCommand(message, command, tan);
|
||||||
|
#endif
|
||||||
else if (command == "sysinfo")
|
else if (command == "sysinfo")
|
||||||
handleSysInfoCommand(message, command, tan);
|
handleSysInfoCommand(message, command, tan);
|
||||||
else if (command == "serverinfo")
|
else if (command == "serverinfo")
|
||||||
@ -275,6 +277,7 @@ void JsonAPI::handleImageCommand(const QJsonObject &message, const QString &comm
|
|||||||
sendSuccessReply(command, tan);
|
sendSuccessReply(command, tan);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
void JsonAPI::handleEffectCommand(const QJsonObject &message, const QString &command, int tan)
|
void JsonAPI::handleEffectCommand(const QJsonObject &message, const QString &command, int tan)
|
||||||
{
|
{
|
||||||
emit forwardJsonMessage(message);
|
emit forwardJsonMessage(message);
|
||||||
@ -305,6 +308,7 @@ void JsonAPI::handleDeleteEffectCommand(const QJsonObject &message, const QStrin
|
|||||||
const QString res = API::deleteEffect(message["name"].toString());
|
const QString res = API::deleteEffect(message["name"].toString());
|
||||||
res.isEmpty() ? sendSuccessReply(command, tan) : sendErrorReply(res, command, tan);
|
res.isEmpty() ? sendSuccessReply(command, tan) : sendErrorReply(res, command, tan);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void JsonAPI::handleSysInfoCommand(const QJsonObject &, const QString &command, int tan)
|
void JsonAPI::handleSysInfoCommand(const QJsonObject &, const QString &command, int tan)
|
||||||
{
|
{
|
||||||
@ -332,7 +336,9 @@ void JsonAPI::handleSysInfoCommand(const QJsonObject &, const QString &command,
|
|||||||
system["domainName"] = data.domainName;
|
system["domainName"] = data.domainName;
|
||||||
system["isUserAdmin"] = data.isUserAdmin;
|
system["isUserAdmin"] = data.isUserAdmin;
|
||||||
system["qtVersion"] = data.qtVersion;
|
system["qtVersion"] = data.qtVersion;
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
system["pyVersion"] = data.pyVersion;
|
system["pyVersion"] = data.pyVersion;
|
||||||
|
#endif
|
||||||
info["system"] = system;
|
info["system"] = system;
|
||||||
|
|
||||||
QJsonObject hyperion;
|
QJsonObject hyperion;
|
||||||
@ -485,6 +491,7 @@ void JsonAPI::handleServerInfoCommand(const QJsonObject &message, const QString
|
|||||||
|
|
||||||
info["adjustment"] = adjustmentArray;
|
info["adjustment"] = adjustmentArray;
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
// collect effect info
|
// collect effect info
|
||||||
QJsonArray effects;
|
QJsonArray effects;
|
||||||
const std::list<EffectDefinition> &effectsDefinitions = _hyperion->getEffects();
|
const std::list<EffectDefinition> &effectsDefinitions = _hyperion->getEffects();
|
||||||
@ -499,6 +506,7 @@ void JsonAPI::handleServerInfoCommand(const QJsonObject &message, const QString
|
|||||||
}
|
}
|
||||||
|
|
||||||
info["effects"] = effects;
|
info["effects"] = effects;
|
||||||
|
#endif
|
||||||
|
|
||||||
// get available led devices
|
// get available led devices
|
||||||
QJsonObject ledDevices;
|
QJsonObject ledDevices;
|
||||||
@ -596,6 +604,10 @@ void JsonAPI::handleServerInfoCommand(const QJsonObject &message, const QString
|
|||||||
services.append("cec");
|
services.append("cec");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
|
services.append("effectengine");
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(ENABLE_FORWARDER)
|
#if defined(ENABLE_FORWARDER)
|
||||||
services.append("forwarder");
|
services.append("forwarder");
|
||||||
#endif
|
#endif
|
||||||
@ -701,6 +713,7 @@ void JsonAPI::handleServerInfoCommand(const QJsonObject &message, const QString
|
|||||||
}
|
}
|
||||||
info["transform"] = transformArray;
|
info["transform"] = transformArray;
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
// ACTIVE EFFECT INFO
|
// ACTIVE EFFECT INFO
|
||||||
QJsonArray activeEffects;
|
QJsonArray activeEffects;
|
||||||
for (const ActiveEffectDefinition &activeEffectDefinition : _hyperion->getActiveEffects())
|
for (const ActiveEffectDefinition &activeEffectDefinition : _hyperion->getActiveEffects())
|
||||||
@ -717,6 +730,7 @@ void JsonAPI::handleServerInfoCommand(const QJsonObject &message, const QString
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
info["activeEffects"] = activeEffects;
|
info["activeEffects"] = activeEffects;
|
||||||
|
#endif
|
||||||
|
|
||||||
// ACTIVE STATIC LED COLOR
|
// ACTIVE STATIC LED COLOR
|
||||||
QJsonArray activeLedColors;
|
QJsonArray activeLedColors;
|
||||||
@ -1036,6 +1050,7 @@ void JsonAPI::handleSchemaGetCommand(const QJsonObject &message, const QString &
|
|||||||
alldevices = LedDeviceWrapper::getLedDeviceSchemas();
|
alldevices = LedDeviceWrapper::getLedDeviceSchemas();
|
||||||
properties.insert("alldevices", alldevices);
|
properties.insert("alldevices", alldevices);
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
// collect all available effect schemas
|
// collect all available effect schemas
|
||||||
QJsonArray schemaList;
|
QJsonArray schemaList;
|
||||||
const std::list<EffectSchema>& effectsSchemas = _hyperion->getEffectSchemas();
|
const std::list<EffectSchema>& effectsSchemas = _hyperion->getEffectSchemas();
|
||||||
@ -1056,6 +1071,7 @@ void JsonAPI::handleSchemaGetCommand(const QJsonObject &message, const QString &
|
|||||||
schemaList.append(schema);
|
schemaList.append(schema);
|
||||||
}
|
}
|
||||||
properties.insert("effectSchemas", schemaList);
|
properties.insert("effectSchemas", schemaList);
|
||||||
|
#endif
|
||||||
|
|
||||||
schemaJson.insert("properties", properties);
|
schemaJson.insert("properties", properties);
|
||||||
|
|
||||||
|
@ -39,7 +39,11 @@ JsonCB::JsonCB(QObject* parent)
|
|||||||
, _prioMuxer(nullptr)
|
, _prioMuxer(nullptr)
|
||||||
{
|
{
|
||||||
_availableCommands << "components-update" << "sessions-update" << "priorities-update" << "imageToLedMapping-update"
|
_availableCommands << "components-update" << "sessions-update" << "priorities-update" << "imageToLedMapping-update"
|
||||||
<< "adjustment-update" << "videomode-update" << "effects-update" << "settings-update" << "leds-update" << "instance-update" << "token-update";
|
<< "adjustment-update" << "videomode-update" << "settings-update" << "leds-update" << "instance-update" << "token-update";
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
|
_availableCommands << "effects-update";
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool JsonCB::subscribeFor(const QString& type, bool unsubscribe)
|
bool JsonCB::subscribeFor(const QString& type, bool unsubscribe)
|
||||||
@ -102,6 +106,7 @@ bool JsonCB::subscribeFor(const QString& type, bool unsubscribe)
|
|||||||
connect(_hyperion, &Hyperion::newVideoMode, this, &JsonCB::handleVideoModeChange, Qt::UniqueConnection);
|
connect(_hyperion, &Hyperion::newVideoMode, this, &JsonCB::handleVideoModeChange, Qt::UniqueConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
if(type == "effects-update")
|
if(type == "effects-update")
|
||||||
{
|
{
|
||||||
if(unsubscribe)
|
if(unsubscribe)
|
||||||
@ -109,6 +114,7 @@ bool JsonCB::subscribeFor(const QString& type, bool unsubscribe)
|
|||||||
else
|
else
|
||||||
connect(_hyperion, &Hyperion::effectListUpdated, this, &JsonCB::handleEffectListChange, Qt::UniqueConnection);
|
connect(_hyperion, &Hyperion::effectListUpdated, this, &JsonCB::handleEffectListChange, Qt::UniqueConnection);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if(type == "settings-update")
|
if(type == "settings-update")
|
||||||
{
|
{
|
||||||
@ -367,6 +373,7 @@ void JsonCB::handleVideoModeChange(VideoMode mode)
|
|||||||
doCallback("videomode-update", QVariant(data));
|
doCallback("videomode-update", QVariant(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
void JsonCB::handleEffectListChange()
|
void JsonCB::handleEffectListChange()
|
||||||
{
|
{
|
||||||
QJsonArray effectList;
|
QJsonArray effectList;
|
||||||
@ -384,6 +391,7 @@ void JsonCB::handleEffectListChange()
|
|||||||
effects["effects"] = effectList;
|
effects["effects"] = effectList;
|
||||||
doCallback("effects-update", QVariant(effects));
|
doCallback("effects-update", QVariant(effects));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void JsonCB::handleSettingsChange(settings::type type, const QJsonDocument& data)
|
void JsonCB::handleSettingsChange(settings::type type, const QJsonDocument& data)
|
||||||
{
|
{
|
||||||
|
@ -8,18 +8,17 @@
|
|||||||
#include <effectengine/EffectModule.h>
|
#include <effectengine/EffectModule.h>
|
||||||
#include <utils/Logger.h>
|
#include <utils/Logger.h>
|
||||||
#include <hyperion/Hyperion.h>
|
#include <hyperion/Hyperion.h>
|
||||||
|
#include <hyperion/PriorityMuxer.h>
|
||||||
|
|
||||||
// python utils
|
// python utils
|
||||||
#include <python/PythonProgram.h>
|
#include <python/PythonProgram.h>
|
||||||
|
|
||||||
const int Effect::ENDLESS = -1;
|
|
||||||
|
|
||||||
Effect::Effect(Hyperion *hyperion, int priority, int timeout, const QString &script, const QString &name, const QJsonObject &args, const QString &imageData)
|
Effect::Effect(Hyperion *hyperion, int priority, int timeout, const QString &script, const QString &name, const QJsonObject &args, const QString &imageData)
|
||||||
: QThread()
|
: QThread()
|
||||||
, _hyperion(hyperion)
|
, _hyperion(hyperion)
|
||||||
, _priority(priority)
|
, _priority(priority)
|
||||||
, _timeout(timeout)
|
, _timeout(timeout)
|
||||||
, _isEndless(timeout <= ENDLESS)
|
, _isEndless(timeout <= PriorityMuxer::ENDLESS)
|
||||||
, _script(script)
|
, _script(script)
|
||||||
, _name(name)
|
, _name(name)
|
||||||
, _args(args)
|
, _args(args)
|
||||||
|
@ -22,7 +22,6 @@ target_link_libraries(hyperion
|
|||||||
blackborder
|
blackborder
|
||||||
hyperion-utils
|
hyperion-utils
|
||||||
leddevice
|
leddevice
|
||||||
effectengine
|
|
||||||
database
|
database
|
||||||
${QT_LIBRARIES}
|
${QT_LIBRARIES}
|
||||||
)
|
)
|
||||||
@ -31,6 +30,10 @@ if(ENABLE_BOBLIGHT_SERVER)
|
|||||||
target_link_libraries(hyperion boblightserver)
|
target_link_libraries(hyperion boblightserver)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_EFFECTENGINE)
|
||||||
|
target_link_libraries(hyperion effectengine)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ENABLE_FLATBUF_SERVER)
|
if(ENABLE_FLATBUF_SERVER)
|
||||||
target_link_libraries(hyperion flatbufserver)
|
target_link_libraries(hyperion flatbufserver)
|
||||||
endif()
|
endif()
|
||||||
|
@ -28,8 +28,10 @@
|
|||||||
#include <hyperion/MultiColorAdjustment.h>
|
#include <hyperion/MultiColorAdjustment.h>
|
||||||
#include "LinearColorSmoothing.h"
|
#include "LinearColorSmoothing.h"
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
// effect engine includes
|
// effect engine includes
|
||||||
#include <effectengine/EffectEngine.h>
|
#include <effectengine/EffectEngine.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
// settingsManagaer
|
// settingsManagaer
|
||||||
#include <hyperion/SettingsManager.h>
|
#include <hyperion/SettingsManager.h>
|
||||||
@ -56,7 +58,9 @@ Hyperion::Hyperion(quint8 instance, bool readonlyMode)
|
|||||||
, _raw2ledAdjustment(hyperion::createLedColorsAdjustment(static_cast<int>(_ledString.leds().size()), getSetting(settings::COLOR).object()))
|
, _raw2ledAdjustment(hyperion::createLedColorsAdjustment(static_cast<int>(_ledString.leds().size()), getSetting(settings::COLOR).object()))
|
||||||
, _ledDeviceWrapper(nullptr)
|
, _ledDeviceWrapper(nullptr)
|
||||||
, _deviceSmooth(nullptr)
|
, _deviceSmooth(nullptr)
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
, _effectEngine(nullptr)
|
, _effectEngine(nullptr)
|
||||||
|
#endif
|
||||||
#if defined(ENABLE_FORWARDER)
|
#if defined(ENABLE_FORWARDER)
|
||||||
, _messageForwarder(nullptr)
|
, _messageForwarder(nullptr)
|
||||||
#endif
|
#endif
|
||||||
@ -148,10 +152,11 @@ void Hyperion::start()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
// create the effect engine; needs to be initialized after smoothing!
|
// create the effect engine; needs to be initialized after smoothing!
|
||||||
_effectEngine = new EffectEngine(this);
|
_effectEngine = new EffectEngine(this);
|
||||||
connect(_effectEngine, &EffectEngine::effectListUpdated, this, &Hyperion::effectListUpdated);
|
connect(_effectEngine, &EffectEngine::effectListUpdated, this, &Hyperion::effectListUpdated);
|
||||||
|
#endif
|
||||||
// initial startup effect
|
// initial startup effect
|
||||||
hyperion::handleInitialEffect(this, getSetting(settings::FGEFFECT).object());
|
hyperion::handleInitialEffect(this, getSetting(settings::FGEFFECT).object());
|
||||||
|
|
||||||
@ -197,7 +202,11 @@ void Hyperion::freeObjects()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
delete _captureCont;
|
delete _captureCont;
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
delete _effectEngine;
|
delete _effectEngine;
|
||||||
|
#endif
|
||||||
|
|
||||||
delete _raw2ledAdjustment;
|
delete _raw2ledAdjustment;
|
||||||
|
|
||||||
#if defined(ENABLE_FORWARDER)
|
#if defined(ENABLE_FORWARDER)
|
||||||
@ -233,8 +242,10 @@ void Hyperion::handleSettingsUpdate(settings::type type, const QJsonDocument& co
|
|||||||
{
|
{
|
||||||
const QJsonArray leds = config.array();
|
const QJsonArray leds = config.array();
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
// stop and cache all running effects, as effects depend heavily on LED-layout
|
// stop and cache all running effects, as effects depend heavily on LED-layout
|
||||||
_effectEngine->cacheRunningEffects();
|
_effectEngine->cacheRunningEffects();
|
||||||
|
#endif
|
||||||
|
|
||||||
// ledstring, img processor, muxer, ledGridSize (effect-engine image based effects), _ledBuffer and ByteOrder of ledstring
|
// ledstring, img processor, muxer, ledGridSize (effect-engine image based effects), _ledBuffer and ByteOrder of ledstring
|
||||||
_ledString = hyperion::createLedString(leds, hyperion::createColorOrder(getSetting(settings::DEVICE).object()));
|
_ledString = hyperion::createLedString(leds, hyperion::createColorOrder(getSetting(settings::DEVICE).object()));
|
||||||
@ -258,8 +269,10 @@ void Hyperion::handleSettingsUpdate(settings::type type, const QJsonDocument& co
|
|||||||
delete _raw2ledAdjustment;
|
delete _raw2ledAdjustment;
|
||||||
_raw2ledAdjustment = hyperion::createLedColorsAdjustment(static_cast<int>(_ledString.leds().size()), getSetting(settings::COLOR).object());
|
_raw2ledAdjustment = hyperion::createLedColorsAdjustment(static_cast<int>(_ledString.leds().size()), getSetting(settings::COLOR).object());
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
// start cached effects
|
// start cached effects
|
||||||
_effectEngine->startCachedEffects();
|
_effectEngine->startCachedEffects();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else if(type == settings::DEVICE)
|
else if(type == settings::DEVICE)
|
||||||
{
|
{
|
||||||
@ -370,11 +383,13 @@ bool Hyperion::setInput(int priority, const std::vector<ColorRgb>& ledColors, in
|
|||||||
{
|
{
|
||||||
if(_muxer->setInput(priority, ledColors, timeout_ms))
|
if(_muxer->setInput(priority, ledColors, timeout_ms))
|
||||||
{
|
{
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
// clear effect if this call does not come from an effect
|
// clear effect if this call does not come from an effect
|
||||||
if(clearEffect)
|
if(clearEffect)
|
||||||
{
|
{
|
||||||
_effectEngine->channelCleared(priority);
|
_effectEngine->channelCleared(priority);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// if this priority is visible, update immediately
|
// if this priority is visible, update immediately
|
||||||
if(priority == _muxer->getCurrentPriority())
|
if(priority == _muxer->getCurrentPriority())
|
||||||
@ -397,11 +412,13 @@ bool Hyperion::setInputImage(int priority, const Image<ColorRgb>& image, int64_t
|
|||||||
|
|
||||||
if(_muxer->setInputImage(priority, image, timeout_ms))
|
if(_muxer->setInputImage(priority, image, timeout_ms))
|
||||||
{
|
{
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
// clear effect if this call does not come from an effect
|
// clear effect if this call does not come from an effect
|
||||||
if(clearEffect)
|
if(clearEffect)
|
||||||
{
|
{
|
||||||
_effectEngine->channelCleared(priority);
|
_effectEngine->channelCleared(priority);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// if this priority is visible, update immediately
|
// if this priority is visible, update immediately
|
||||||
if(priority == _muxer->getCurrentPriority())
|
if(priority == _muxer->getCurrentPriority())
|
||||||
@ -421,11 +438,13 @@ bool Hyperion::setInputInactive(quint8 priority)
|
|||||||
|
|
||||||
void Hyperion::setColor(int priority, const std::vector<ColorRgb> &ledColors, int timeout_ms, const QString &origin, bool clearEffects)
|
void Hyperion::setColor(int priority, const std::vector<ColorRgb> &ledColors, int timeout_ms, const QString &origin, bool clearEffects)
|
||||||
{
|
{
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
// clear effect if this call does not come from an effect
|
// clear effect if this call does not come from an effect
|
||||||
if (clearEffects)
|
if (clearEffects)
|
||||||
{
|
{
|
||||||
_effectEngine->channelCleared(priority);
|
_effectEngine->channelCleared(priority);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// create full led vector from single/multiple colors
|
// create full led vector from single/multiple colors
|
||||||
size_t size = _ledString.leds().size();
|
size_t size = _ledString.leds().size();
|
||||||
@ -478,15 +497,20 @@ bool Hyperion::clear(int priority, bool forceClearAll)
|
|||||||
{
|
{
|
||||||
_muxer->clearAll(forceClearAll);
|
_muxer->clearAll(forceClearAll);
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
// send clearall signal to the effect engine
|
// send clearall signal to the effect engine
|
||||||
_effectEngine->allChannelsCleared();
|
_effectEngine->allChannelsCleared();
|
||||||
|
#endif
|
||||||
|
|
||||||
isCleared = true;
|
isCleared = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
// send clear signal to the effect engine
|
// send clear signal to the effect engine
|
||||||
// (outside the check so the effect gets cleared even when the effect is not sending colors)
|
// (outside the check so the effect gets cleared even when the effect is not sending colors)
|
||||||
_effectEngine->channelCleared(priority);
|
_effectEngine->channelCleared(priority);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (_muxer->clearInput(priority))
|
if (_muxer->clearInput(priority))
|
||||||
{
|
{
|
||||||
@ -516,6 +540,7 @@ Hyperion::InputInfo Hyperion::getPriorityInfo(int priority) const
|
|||||||
return _muxer->getInputInfo(priority);
|
return _muxer->getInputInfo(priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
QString Hyperion::saveEffect(const QJsonObject& obj)
|
QString Hyperion::saveEffect(const QJsonObject& obj)
|
||||||
{
|
{
|
||||||
return _effectEngine->saveEffect(obj);
|
return _effectEngine->saveEffect(obj);
|
||||||
@ -541,11 +566,6 @@ std::list<EffectSchema> Hyperion::getEffectSchemas() const
|
|||||||
return _effectEngine->getEffectSchemas();
|
return _effectEngine->getEffectSchemas();
|
||||||
}
|
}
|
||||||
|
|
||||||
QJsonObject Hyperion::getQJsonConfig() const
|
|
||||||
{
|
|
||||||
return _settingsManager->getSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
int Hyperion::setEffect(const QString &effectName, int priority, int timeout, const QString & origin)
|
int Hyperion::setEffect(const QString &effectName, int priority, int timeout, const QString & origin)
|
||||||
{
|
{
|
||||||
return _effectEngine->runEffect(effectName, priority, timeout, origin);
|
return _effectEngine->runEffect(effectName, priority, timeout, origin);
|
||||||
@ -555,6 +575,12 @@ int Hyperion::setEffect(const QString &effectName, const QJsonObject &args, int
|
|||||||
{
|
{
|
||||||
return _effectEngine->runEffect(effectName, args, priority, timeout, pythonScript, origin, 0, imageData);
|
return _effectEngine->runEffect(effectName, args, priority, timeout, pythonScript, origin, 0, imageData);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
QJsonObject Hyperion::getQJsonConfig() const
|
||||||
|
{
|
||||||
|
return _settingsManager->getSettings();
|
||||||
|
}
|
||||||
|
|
||||||
void Hyperion::setLedMappingType(int mappingType)
|
void Hyperion::setLedMappingType(int mappingType)
|
||||||
{
|
{
|
||||||
|
@ -17,6 +17,7 @@ const int PriorityMuxer::BG_PRIORITY = 254;
|
|||||||
const int PriorityMuxer::MANUAL_SELECTED_PRIORITY = 256;
|
const int PriorityMuxer::MANUAL_SELECTED_PRIORITY = 256;
|
||||||
const int PriorityMuxer::LOWEST_PRIORITY = std::numeric_limits<uint8_t>::max();
|
const int PriorityMuxer::LOWEST_PRIORITY = std::numeric_limits<uint8_t>::max();
|
||||||
const int PriorityMuxer::TIMEOUT_NOT_ACTIVE_PRIO = -100;
|
const int PriorityMuxer::TIMEOUT_NOT_ACTIVE_PRIO = -100;
|
||||||
|
const int PriorityMuxer::ENDLESS = -1;
|
||||||
|
|
||||||
PriorityMuxer::PriorityMuxer(int ledCount, QObject * parent)
|
PriorityMuxer::PriorityMuxer(int ledCount, QObject * parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
@ -37,7 +38,7 @@ PriorityMuxer::PriorityMuxer(int ledCount, QObject * parent)
|
|||||||
|
|
||||||
// init lowest priority info
|
// init lowest priority info
|
||||||
_lowestPriorityInfo.priority = PriorityMuxer::LOWEST_PRIORITY;
|
_lowestPriorityInfo.priority = PriorityMuxer::LOWEST_PRIORITY;
|
||||||
_lowestPriorityInfo.timeoutTime_ms = -1;
|
_lowestPriorityInfo.timeoutTime_ms = PriorityMuxer::ENDLESS;
|
||||||
_lowestPriorityInfo.ledColors = std::vector<ColorRgb>(ledCount, {0, 0, 0});
|
_lowestPriorityInfo.ledColors = std::vector<ColorRgb>(ledCount, {0, 0, 0});
|
||||||
_lowestPriorityInfo.componentId = hyperion::COMP_COLOR;
|
_lowestPriorityInfo.componentId = hyperion::COMP_COLOR;
|
||||||
_lowestPriorityInfo.origin = "System";
|
_lowestPriorityInfo.origin = "System";
|
||||||
@ -45,7 +46,7 @@ PriorityMuxer::PriorityMuxer(int ledCount, QObject * parent)
|
|||||||
|
|
||||||
_activeInputs[PriorityMuxer::LOWEST_PRIORITY] = _lowestPriorityInfo;
|
_activeInputs[PriorityMuxer::LOWEST_PRIORITY] = _lowestPriorityInfo;
|
||||||
|
|
||||||
// adapt to 1s interval for COLOR and EFFECT timeouts > -1
|
// adapt to 1s interval for COLOR and EFFECT timeouts > -1 (endless)
|
||||||
connect(_timer, &QTimer::timeout, this, &PriorityMuxer::timeTrigger);
|
connect(_timer, &QTimer::timeout, this, &PriorityMuxer::timeTrigger);
|
||||||
_timer->setSingleShot(true);
|
_timer->setSingleShot(true);
|
||||||
_blockTimer->setSingleShot(true);
|
_blockTimer->setSingleShot(true);
|
||||||
|
@ -3,7 +3,13 @@
|
|||||||
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/leddevice)
|
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/leddevice)
|
||||||
SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/leddevice)
|
SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/leddevice)
|
||||||
|
|
||||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Network SerialPort REQUIRED)
|
if ( ENABLE_DEV_NETWORK )
|
||||||
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Network REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if ( ENABLE_DEV_SERIAL )
|
||||||
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS SerialPort REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
dev_hid
|
dev_hid
|
||||||
@ -19,10 +25,6 @@ FILE ( GLOB Leddevice_SOURCES
|
|||||||
"${CURRENT_HEADER_DIR}/*.h"
|
"${CURRENT_HEADER_DIR}/*.h"
|
||||||
"${CURRENT_SOURCE_DIR}/*.h"
|
"${CURRENT_SOURCE_DIR}/*.h"
|
||||||
"${CURRENT_SOURCE_DIR}/*.cpp"
|
"${CURRENT_SOURCE_DIR}/*.cpp"
|
||||||
"${CURRENT_SOURCE_DIR}/dev_serial/*.h"
|
|
||||||
"${CURRENT_SOURCE_DIR}/dev_serial/*.cpp"
|
|
||||||
"${CURRENT_SOURCE_DIR}/dev_net/*.h"
|
|
||||||
"${CURRENT_SOURCE_DIR}/dev_net/*.cpp"
|
|
||||||
"${CURRENT_SOURCE_DIR}/dev_other/*.h"
|
"${CURRENT_SOURCE_DIR}/dev_other/*.h"
|
||||||
"${CURRENT_SOURCE_DIR}/dev_other/*.cpp"
|
"${CURRENT_SOURCE_DIR}/dev_other/*.cpp"
|
||||||
)
|
)
|
||||||
@ -32,7 +34,23 @@ if ( ENABLE_OSX OR WIN32 )
|
|||||||
list(REMOVE_ITEM Leddevice_SOURCES "${CURRENT_SOURCE_DIR}/dev_other/LedDevicePiBlaster.cpp")
|
list(REMOVE_ITEM Leddevice_SOURCES "${CURRENT_SOURCE_DIR}/dev_other/LedDevicePiBlaster.cpp")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if ( ENABLE_USB_HID )
|
if ( ENABLE_DEV_NETWORK )
|
||||||
|
FILE ( GLOB Leddevice_NETWORK_SOURCES "${CURRENT_SOURCE_DIR}/dev_net/*.h" "${CURRENT_SOURCE_DIR}/dev_net/*.cpp")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if ( ENABLE_DEV_SERIAL )
|
||||||
|
FILE ( GLOB Leddevice_SERIAL_SOURCES "${CURRENT_SOURCE_DIR}/dev_serial/*.h" "${CURRENT_SOURCE_DIR}/dev_serial/*.cpp")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if ( ENABLE_DEV_SPI )
|
||||||
|
FILE ( GLOB Leddevice_SPI_SOURCES "${CURRENT_SOURCE_DIR}/dev_spi/*.h" "${CURRENT_SOURCE_DIR}/dev_spi/*.cpp")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if ( ENABLE_DEV_TINKERFORGE )
|
||||||
|
FILE ( GLOB Leddevice_TINKER_SOURCES "${CURRENT_SOURCE_DIR}/dev_tinker/*.h" "${CURRENT_SOURCE_DIR}/dev_tinker/*.cpp")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if ( ENABLE_DEV_USB_HID )
|
||||||
find_package(libusb-1.0 REQUIRED)
|
find_package(libusb-1.0 REQUIRED)
|
||||||
include_directories(
|
include_directories(
|
||||||
${CMAKE_SOURCE_DIR}/include/hidapi
|
${CMAKE_SOURCE_DIR}/include/hidapi
|
||||||
@ -41,15 +59,7 @@ if ( ENABLE_USB_HID )
|
|||||||
FILE ( GLOB Leddevice_USB_HID_SOURCES "${CURRENT_SOURCE_DIR}/dev_hid/*.h" "${CURRENT_SOURCE_DIR}/dev_hid/*.cpp")
|
FILE ( GLOB Leddevice_USB_HID_SOURCES "${CURRENT_SOURCE_DIR}/dev_hid/*.h" "${CURRENT_SOURCE_DIR}/dev_hid/*.cpp")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if ( ENABLE_SPIDEV )
|
if ( ENABLE_DEV_WS281XPWM )
|
||||||
FILE ( GLOB Leddevice_SPI_SOURCES "${CURRENT_SOURCE_DIR}/dev_spi/*.h" "${CURRENT_SOURCE_DIR}/dev_spi/*.cpp")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if ( ENABLE_TINKERFORGE )
|
|
||||||
FILE ( GLOB Leddevice_TINKER_SOURCES "${CURRENT_SOURCE_DIR}/dev_tinker/*.h" "${CURRENT_SOURCE_DIR}/dev_tinker/*.cpp")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if ( ENABLE_WS281XPWM )
|
|
||||||
include_directories(../../dependencies/external/rpi_ws281x)
|
include_directories(../../dependencies/external/rpi_ws281x)
|
||||||
FILE ( GLOB Leddevice_PWM_SOURCES "${CURRENT_SOURCE_DIR}/dev_rpi_pwm/*.h" "${CURRENT_SOURCE_DIR}/dev_rpi_pwm/*.cpp")
|
FILE ( GLOB Leddevice_PWM_SOURCES "${CURRENT_SOURCE_DIR}/dev_rpi_pwm/*.h" "${CURRENT_SOURCE_DIR}/dev_rpi_pwm/*.cpp")
|
||||||
endif()
|
endif()
|
||||||
@ -59,10 +69,12 @@ set(LedDevice_RESOURCES ${CURRENT_SOURCE_DIR}/LedDeviceSchemas.qrc )
|
|||||||
SET( Leddevice_SOURCES
|
SET( Leddevice_SOURCES
|
||||||
${Leddevice_SOURCES}
|
${Leddevice_SOURCES}
|
||||||
${LedDevice_RESOURCES}
|
${LedDevice_RESOURCES}
|
||||||
${Leddevice_USB_HID_SOURCES}
|
${Leddevice_NETWORK_SOURCES}
|
||||||
${Leddevice_TINKER_SOURCES}
|
|
||||||
${Leddevice_SPI_SOURCES}
|
|
||||||
${Leddevice_PWM_SOURCES}
|
${Leddevice_PWM_SOURCES}
|
||||||
|
${Leddevice_SERIAL_SOURCES}
|
||||||
|
${Leddevice_SPI_SOURCES}
|
||||||
|
${Leddevice_TINKER_SOURCES}
|
||||||
|
${Leddevice_USB_HID_SOURCES}
|
||||||
)
|
)
|
||||||
|
|
||||||
# auto generate header file that include all available leddevice headers
|
# auto generate header file that include all available leddevice headers
|
||||||
@ -86,24 +98,42 @@ target_link_libraries(leddevice
|
|||||||
hyperion
|
hyperion
|
||||||
hyperion-utils
|
hyperion-utils
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
${CMAKE_THREAD_LIBS_INIT}
|
||||||
Qt${QT_VERSION_MAJOR}::Network
|
|
||||||
Qt${QT_VERSION_MAJOR}::SerialPort
|
|
||||||
ssdp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_link_libraries(leddevice ws2_32)
|
target_link_libraries(leddevice ws2_32)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_TINKERFORGE)
|
if(ENABLE_DEV_NETWORK)
|
||||||
|
target_link_libraries(leddevice Qt${QT_VERSION_MAJOR}::Network ssdp)
|
||||||
|
|
||||||
|
if (NOT DEFAULT_USE_SYSTEM_MBEDTLS_LIBS)
|
||||||
|
if (MBEDTLS_LIBRARIES)
|
||||||
|
include_directories(${MBEDTLS_INCLUDE_DIR})
|
||||||
|
target_link_libraries(leddevice ${MBEDTLS_LIBRARIES})
|
||||||
|
target_include_directories(leddevice PRIVATE ${MBEDTLS_INCLUDE_DIR})
|
||||||
|
endif (MBEDTLS_LIBRARIES)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
string(REGEX MATCH "[0-9]+|-([A-Za-z0-9_.]+)" MBEDTLS_MAJOR ${MBEDTLS_VERSION})
|
||||||
|
if (MBEDTLS_MAJOR EQUAL "3")
|
||||||
|
target_compile_definitions(leddevice PRIVATE USE_MBEDTLS3)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_DEV_SERIAL)
|
||||||
|
target_link_libraries(leddevice Qt${QT_VERSION_MAJOR}::SerialPort)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_DEV_TINKERFORGE)
|
||||||
target_link_libraries(leddevice tinkerforge)
|
target_link_libraries(leddevice tinkerforge)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_WS281XPWM)
|
if(ENABLE_DEV_WS281XPWM)
|
||||||
target_link_libraries(leddevice ws281x)
|
target_link_libraries(leddevice ws281x)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ENABLE_USB_HID)
|
if (ENABLE_DEV_USB_HID)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
target_link_libraries(leddevice ${LIBUSB_1_LIBRARIES} hidapi-mac)
|
target_link_libraries(leddevice ${LIBUSB_1_LIBRARIES} hidapi-mac)
|
||||||
else()
|
else()
|
||||||
@ -111,15 +141,3 @@ if (ENABLE_USB_HID)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT DEFAULT_USE_SYSTEM_MBEDTLS_LIBS)
|
|
||||||
if (MBEDTLS_LIBRARIES)
|
|
||||||
include_directories(${MBEDTLS_INCLUDE_DIR})
|
|
||||||
target_link_libraries(leddevice ${MBEDTLS_LIBRARIES})
|
|
||||||
target_include_directories(leddevice PRIVATE ${MBEDTLS_INCLUDE_DIR})
|
|
||||||
endif (MBEDTLS_LIBRARIES)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
string(REGEX MATCH "[0-9]+|-([A-Za-z0-9_.]+)" MBEDTLS_MAJOR ${MBEDTLS_VERSION})
|
|
||||||
if (MBEDTLS_MAJOR EQUAL "3")
|
|
||||||
target_compile_definitions(leddevice PRIVATE USE_MBEDTLS3)
|
|
||||||
endif()
|
|
||||||
|
@ -1,15 +1,17 @@
|
|||||||
# Define the current source locations
|
# Define the current source locations
|
||||||
|
|
||||||
# Include the python directory. Also include the parent (which is for example /usr/include)
|
if(ENABLE_EFFECTENGINE)
|
||||||
# which may be required when it is not includes by the (cross-) compiler by default.
|
# Include the python directory. Also include the parent (which is for example /usr/include)
|
||||||
if (NOT CMAKE_VERSION VERSION_LESS "3.12")
|
# which may be required when it is not includes by the (cross-) compiler by default.
|
||||||
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
|
if (NOT CMAKE_VERSION VERSION_LESS "3.12")
|
||||||
include_directories(${Python3_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS}/..)
|
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
|
||||||
add_compile_definitions(PYTHON_VERSION_MAJOR_MINOR=${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR})
|
include_directories(${Python3_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS}/..)
|
||||||
else()
|
add_compile_definitions(PYTHON_VERSION_MAJOR_MINOR=${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR})
|
||||||
find_package (PythonLibs ${PYTHON_VERSION_STRING} EXACT) # Maps PythonLibs to the PythonInterp version of the main cmake
|
else()
|
||||||
include_directories(${PYTHON_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}/..)
|
find_package (PythonLibs ${PYTHON_VERSION_STRING} EXACT) # Maps PythonLibs to the PythonInterp version of the main cmake
|
||||||
add_definitions(-DPYTHON_VERSION_MAJOR_MINOR=${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
|
include_directories(${PYTHON_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}/..)
|
||||||
|
add_definitions(-DPYTHON_VERSION_MAJOR_MINOR=${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/utils)
|
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/utils)
|
||||||
@ -27,8 +29,11 @@ add_library(hyperion-utils
|
|||||||
|
|
||||||
target_link_libraries(hyperion-utils
|
target_link_libraries(hyperion-utils
|
||||||
hyperion
|
hyperion
|
||||||
python
|
|
||||||
Qt${QT_VERSION_MAJOR}::Core
|
Qt${QT_VERSION_MAJOR}::Core
|
||||||
Qt${QT_VERSION_MAJOR}::Gui
|
Qt${QT_VERSION_MAJOR}::Gui
|
||||||
Qt${QT_VERSION_MAJOR}::Network
|
Qt${QT_VERSION_MAJOR}::Network
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(ENABLE_EFFECTENGINE)
|
||||||
|
target_link_libraries(hyperion-utils python)
|
||||||
|
endif()
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
|
#include "HyperionConfig.h"
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
// Python includes
|
// Python includes
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "utils/SysInfo.h"
|
#include "utils/SysInfo.h"
|
||||||
#include "utils/FileUtils.h"
|
#include "utils/FileUtils.h"
|
||||||
@ -10,6 +14,9 @@
|
|||||||
#include <QRegularExpressionMatch>
|
#include <QRegularExpressionMatch>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#ifndef _WIN32
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <shlobj_core.h>
|
#include <shlobj_core.h>
|
||||||
@ -32,7 +39,9 @@ SysInfo::SysInfo()
|
|||||||
_sysinfo.isUserAdmin = isUserAdmin();
|
_sysinfo.isUserAdmin = isUserAdmin();
|
||||||
getCPUInfo();
|
getCPUInfo();
|
||||||
_sysinfo.qtVersion = QT_VERSION_STR;
|
_sysinfo.qtVersion = QT_VERSION_STR;
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
_sysinfo.pyVersion = PY_VERSION;
|
_sysinfo.pyVersion = PY_VERSION;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
SysInfo::HyperionSysInfo SysInfo::get()
|
SysInfo::HyperionSysInfo SysInfo::get()
|
||||||
|
@ -30,7 +30,6 @@ add_executable(${PROJECT_NAME}
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME}
|
||||||
effectengine
|
|
||||||
commandline
|
commandline
|
||||||
hyperion-utils
|
hyperion-utils
|
||||||
ssdp
|
ssdp
|
||||||
@ -45,6 +44,10 @@ if (ENABLE_AMLOGIC)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_EFFECTENGINE)
|
||||||
|
target_link_libraries(${PROJECT_NAME} effectengine)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
install ( TARGETS ${PROJECT_NAME} DESTINATION "." COMPONENT "hyperion_remote" )
|
install ( TARGETS ${PROJECT_NAME} DESTINATION "." COMPONENT "hyperion_remote" )
|
||||||
elseif(NOT WIN32)
|
elseif(NOT WIN32)
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
#include <QHostInfo>
|
#include <QHostInfo>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
|
#include "HyperionConfig.h"
|
||||||
|
|
||||||
// hyperion-remote includes
|
// hyperion-remote includes
|
||||||
#include "JsonConnection.h"
|
#include "JsonConnection.h"
|
||||||
|
|
||||||
@ -106,6 +108,7 @@ void JsonConnection::setImage(QImage &image, int priority, int duration)
|
|||||||
parseReply(reply);
|
parseReply(reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
void JsonConnection::setEffect(const QString &effectName, const QString & effectArgs, int priority, int duration)
|
void JsonConnection::setEffect(const QString &effectName, const QString & effectArgs, int priority, int duration)
|
||||||
{
|
{
|
||||||
Debug(_log, "Start effect: %s", QSTRING_CSTR(effectName));
|
Debug(_log, "Start effect: %s", QSTRING_CSTR(effectName));
|
||||||
@ -185,6 +188,7 @@ void JsonConnection::deleteEffect(const QString &effectName)
|
|||||||
// parse reply message
|
// parse reply message
|
||||||
parseReply(reply);
|
parseReply(reply);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QString JsonConnection::getServerInfoString()
|
QString JsonConnection::getServerInfoString()
|
||||||
{
|
{
|
||||||
|
@ -49,6 +49,7 @@ public:
|
|||||||
///
|
///
|
||||||
void setImage(QImage &image, int priority, int duration);
|
void setImage(QImage &image, int priority, int duration);
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
///
|
///
|
||||||
/// Start the given effect
|
/// Start the given effect
|
||||||
///
|
///
|
||||||
@ -74,6 +75,7 @@ public:
|
|||||||
/// @param effectName The name of the effect
|
/// @param effectName The name of the effect
|
||||||
///
|
///
|
||||||
void deleteEffect(const QString &effectName);
|
void deleteEffect(const QString &effectName);
|
||||||
|
#endif
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Retrieve entire serverinfo as String
|
/// Retrieve entire serverinfo as String
|
||||||
|
@ -100,11 +100,13 @@ int main(int argc, char * argv[])
|
|||||||
IntOption & argDuration = parser.add<IntOption> ('d', "duration" , "Specify how long the LEDs should be switched on in milliseconds [default: infinity]");
|
IntOption & argDuration = parser.add<IntOption> ('d', "duration" , "Specify how long the LEDs should be switched on in milliseconds [default: infinity]");
|
||||||
ColorsOption & argColor = parser.add<ColorsOption> ('c', "color" , "Set all LEDs to a constant color (either RRGGBB hex getColors or a color name. The color may be repeated multiple time like: RRGGBBRRGGBB)");
|
ColorsOption & argColor = parser.add<ColorsOption> ('c', "color" , "Set all LEDs to a constant color (either RRGGBB hex getColors or a color name. The color may be repeated multiple time like: RRGGBBRRGGBB)");
|
||||||
ImageOption & argImage = parser.add<ImageOption> ('i', "image" , "Set the LEDs to the colors according to the given image file");
|
ImageOption & argImage = parser.add<ImageOption> ('i', "image" , "Set the LEDs to the colors according to the given image file");
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
Option & argEffect = parser.add<Option> ('e', "effect" , "Enable the effect with the given name");
|
Option & argEffect = parser.add<Option> ('e', "effect" , "Enable the effect with the given name");
|
||||||
Option & argEffectFile = parser.add<Option> (0x0, "effectFile" , "Arguments to use in combination with --createEffect");
|
Option & argEffectFile = parser.add<Option> (0x0, "effectFile" , "Arguments to use in combination with --createEffect");
|
||||||
Option & argEffectArgs = parser.add<Option> (0x0, "effectArgs" , "Arguments to use in combination with the specified effect. Should be a JSON object string.", "");
|
Option & argEffectArgs = parser.add<Option> (0x0, "effectArgs" , "Arguments to use in combination with the specified effect. Should be a JSON object string.", "");
|
||||||
Option & argCreateEffect = parser.add<Option> (0x0, "createEffect" , "Write a new JSON Effect configuration file.\nFirst parameter = Effect name.\nSecond parameter = Effect file (--effectFile).\nLast parameter = Effect arguments (--effectArgs.)", "");
|
Option & argCreateEffect = parser.add<Option> (0x0, "createEffect" , "Write a new JSON Effect configuration file.\nFirst parameter = Effect name.\nSecond parameter = Effect file (--effectFile).\nLast parameter = Effect arguments (--effectArgs.)", "");
|
||||||
Option & argDeleteEffect = parser.add<Option> (0x0, "deleteEffect" , "Delete a custom created JSON Effect configuration file.");
|
Option & argDeleteEffect = parser.add<Option> (0x0, "deleteEffect" , "Delete a custom created JSON Effect configuration file.");
|
||||||
|
#endif
|
||||||
BooleanOption & argServerInfo = parser.add<BooleanOption>('l', "list" , "List server info and active effects with priority and duration");
|
BooleanOption & argServerInfo = parser.add<BooleanOption>('l', "list" , "List server info and active effects with priority and duration");
|
||||||
BooleanOption & argSysInfo = parser.add<BooleanOption>('s', "sysinfo" , "show system info");
|
BooleanOption & argSysInfo = parser.add<BooleanOption>('s', "sysinfo" , "show system info");
|
||||||
BooleanOption & argClear = parser.add<BooleanOption>('x', "clear" , "Clear data for the priority channel provided by the -p option");
|
BooleanOption & argClear = parser.add<BooleanOption>('x', "clear" , "Clear data for the priority channel provided by the -p option");
|
||||||
@ -160,7 +162,10 @@ int main(int argc, char * argv[])
|
|||||||
|| parser.isSet(argBacklightThreshold) || parser.isSet(argBacklightColored);
|
|| parser.isSet(argBacklightThreshold) || parser.isSet(argBacklightColored);
|
||||||
|
|
||||||
// check that exactly one command was given
|
// check that exactly one command was given
|
||||||
int commandCount = count({ parser.isSet(argColor), parser.isSet(argImage), parser.isSet(argEffect), parser.isSet(argCreateEffect), parser.isSet(argDeleteEffect),
|
int commandCount = count({ parser.isSet(argColor), parser.isSet(argImage),
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
|
parser.isSet(argEffect), parser.isSet(argCreateEffect), parser.isSet(argDeleteEffect),
|
||||||
|
#endif
|
||||||
parser.isSet(argServerInfo), parser.isSet(argSysInfo),parser.isSet(argClear), parser.isSet(argClearAll), parser.isSet(argEnableComponent), parser.isSet(argDisableComponent), colorAdjust,
|
parser.isSet(argServerInfo), parser.isSet(argSysInfo),parser.isSet(argClear), parser.isSet(argClearAll), parser.isSet(argEnableComponent), parser.isSet(argDisableComponent), colorAdjust,
|
||||||
parser.isSet(argSource), parser.isSet(argSourceAuto), parser.isSet(argOff), parser.isSet(argOn), parser.isSet(argConfigGet), parser.isSet(argSchemaGet), parser.isSet(argConfigSet),
|
parser.isSet(argSource), parser.isSet(argSourceAuto), parser.isSet(argOff), parser.isSet(argOn), parser.isSet(argConfigGet), parser.isSet(argSchemaGet), parser.isSet(argConfigSet),
|
||||||
parser.isSet(argMapping),parser.isSet(argVideoMode) });
|
parser.isSet(argMapping),parser.isSet(argVideoMode) });
|
||||||
@ -169,9 +174,11 @@ int main(int argc, char * argv[])
|
|||||||
qWarning() << (commandCount == 0 ? "No command found." : "Multiple commands found.") << " Provide exactly one of the following options:";
|
qWarning() << (commandCount == 0 ? "No command found." : "Multiple commands found.") << " Provide exactly one of the following options:";
|
||||||
showHelp(argColor);
|
showHelp(argColor);
|
||||||
showHelp(argImage);
|
showHelp(argImage);
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
showHelp(argEffect);
|
showHelp(argEffect);
|
||||||
showHelp(argCreateEffect);
|
showHelp(argCreateEffect);
|
||||||
showHelp(argDeleteEffect);
|
showHelp(argDeleteEffect);
|
||||||
|
#endif
|
||||||
showHelp(argServerInfo);
|
showHelp(argServerInfo);
|
||||||
showHelp(argSysInfo);
|
showHelp(argSysInfo);
|
||||||
showHelp(argClear);
|
showHelp(argClear);
|
||||||
@ -247,6 +254,7 @@ int main(int argc, char * argv[])
|
|||||||
{
|
{
|
||||||
connection.setImage(argImage.getImage(parser), argPriority.getInt(parser), argDuration.getInt(parser));
|
connection.setImage(argImage.getImage(parser), argPriority.getInt(parser), argDuration.getInt(parser));
|
||||||
}
|
}
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
else if (parser.isSet(argEffect))
|
else if (parser.isSet(argEffect))
|
||||||
{
|
{
|
||||||
connection.setEffect(argEffect.value(parser), argEffectArgs.value(parser), argPriority.getInt(parser), argDuration.getInt(parser));
|
connection.setEffect(argEffect.value(parser), argEffectArgs.value(parser), argPriority.getInt(parser), argDuration.getInt(parser));
|
||||||
@ -259,6 +267,7 @@ int main(int argc, char * argv[])
|
|||||||
{
|
{
|
||||||
connection.deleteEffect(argDeleteEffect.value(parser));
|
connection.deleteEffect(argDeleteEffect.value(parser));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (parser.isSet(argServerInfo))
|
else if (parser.isSet(argServerInfo))
|
||||||
{
|
{
|
||||||
std::cout << "Server info:\n" << connection.getServerInfoString().toStdString() << std::endl;
|
std::cout << "Server info:\n" << connection.getServerInfoString().toStdString() << std::endl;
|
||||||
|
@ -4,13 +4,15 @@ else()
|
|||||||
project(hyperiond)
|
project(hyperiond)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT CMAKE_VERSION VERSION_LESS "3.12")
|
if(ENABLE_EFFECTENGINE)
|
||||||
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
|
if (NOT CMAKE_VERSION VERSION_LESS "3.12")
|
||||||
include_directories(${Python3_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS}/..)
|
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
|
||||||
else()
|
include_directories(${Python3_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS}/..)
|
||||||
find_package (PythonLibs ${PYTHON_VERSION_STRING} EXACT) # Maps PythonLibs to the PythonInterp version of the main cmake
|
else()
|
||||||
include_directories(${PYTHON_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}/..)
|
find_package (PythonLibs ${PYTHON_VERSION_STRING} EXACT) # Maps PythonLibs to the PythonInterp version of the main cmake
|
||||||
endif()
|
include_directories(${PYTHON_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}/..)
|
||||||
|
endif()
|
||||||
|
endif ()
|
||||||
|
|
||||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Network Gui Widgets REQUIRED)
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Network Gui Widgets REQUIRED)
|
||||||
|
|
||||||
@ -47,12 +49,10 @@ endif(WIN32)
|
|||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME}
|
||||||
commandline
|
commandline
|
||||||
hyperion
|
hyperion
|
||||||
effectengine
|
|
||||||
jsonserver
|
jsonserver
|
||||||
webserver
|
webserver
|
||||||
ssdp
|
ssdp
|
||||||
database
|
database
|
||||||
python
|
|
||||||
resources
|
resources
|
||||||
Qt${QT_VERSION_MAJOR}::Core
|
Qt${QT_VERSION_MAJOR}::Core
|
||||||
Qt${QT_VERSION_MAJOR}::Gui
|
Qt${QT_VERSION_MAJOR}::Gui
|
||||||
@ -60,12 +60,15 @@ target_link_libraries(${PROJECT_NAME}
|
|||||||
Qt${QT_VERSION_MAJOR}::Widgets
|
Qt${QT_VERSION_MAJOR}::Widgets
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NOT CMAKE_VERSION VERSION_LESS "3.12")
|
if(ENABLE_EFFECTENGINE)
|
||||||
target_link_libraries( ${PROJECT_NAME} ${Python3_LIBRARIES} )
|
target_link_libraries(${PROJECT_NAME} effectengine python)
|
||||||
else()
|
|
||||||
target_link_libraries( ${PROJECT_NAME} ${PYTHON_LIBRARIES} )
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
if (NOT CMAKE_VERSION VERSION_LESS "3.12")
|
||||||
|
target_link_libraries( ${PROJECT_NAME} ${Python3_LIBRARIES} )
|
||||||
|
else()
|
||||||
|
target_link_libraries( ${PROJECT_NAME} ${PYTHON_LIBRARIES} )
|
||||||
|
endif()
|
||||||
|
endif ()
|
||||||
|
|
||||||
if(ENABLE_FLATBUF_SERVER)
|
if(ENABLE_FLATBUF_SERVER)
|
||||||
target_link_libraries(${PROJECT_NAME} flatbufserver)
|
target_link_libraries(${PROJECT_NAME} flatbufserver)
|
||||||
|
@ -53,11 +53,13 @@
|
|||||||
// NetOrigin checks
|
// NetOrigin checks
|
||||||
#include <utils/NetOrigin.h>
|
#include <utils/NetOrigin.h>
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
// Init Python
|
// Init Python
|
||||||
#include <python/PythonInit.h>
|
#include <python/PythonInit.h>
|
||||||
|
|
||||||
// EffectFileHandler
|
// EffectFileHandler
|
||||||
#include <effectengine/EffectFileHandler.h>
|
#include <effectengine/EffectFileHandler.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_CEC
|
#ifdef ENABLE_CEC
|
||||||
#include <cec/CECHandler.h>
|
#include <cec/CECHandler.h>
|
||||||
@ -73,7 +75,9 @@ HyperionDaemon::HyperionDaemon(const QString& rootPath, QObject* parent, bool lo
|
|||||||
, _bonjourBrowserWrapper(new BonjourBrowserWrapper())
|
, _bonjourBrowserWrapper(new BonjourBrowserWrapper())
|
||||||
#endif
|
#endif
|
||||||
, _netOrigin(new NetOrigin(this))
|
, _netOrigin(new NetOrigin(this))
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
, _pyInit(new PythonInit())
|
, _pyInit(new PythonInit())
|
||||||
|
#endif
|
||||||
, _webserver(nullptr)
|
, _webserver(nullptr)
|
||||||
, _sslWebserver(nullptr)
|
, _sslWebserver(nullptr)
|
||||||
, _jsonServer(nullptr)
|
, _jsonServer(nullptr)
|
||||||
@ -113,9 +117,11 @@ HyperionDaemon::HyperionDaemon(const QString& rootPath, QObject* parent, bool lo
|
|||||||
|
|
||||||
createCecHandler();
|
createCecHandler();
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
// init EffectFileHandler
|
// init EffectFileHandler
|
||||||
EffectFileHandler* efh = new EffectFileHandler(rootPath, getSetting(settings::EFFECTS), this);
|
EffectFileHandler* efh = new EffectFileHandler(rootPath, getSetting(settings::EFFECTS), this);
|
||||||
connect(this, &HyperionDaemon::settingsChanged, efh, &EffectFileHandler::handleSettingsUpdate);
|
connect(this, &HyperionDaemon::settingsChanged, efh, &EffectFileHandler::handleSettingsUpdate);
|
||||||
|
#endif
|
||||||
|
|
||||||
// connect and apply settings for AuthManager
|
// connect and apply settings for AuthManager
|
||||||
connect(this, &HyperionDaemon::settingsChanged, _authManager, &AuthManager::handleSettingsUpdate);
|
connect(this, &HyperionDaemon::settingsChanged, _authManager, &AuthManager::handleSettingsUpdate);
|
||||||
@ -160,7 +166,9 @@ HyperionDaemon::HyperionDaemon(const QString& rootPath, QObject* parent, bool lo
|
|||||||
HyperionDaemon::~HyperionDaemon()
|
HyperionDaemon::~HyperionDaemon()
|
||||||
{
|
{
|
||||||
delete _settingsManager;
|
delete _settingsManager;
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
delete _pyInit;
|
delete _pyInit;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void HyperionDaemon::setVideoMode(VideoMode mode)
|
void HyperionDaemon::setVideoMode(VideoMode mode)
|
||||||
|
@ -73,7 +73,9 @@ class JsonServer;
|
|||||||
class BonjourBrowserWrapper;
|
class BonjourBrowserWrapper;
|
||||||
class WebServer;
|
class WebServer;
|
||||||
class SettingsManager;
|
class SettingsManager;
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
class PythonInit;
|
class PythonInit;
|
||||||
|
#endif
|
||||||
class SSDPHandler;
|
class SSDPHandler;
|
||||||
class FlatBufferServer;
|
class FlatBufferServer;
|
||||||
class ProtoServer;
|
class ProtoServer;
|
||||||
@ -168,7 +170,9 @@ private:
|
|||||||
AuthManager* _authManager;
|
AuthManager* _authManager;
|
||||||
BonjourBrowserWrapper* _bonjourBrowserWrapper;
|
BonjourBrowserWrapper* _bonjourBrowserWrapper;
|
||||||
NetOrigin* _netOrigin;
|
NetOrigin* _netOrigin;
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
PythonInit* _pyInit;
|
PythonInit* _pyInit;
|
||||||
|
#endif
|
||||||
WebServer* _webserver;
|
WebServer* _webserver;
|
||||||
WebServer* _sslWebserver;
|
WebServer* _sslWebserver;
|
||||||
JsonServer* _jsonServer;
|
JsonServer* _jsonServer;
|
||||||
|
@ -192,7 +192,9 @@ int main(int argc, char** argv)
|
|||||||
#endif
|
#endif
|
||||||
parser.add<BooleanOption> (0x0, "desktop", "Show systray on desktop");
|
parser.add<BooleanOption> (0x0, "desktop", "Show systray on desktop");
|
||||||
parser.add<BooleanOption> (0x0, "service", "Force hyperion to start as console service");
|
parser.add<BooleanOption> (0x0, "service", "Force hyperion to start as console service");
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
Option & exportEfxOption = parser.add<Option> (0x0, "export-effects", "Export effects to given path");
|
Option & exportEfxOption = parser.add<Option> (0x0, "export-effects", "Export effects to given path");
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Internal options, invisible to help */
|
/* Internal options, invisible to help */
|
||||||
BooleanOption & waitOption = parser.addHidden<BooleanOption> (0x0, "wait-hyperion", "Do not exit if other Hyperion instances are running, wait them to finish");
|
BooleanOption & waitOption = parser.addHidden<BooleanOption> (0x0, "wait-hyperion", "Do not exit if other Hyperion instances are running, wait them to finish");
|
||||||
@ -275,6 +277,7 @@ int main(int argc, char** argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
if (parser.isSet(exportEfxOption))
|
if (parser.isSet(exportEfxOption))
|
||||||
{
|
{
|
||||||
Q_INIT_RESOURCE(EffectEngine);
|
Q_INIT_RESOURCE(EffectEngine);
|
||||||
@ -311,6 +314,7 @@ int main(int argc, char** argv)
|
|||||||
Error(log, "Can not export to %s",exportEfxOption.getCString(parser));
|
Error(log, "Can not export to %s",exportEfxOption.getCString(parser));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int rc = 1;
|
int rc = 1;
|
||||||
bool readonlyMode = false;
|
bool readonlyMode = false;
|
||||||
|
@ -15,8 +15,10 @@
|
|||||||
|
|
||||||
#include <utils/ColorRgb.h>
|
#include <utils/ColorRgb.h>
|
||||||
#include <utils/Process.h>
|
#include <utils/Process.h>
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
#include <effectengine/EffectDefinition.h>
|
#include <effectengine/EffectDefinition.h>
|
||||||
#include <effectengine/Effect.h>
|
#include <effectengine/Effect.h>
|
||||||
|
#endif
|
||||||
#include <webserver/WebServer.h>
|
#include <webserver/WebServer.h>
|
||||||
#include <hyperion/PriorityMuxer.h>
|
#include <hyperion/PriorityMuxer.h>
|
||||||
|
|
||||||
@ -91,8 +93,10 @@ void SysTray::createTrayIcon()
|
|||||||
clearAction->setIcon(QPixmap(":/clear.svg"));
|
clearAction->setIcon(QPixmap(":/clear.svg"));
|
||||||
connect(clearAction, &QAction::triggered, this, &SysTray::clearEfxColor);
|
connect(clearAction, &QAction::triggered, this, &SysTray::clearEfxColor);
|
||||||
|
|
||||||
const std::list<EffectDefinition> efxs = _hyperion->getEffects();
|
|
||||||
_trayIconMenu = new QMenu(this);
|
_trayIconMenu = new QMenu(this);
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
|
const std::list<EffectDefinition> efxs = _hyperion->getEffects();
|
||||||
_trayIconEfxMenu = new QMenu(_trayIconMenu);
|
_trayIconEfxMenu = new QMenu(_trayIconMenu);
|
||||||
_trayIconEfxMenu->setTitle(tr("Effects"));
|
_trayIconEfxMenu->setTitle(tr("Effects"));
|
||||||
_trayIconEfxMenu->setIcon(QPixmap(":/effects.svg"));
|
_trayIconEfxMenu->setIcon(QPixmap(":/effects.svg"));
|
||||||
@ -122,6 +126,7 @@ void SysTray::createTrayIcon()
|
|||||||
_trayIconEfxMenu->addAction(efxAction);
|
_trayIconEfxMenu->addAction(efxAction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
autorunAction = new QAction(tr("&Disable autostart"), this);
|
autorunAction = new QAction(tr("&Disable autostart"), this);
|
||||||
@ -135,7 +140,9 @@ void SysTray::createTrayIcon()
|
|||||||
_trayIconMenu->addAction(settingsAction);
|
_trayIconMenu->addAction(settingsAction);
|
||||||
_trayIconMenu->addSeparator();
|
_trayIconMenu->addSeparator();
|
||||||
_trayIconMenu->addAction(colorAction);
|
_trayIconMenu->addAction(colorAction);
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
_trayIconMenu->addMenu(_trayIconEfxMenu);
|
_trayIconMenu->addMenu(_trayIconEfxMenu);
|
||||||
|
#endif
|
||||||
_trayIconMenu->addAction(clearAction);
|
_trayIconMenu->addAction(clearAction);
|
||||||
_trayIconMenu->addSeparator();
|
_trayIconMenu->addSeparator();
|
||||||
_trayIconMenu->addAction(restartAction);
|
_trayIconMenu->addAction(restartAction);
|
||||||
@ -175,7 +182,7 @@ void SysTray::setColor(const QColor & color)
|
|||||||
{
|
{
|
||||||
std::vector<ColorRgb> rgbColor{ ColorRgb{ (uint8_t)color.red(), (uint8_t)color.green(), (uint8_t)color.blue() } };
|
std::vector<ColorRgb> rgbColor{ ColorRgb{ (uint8_t)color.red(), (uint8_t)color.green(), (uint8_t)color.blue() } };
|
||||||
|
|
||||||
_hyperion->setColor(PriorityMuxer::FG_PRIORITY,rgbColor, Effect::ENDLESS);
|
_hyperion->setColor(PriorityMuxer::FG_PRIORITY,rgbColor, PriorityMuxer::ENDLESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SysTray::showColorDialog()
|
void SysTray::showColorDialog()
|
||||||
@ -228,11 +235,13 @@ void SysTray::settings() const
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
void SysTray::setEffect()
|
void SysTray::setEffect()
|
||||||
{
|
{
|
||||||
QString efxName = qobject_cast<QAction*>(sender())->text();
|
QString efxName = qobject_cast<QAction*>(sender())->text();
|
||||||
_hyperion->setEffect(efxName, PriorityMuxer::FG_PRIORITY, Effect::ENDLESS);
|
_hyperion->setEffect(efxName, PriorityMuxer::FG_PRIORITY, PriorityMuxer::ENDLESS);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void SysTray::clearEfxColor()
|
void SysTray::clearEfxColor()
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,9 @@ public slots:
|
|||||||
void setColor(const QColor & color);
|
void setColor(const QColor & color);
|
||||||
void closeEvent(QCloseEvent *event);
|
void closeEvent(QCloseEvent *event);
|
||||||
void settings() const;
|
void settings() const;
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
void setEffect();
|
void setEffect();
|
||||||
|
#endif
|
||||||
void clearEfxColor();
|
void clearEfxColor();
|
||||||
void setAutorunState();
|
void setAutorunState();
|
||||||
|
|
||||||
@ -66,7 +68,9 @@ private:
|
|||||||
|
|
||||||
QSystemTrayIcon *_trayIcon;
|
QSystemTrayIcon *_trayIcon;
|
||||||
QMenu *_trayIconMenu;
|
QMenu *_trayIconMenu;
|
||||||
|
#if defined(ENABLE_EFFECTENGINE)
|
||||||
QMenu *_trayIconEfxMenu;
|
QMenu *_trayIconEfxMenu;
|
||||||
|
#endif
|
||||||
QColorDialog _colorDlg;
|
QColorDialog _colorDlg;
|
||||||
HyperionDaemon *_hyperiond;
|
HyperionDaemon *_hyperiond;
|
||||||
Hyperion *_hyperion;
|
Hyperion *_hyperion;
|
||||||
|
@ -4,16 +4,19 @@ include_directories(../libsrc)
|
|||||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets REQUIRED)
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets REQUIRED)
|
||||||
|
|
||||||
MACRO (link_to_hyperion TARGET)
|
MACRO (link_to_hyperion TARGET)
|
||||||
target_link_libraries( ${TARGET} blackborder leddevice jsonserver hyperion-utils hyperion effectengine )
|
target_link_libraries( ${TARGET} blackborder leddevice jsonserver hyperion-utils hyperion )
|
||||||
|
if(ENABLE_EFFECTENGINE)
|
||||||
|
target_link_libraries( ${TARGET} effectengine )
|
||||||
|
endif()
|
||||||
ENDMACRO()
|
ENDMACRO()
|
||||||
|
|
||||||
if(ENABLE_SPIDEV)
|
if(ENABLE_DEV_SPI)
|
||||||
# Add the simple test executable 'TestSpi'
|
# Add the simple test executable 'TestSpi'
|
||||||
add_executable(test_spi TestSpi.cpp)
|
add_executable(test_spi TestSpi.cpp)
|
||||||
target_link_libraries( test_spi leddevice hyperion-utils hyperion )
|
target_link_libraries( test_spi leddevice hyperion-utils hyperion )
|
||||||
add_executable(spidev_test spidev_test.c)
|
add_executable(spidev_test spidev_test.c)
|
||||||
add_executable(gpio2spi switchPinCtrl.c)
|
add_executable(gpio2spi switchPinCtrl.c)
|
||||||
endif(ENABLE_SPIDEV)
|
endif(ENABLE_DEV_SPI)
|
||||||
|
|
||||||
add_executable(test_configfile TestConfigFile.cpp)
|
add_executable(test_configfile TestConfigFile.cpp)
|
||||||
link_to_hyperion(test_configfile)
|
link_to_hyperion(test_configfile)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2011 Julian Berman
|
Copyright (c) 2013 Julian Berman
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -3,6 +3,12 @@ import json, sys
|
|||||||
from os import path
|
from os import path
|
||||||
from jsonschema import Draft3Validator, RefResolver
|
from jsonschema import Draft3Validator, RefResolver
|
||||||
|
|
||||||
|
from urllib.parse import urljoin
|
||||||
|
from urllib.request import pathname2url
|
||||||
|
|
||||||
|
def path2url(path):
|
||||||
|
return urljoin('file:', pathname2url(path))
|
||||||
|
|
||||||
print('-- validate json file')
|
print('-- validate json file')
|
||||||
|
|
||||||
jsonFileName = sys.argv[1]
|
jsonFileName = sys.argv[1]
|
||||||
@ -11,8 +17,11 @@ schemaFileName = sys.argv[2]
|
|||||||
try:
|
try:
|
||||||
with open(schemaFileName) as schemaFile:
|
with open(schemaFileName) as schemaFile:
|
||||||
with open(jsonFileName) as jsonFile:
|
with open(jsonFileName) as jsonFile:
|
||||||
resolver = RefResolver('file://%s/schema/' % path.abspath(path.dirname(schemaFileName)), None)
|
schema = json.load(schemaFile)
|
||||||
Draft3Validator(json.loads(schemaFile.read()), resolver=resolver).validate(json.loads(jsonFile.read()))
|
uri = path2url('%s/schema/' % path.abspath(path.dirname(schemaFileName)))
|
||||||
|
resolver = RefResolver(uri, referrer = schema)
|
||||||
|
instance = json.load(jsonFile)
|
||||||
|
Draft3Validator(schema, resolver=resolver).validate(instance)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print('validation error: '+jsonFileName + ' '+schemaFileName+' ('+str(e)+')')
|
print('validation error: '+jsonFileName + ' '+schemaFileName+' ('+str(e)+')')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user