### MSVC Compiler Options and SDK Setup Source: https://github.com/awawa-dev/hyperhdr/blob/master/CMakeLists.txt Configures MSVC specific options, including finding the Windows SDK, setting the Qt installation path, and adding the /MP flag for multi-processor compilation. ```cmake if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") # Search for Windows SDK find_package(WindowsSDK REQUIRED) message(STATUS "WINDOWS SDK: ${WINDOWSSDK_LATEST_DIR} ${WINDOWSSDK_LATEST_NAME}") message(STATUS "MSVC VERSION: ${MSVC_VERSION}") FIRSTSUBDIR(SUBDIRQT "C:/Qt") SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "${SUBDIRQT}/msvc2022_64") if ((Qt5Core_FOUND AND NOT (DEFINED ENV{Qt5_DIR})) OR (Qt6Core_FOUND AND NOT (DEFINED ENV{Qt6_DIR}))) message(STATUS "Set Qt${Qt_VERSION} module path: ${SUBDIRQT}") SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${SUBDIRQT}/msvc2022_64/lib/cmake/Qt${Qt_VERSION}") endif() set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT hyperhdr) add_definitions(/MP) endif() ``` -------------------------------- ### Install Shared Library Source: https://github.com/awawa-dev/hyperhdr/blob/master/sources/utils-zstd/CMakeLists.txt Installs the 'utils-zstd' shared library, its import library (on Windows), and its runtime library to the appropriate installation directories. ```cmake install( TARGETS utils-zstd LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ) ``` -------------------------------- ### Install Necessary Components Source: https://github.com/awawa-dev/hyperhdr/wiki/Zigbee2MQTT-lights Installs curl, Node.js (v20.x), Mosquitto, Node.js, Git, Make, G++, GCC, and systemd development libraries. ```bash sudo apt update && sudo apt install -y curl sudo curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt install -y mosquitto nodejs git make g++ gcc libsystemd-dev ``` -------------------------------- ### Install Qt and Dependencies on Windows Source: https://github.com/awawa-dev/hyperhdr/wiki/Compiling-HyperHDR Installs Qt, Python, and other necessary tools for compiling HyperHDR on Windows. Includes commands to download Qt using aqtinstall. ```bash pip install aqtinstall mkdir c:\Qt && aqt install -O c:\Qt 6.8.3 windows desktop win64_msvc2022_64 -m qtserialport ``` -------------------------------- ### Install Qt and Dependencies on Windows Source: https://github.com/awawa-dev/hyperhdr/blob/master/BUILDING.md Steps to install Qt, OpenSSL, libjpeg-turbo, and Python for building HyperHDR on Windows. Includes setting environment variables for CMake. ```bash pip install aqtinstall mkdir c:\Qt && aqt install -O c:\Qt 6.8.3 windows desktop win64_msvc2022_64 -m qtserialport ``` ```bash set CMAKE_PREFIX_PATH=C:\Qt\6.8.3\msvc2022_64\lib\cmake\ ``` -------------------------------- ### Load Setup Scripts and Light Source Source: https://github.com/awawa-dev/hyperhdr/blob/master/www/content/light_source.html Loads common setup scripts, then specific device scripts, and finally the main light source script using jQuery's deferred objects. Ensure jQuery is available before executing. ```javascript $.getScript('js/LedSetups/SetupCommon.js').then(() => { const setupScripts = [ 'js/LedSetups/SetupPhilipsHue.js', 'js/LedSetups/SetupZigbee2mqtt.js', 'js/LedSetups/SetupHomeAssistant.js', 'js/LedSetups/SetupAtmoorb.js', 'js/LedSetups/SetupYeelight.js', 'js/LedSetups/SetupCololight.js', 'js/LedSetups/SetupLifx.js', 'js/LedSetups/SetupWiz.js', 'js/lib/jsonaceeditor.min.js' ].map(src => $.getScript(src)); $.when(...setupScripts).then(() => { $.getScript('/js/light_source.js'); }); }); ``` -------------------------------- ### Zigbee2MQTT Configuration Example Source: https://github.com/awawa-dev/hyperhdr/wiki/Zigbee2MQTT-lights Example configuration for Zigbee2MQTT, setting up MQTT connection details, serial port, and enabling the web frontend. Replace 'CHANGE_THIS_PASSWORD' with your actual password. ```yaml # Home Assistant integration (MQTT discovery) homeassistant: false # allow new devices to join permit_join: true # MQTT settings mqtt: # MQTT base topic for zigbee2mqtt MQTT messages base_topic: zigbee2mqtt # MQTT server URL server: 'mqtt://localhost' # MQTT server authentication, uncomment if required: user: hyperhdr password: CHANGE_THIS_PASSWORD # Serial settings serial: # Location of CC2531 USB sniffer port: /dev/ttyACM0 # only for cc2531, cc2651p adapter: zstack # Enable Web frontend frontend: true ``` -------------------------------- ### CMake Configuration and Build Command Source: https://github.com/awawa-dev/hyperhdr/blob/master/BUILDING.md Example of configuring the build with CMake and generating a Visual Studio solution file on Windows. ```bash cmake -DCMAKE_BUILD_TYPE=Release .. ``` -------------------------------- ### Add HyperHDR APT Repository and Install (Debian/Ubuntu) Source: https://github.com/awawa-dev/hyperhdr/wiki/Installation This script adds the HyperHDR GPG key, configures the APT repository, updates the package list, and installs the HyperHDR application. Ensure curl is installed first. ```bash type -p curl >/dev/null || sudo apt install curl -y curl -fsSL https://awawa-dev.github.io/hyperhdr.public.apt.gpg.key | sudo dd of=/usr/share/keyrings/hyperhdr.public.apt.gpg.key \ && sudo chmod go+r /usr/share/keyrings/hyperhdr.public.apt.gpg.key \ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hyperhdr.public.apt.gpg.key] https://awawa-dev.github.io $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hyperhdr.list > /dev/null \ && sudo apt update \ && sudo apt install hyperhdr -y ``` -------------------------------- ### Set Flatbuffers Installation Directories Source: https://github.com/awawa-dev/hyperhdr/blob/master/CMakeLists.txt Configures the installation paths for Flatbuffers binaries and libraries within the build directory. ```cmake SET ( FLATBUFFERS_INSTALL_BIN_DIR ${CMAKE_BINARY_DIR}/flatbuf ) SET ( FLATBUFFERS_INSTALL_LIB_DIR ${CMAKE_BINARY_DIR}/flatbuf ) ``` -------------------------------- ### Run Zigbee2MQTT Source: https://github.com/awawa-dev/hyperhdr/wiki/Zigbee2MQTT-lights Starts the Zigbee2MQTT service from the command line. The interface will be available at port 8080. Press CTRL+C to terminate. ```bash cd /opt/zigbee2mqtt npm start ``` -------------------------------- ### Enable and start HyperHDR service Source: https://github.com/awawa-dev/hyperhdr/wiki/Installation Enable and start the HyperHDR service for a specific user. This is typically done when no GUI is detected. ```bash sudo systemctl enable --now hyperhdr@pi.service ``` -------------------------------- ### Configure Installer Name and Dependency Packaging Source: https://github.com/awawa-dev/hyperhdr/blob/master/CMakeLists.txt Configures installer naming conventions and dependency packaging for Linux systems. Sets standard installer name and enables dependency bundling if required. ```cmake if(UNIX AND NOT APPLE) option(USE_STANDARD_INSTALLER_NAME "Use the standardized Linux installer name" OFF) option(ENABLE_DEPENDENCY_PACKAGING "Bundle dependency libraries" OFF) if(ENABLE_DEPENDENCY_PACKAGING) SET ( PORTABLE_LIB_FOLDER "../${CMAKE_INSTALL_LIBDIR}/hyperhdr" ) endif() if (NOT USE_EMBEDDED_WEB_RESOURCES) file(RELATIVE_PATH WEB_REL_PATH "${CMAKE_INSTALL_FULL_BINDIR}" "${CMAKE_INSTALL_FULL_DATADIR}/hyperhdr/web") SET( WEB_RESOURCES_FOLDER "${WEB_REL_PATH}") endif() else() SET ( USE_STANDARD_INSTALLER_NAME OFF ) endif() ``` -------------------------------- ### Install Build Dependencies on Arch Linux Source: https://github.com/awawa-dev/hyperhdr/blob/master/BUILDING.md Installs required packages for native compilation on Arch Linux using pacman. ```bash sudo pacman -Syy sudo pacman -S alsa-lib base-devel bash binutils chrpath cmake dpkg fakeroot flatbuffers freetds git gtk3 libayatana-appindicator libfbclient libftdi libglvnd libjpeg-turbo libx11 mariadb-libs mesa ninja openssl pipewire pkgfile postgresql-libs python qt6-base qt6-serialport sdbus-cpp systemd-libs unzip wayland wget xz chrpath ``` -------------------------------- ### Set Qt5 Dir for Older QT5 Versions on Windows Source: https://github.com/awawa-dev/hyperhdr/wiki/Compiling-HyperHDR Sets the Qt5_Dir environment variable for older QT5 installations on Windows. ```bash set Qt5_Dir=C:\Qt\5.15.2\msvc2019_64\lib\cmake\Qt5\ ``` -------------------------------- ### Install Zigbee2MQTT Fork Source: https://github.com/awawa-dev/hyperhdr/wiki/Zigbee2MQTT-lights Clones and builds the optimized Zigbee2MQTT fork required for frequent color refreshes. Ensure you are in the /opt/zigbee2mqtt directory before running npm commands. ```bash sudo mkdir /opt/zigbee2mqtt sudo chown -R ${USER}: /opt/zigbee2mqtt git clone --depth 1 https://github.com/awawa-dev/zigbee2mqtt.git /opt/zigbee2mqtt cd /opt/zigbee2mqtt && npm i --package-lock-only && npm ci && npm run build ``` -------------------------------- ### Compile HyperHDR on Windows Source: https://github.com/awawa-dev/hyperhdr/blob/master/BUILDING.md This is the general and recommended method for installing HyperHDR on Windows. Ensure your MSVC environment is set up correctly. For installer creation, NSIS is required. ```bash git clone --recursive https://github.com/awawa-dev/HyperHDR.git hyperhdr cd hyperhdr mkdir build cd build # You might need to setup MSVC env first call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" # Maintainers: to build the HyperHDR installer, install NSIS and define environment variable: # set VCINSTALLDIR="C:\Program Files\Microsoft Visual Studio\2022\Community\VC" cmake -DPLATFORM=windows -G "Visual Studio 17 2022" -DCMAKE_BUILD_TYPE=Release .. cmake --build . --config Release -- -maxcpucount ``` ```bash # Run it from the build directory bin/Release/hyperhdr -d ``` -------------------------------- ### Set Build Directories Source: https://github.com/awawa-dev/hyperhdr/blob/master/tests/codec_test/CMakeLists.txt Configures installation directories for Flatbuffers binaries and libraries within the build directory. Ensures these directories are created. ```cmake SET ( FLATBUFFERS_INSTALL_BIN_DIR ${CMAKE_BINARY_DIR}/flatbuf ) SET ( FLATBUFFERS_INSTALL_LIB_DIR ${CMAKE_BINARY_DIR}/flatbuf ) ``` ```cmake SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) file(MAKE_DIRECTORY ${LIBRARY_OUTPUT_PATH}) file(MAKE_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) ``` -------------------------------- ### Build HyperHDR Installer with Docker Source: https://github.com/awawa-dev/hyperhdr/wiki/Compiling-HyperHDR Use this script to build HyperHDR installers for supported Linux targets. Specify PLATFORM, DISTRO_NAME, DISTRO_VERSION, and ARCHITECTURE for Linux builds. Optional parameters include BUILD_TYPE, BUILD_ARCHIVES, USE_STANDARD_INSTALLER_NAME, USE_CCACHE, RESET_CACHE, and INCLUDE_DEP_LIB. ```console pi@ubuntu:~/hyperhdr$ ./build.sh Required environmental options: PLATFORM - one of the supported targets: osx|windows|linux|rpi DISTRO_NAME | DISTRO_VERSION | ARCHITECTURE - these are only for linux targets debian | bullseye | armhf debian | bullseye | arm64 debian | bullseye | amd64 debian | bookworm | armhf debian | bookworm | arm64 debian | bookworm | amd64 debian | trixie | armhf debian | trixie | arm64 debian | trixie | amd64 ubuntu | jammy | amd64 ubuntu | noble | amd64 ubuntu | questing | amd64 fedora | 43 | amd64 archlinux | latest | amd64 Optional environmental options: BUILD_TYPE - Release|Debug, default is Release version BUILD_ARCHIVES - false|true, cpack will build ZIP package USE_STANDARD_INSTALLER_NAME - false|true, use standard Linux package naming USE_CCACHE - false|true, use ccache if available RESET_CACHE - false|true, reset ccache storage INCLUDE_DEP_LIB - false|true, bundle dependency libs into the Linux installer Example of usage: PLATFORM=rpi DISTRO_NAME=debian DISTRO_VERSION=bullseye ARCHITECTURE=arm64 ./build.sh Installers from Docker builds will be ready in the deploy folder ``` -------------------------------- ### MSVC Specific Build Configurations Source: https://github.com/awawa-dev/hyperhdr/blob/master/tests/codec_test/CMakeLists.txt Applies MSVC-specific build settings, including finding the Windows SDK, setting the Qt installation prefix, and configuring the startup project for tests. It also enables multi-processor compilation for faster builds. ```cmake if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") # Search for Windows SDK find_package(WindowsSDK REQUIRED) message(STATUS "WINDOWS SDK: ${WINDOWSSDK_LATEST_DIR} ${WINDOWSSDK_LATEST_NAME}") message(STATUS "MSVC VERSION: ${MSVC_VERSION}") FIRSTSUBDIR(SUBDIRQT "C:/Qt") SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "${SUBDIRQT}/msvc2022_64") if ((Qt5Core_FOUND AND NOT (DEFINED ENV{Qt5_DIR})) OR (Qt6Core_FOUND AND NOT (DEFINED ENV{Qt6_DIR}))) message(STATUS "Set Qt${Qt_VERSION} module path: ${SUBDIRQT}") SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${SUBDIRQT}/msvc2022_64/lib/cmake/Qt${Qt_VERSION}") endif() set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT DecoderTest) add_definitions(/MP) endif() ``` -------------------------------- ### Install HyperHDR on RPM-based systems Source: https://github.com/awawa-dev/hyperhdr/wiki/Installation Install the downloaded HyperHDR .rpm package on RPM-based systems. ```bash sudo dnf install ./HyperHDR-22.0.0.43.beta1-x86_64.rpm ``` -------------------------------- ### Install Build Dependencies on Debian/Ubuntu Source: https://github.com/awawa-dev/hyperhdr/blob/master/BUILDING.md Installs essential packages for native compilation on Debian-based systems. Includes optional packages for Raspberry Pi CEC support. ```bash sudo apt-get update sudo apt-get install build-essential cmake flatbuffers-compiler git libasound2-dev libayatana-appindicator3-dev libegl-dev libflatbuffers-dev libftdi1-dev libgl-dev libglvnd-dev libgtk-3-dev liblzma-dev libpipewire-0.3-dev libssl-dev libsystemd-dev libturbojpeg0-dev libusb-1.0-0-dev libx11-dev libzstd-dev ninja-build patchelf pkg-config python3 qt6-serialport-dev qt6-base-dev unzip wget chrpath ``` ```bash sudo apt-get install libcec-dev libp8-platform-dev libudev-dev ``` -------------------------------- ### Install Build Dependencies on macOS Source: https://github.com/awawa-dev/hyperhdr/blob/master/BUILDING.md Installs necessary tools and libraries for building HyperHDR on macOS using Homebrew. ```bash brew install qtbase qtserialport cmake xz pkg-config ``` -------------------------------- ### Install Build Dependencies on Fedora Source: https://github.com/awawa-dev/hyperhdr/blob/master/BUILDING.md Installs necessary development packages for building HyperHDR on Fedora systems using dnf. ```bash sudo dnf -y install alsa-lib-devel chrpath cmake fedora-packager flatbuffers-compiler flatbuffers-devel gcc gcc-c++ git gtk3-devel libX11-devel libayatana-appindicator-gtk3-devel libftdi-c++-devel libglvnd-devel libusb1-devel libzstd-devel mesa-libEGL-devel mesa-libGL-devel ninja-build openssl-devel pipewire-devel pkg-config qt6-qtbase-devel qt6-qtserialport-devel systemd-devel turbojpeg-devel unzip wget xz-devel chrpath ``` -------------------------------- ### Build HyperHDR Installer Script Source: https://github.com/awawa-dev/hyperhdr/blob/master/BUILDING.md Execute the build script with required environmental options. PLATFORM is mandatory, while DISTRO_NAME, DISTRO_VERSION, and ARCHITECTURE are specific to Linux targets. Optional settings include BUILD_TYPE, BUILD_ARCHIVES, USE_STANDARD_INSTALLER_NAME, USE_CCACHE, RESET_CACHE, and INCLUDE_DEP_LIB. ```console pi@ubuntu:~/hyperhdr$ ./build.sh Required environmental options: PLATFORM - one of the supported targets: osx|windows|linux|rpi DISTRO_NAME | DISTRO_VERSION | ARCHITECTURE - these are only for linux targets debian | bullseye | armhf debian | bullseye | arm64 debian | bullseye | amd64 debian | bookworm | armhf debian | bookworm | arm64 debian | bookworm | amd64 debian | trixie | armhf debian | trixie | arm64 debian | trixie | amd64 ubuntu | noble | amd64 ubuntu | resolute | amd64 fedora | 44 | amd64 archlinux | latest | amd64 Optional environmental options: BUILD_TYPE - Release|Debug, default is Release version BUILD_ARCHIVES - false|true, cpack will build ZIP package USE_STANDARD_INSTALLER_NAME - false|true, use standard Linux package naming USE_CCACHE - false|true, use ccache if available RESET_CACHE - false|true, reset ccache storage INCLUDE_DEP_LIB - false|true, bundle dependency libs into the Linux installer Example of usage: PLATFORM=rpi DISTRO_NAME=debian DISTRO_VERSION=bullseye ARCHITECTURE=arm64 ./build.sh Installers from Docker builds will be ready in the deploy folder ``` -------------------------------- ### Compile HyperHDR on Linux/macOS Source: https://github.com/awawa-dev/hyperhdr/blob/master/BUILDING.md Use this method for a general and recommended installation on Linux and macOS. It involves cloning the repository, creating a build directory, configuring with CMake, and compiling. ```bash git clone --recursive https://github.com/awawa-dev/HyperHDR.git hyperhdr cd hyperhdr mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. make -j $(nproc) ``` ```bash # if this get stucked and dmesg says out of memory try: make -j 2 ``` ```bash # Run it from the build directory bin/hyperhdr -d ``` ```bash # BUILD INSTALLERS (recommended method to install HyperHDR, doesnt work for ArchLinux: use build.sh script ) cpack ``` ```bash # or compile and build the package using one command cmake --build . --target package --config Release ``` -------------------------------- ### Remove Previous HyperHDR Installation (Debian/Ubuntu) Source: https://github.com/awawa-dev/hyperhdr/wiki/Installation Use this command to uninstall any existing HyperHDR installation before adding the new repository. This ensures a clean installation. ```bash sudo apt remove hyperhdr ``` -------------------------------- ### Install HyperHDR on Debian/Ubuntu Source: https://github.com/awawa-dev/hyperhdr/wiki/Installation Install the downloaded HyperHDR .deb package on Debian/Ubuntu systems. ```bash sudo apt install ./HyperHDR-22.0.0-Linux-aarch64.deb ``` -------------------------------- ### Configure Proto-Nano-Server Include Directories and Link Libraries Source: https://github.com/awawa-dev/hyperhdr/blob/master/sources/proto-nano-server/CMakeLists.txt Sets the public include directory for the proto-nano-server library and links it with Qt Core, Qt Network, and protobuf-nanopb. It also conditionally applies precompiled headers. ```cmake target_include_directories(proto-nano-server PUBLIC ${CURRENT_HEADER_DIR}) target_link_libraries(proto-nano-server Qt${Qt_VERSION}::Core Qt${Qt_VERSION}::Network protobuf-nanopb ) if(USE_PRECOMPILED_HEADERS AND COMMAND target_precompile_headers) target_precompile_headers(proto-nano-server REUSE_FROM precompiled_hyperhdr_headers) endif() ``` -------------------------------- ### Install HyperHDR on Arch Linux Source: https://github.com/awawa-dev/hyperhdr/wiki/Installation Install the downloaded HyperHDR .pkg.tar.zst package on Arch Linux-based systems. ```bash sudo pacman -U ./HyperHDR-22.0.0beta1-1-x86_64.pkg.tar.zst ``` -------------------------------- ### Configure Bonjour Library Source: https://github.com/awawa-dev/hyperhdr/blob/master/sources/bonjour/CMakeLists.txt Defines source locations, finds header and source files, creates a library, sets include directories, and links necessary Qt libraries. ```cmake set(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/bonjour) set(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/sources/bonjour) FILE ( GLOB Bonjour_SOURCES "${CURRENT_HEADER_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.cpp") add_library(bonjour OBJECT ${Bonjour_SOURCES} ) target_include_directories(bonjour PRIVATE ${CMAKE_SOURCE_DIR}/external/mdns) target_link_libraries(bonjour Qt${Qt_VERSION}::Core Qt${Qt_VERSION}::Network ) if(USE_PRECOMPILED_HEADERS AND COMMAND target_precompile_headers) target_precompile_headers(bonjour REUSE_FROM precompiled_hyperhdr_headers) endif() ``` -------------------------------- ### HyperHDR Update Script Source: https://github.com/awawa-dev/hyperhdr/wiki/LinuxUpdateScript This bash script automates the installation and upgrade of HyperHDR. It checks for dependencies, allows version selection, downloads, installs, and cleans up. Use the '-f' flag to force the latest version installation or '-v' for verbose output. ```bash #!/bin/bash ############################################################ # 'HyperHDR_update.sh' script to install/upgrade HyperHDR # # # # v3 : # # - checking existing version works if none installed # # - added "-f" param to force install of latest version # # # ############################################################ #Default params FORCE_LATEST_INSTALL=0 VERBOSE_MODE=0 function readParams () { until (( $# == 0 )); do case $1 in "-f") FORCE_LATEST_INSTALL=1 echo " Opt: forcing latest version installation" shift continue ;; "-v") VERBOSE_MODE=1 echo " Opt: verbose mode" shift continue ;; *) echo " Opt: unknown '$1' parameter => ignored..." shift continue ;; esac done } #Is Curl installed ? which curl 1>/dev/null if [ $? != 0 ]; then sudo apt update && sudo apt install curl -y fi #Is GitHub CLI installed ? which gh 1>/dev/null if [ $? != 0 ]; then sudo curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null && sudo apt update && sudo apt install gh -y fi #Check parameters readParams $* if [ $FORCE_LATEST_INSTALL = 1 ]; then versionSelected=$(sudo gh release list -R awawa-dev/HyperHDR -L 2 | cut -d'v' -f2 | cut -f1 | awk '{print $1}' | head -1) else #Select version echo echo "Select version to install :" currentVersion=$(hyperhdr --version 2> /dev/null | head -2 | tail -1 | awk '{print $3}') if [ currentVersion = "" ]; then currentVersion="none" fi echo " (currently installed version = '${currentVersion}')" sudo gh release list -R awawa-dev/HyperHDR -L 2 | cut -d'v' -f2 | cut -f1 | awk '{print " ", NR, "->", $1}' echo " (any other key to cancel...)" echo read versionNumber case "${versionNumber}" in 1) #Get latest version versionSelected=$(sudo gh release list -R awawa-dev/HyperHDR -L 2 | cut -d'v' -f2 | cut -f1 | awk '{print $1}' | head -1) ;; 2) #Get previous version versionSelected=$(sudo gh release list -R awawa-dev/HyperHDR -L 2 | cut -d'v' -f2 | cut -f1 | awk '{print $1}' | tail -1) ;; *) echo "Exiting..." exit 0 ;; esac fi echo cd /tmp echo "#################################" echo "Downloading ${versionSelected}..." echo "#################################" sudo wget https://github.com/awawa-dev/HyperHDR/releases/download/v${versionSelected}/HyperHDR-${versionSelected}-$(uname -s)-$(uname -m).deb if [ $? != 0 ]; then echo "KO: impossible to download version ${versionSelected} !" sleep 2 exit 1 fi echo echo "############################" echo "Removing previous version..." echo "############################" sudo apt -y remove hyperhdr echo echo "##############################" echo "Installing selected version..." echo "##############################" sudo apt -y install ./HyperHDR*.deb sudo systemctl start hyperhdr@pi.service echo echo "########################" echo "Post install cleaning..." echo "########################" sudo apt -y autoremove sudo rm -f ./HyperHDR*.deb echo echo "#########################" echo "Installation successful !" echo "#########################" exit 0 ``` -------------------------------- ### Configure and Add Resource Library Source: https://github.com/awawa-dev/hyperhdr/blob/master/resources/CMakeLists.txt Configures a template file (`resources.qrc.in`) to generate the final `resources.qrc` file in the build directory. It then adds this generated `.qrc` file as a library named 'resources'. This is the final step to make the static resources available to the project. ```cmake CONFIGURE_FILE(${CURRENT_SOURCE_DIR}/resources.qrc.in ${CMAKE_BINARY_DIR}/resources.qrc ) SET(Hyperhdr_RES ${CMAKE_BINARY_DIR}/resources.qrc) add_library(resources ${Hyperhdr_RES} ) ``` -------------------------------- ### Install Build Dependencies on Arch Linux Source: https://github.com/awawa-dev/hyperhdr/wiki/Compiling-HyperHDR Installs required packages for building HyperHDR on Arch Linux systems. ```bash sudo pacman -Syy sudo pacman -S alsa-lib base-devel bash binutils chrpath cmake dpkg fakeroot flatbuffers freetds git gtk3 libayatana-appindicator libfbclient libftdi libglvnd libjpeg-turbo libx11 mariadb-libs mesa ninja openssl pipewire pkgfile postgresql-libs python qt6-base qt6-serialport sdbus-cpp systemd-libs unzip wayland wget xz chrpath ``` -------------------------------- ### Configure WS2812 PIO Overlay Source: https://github.com/awawa-dev/hyperhdr/wiki/Raspberry-Pi-5-PWM Add the ws2812-pio overlay to /boot/firmware/config.txt to enable LED control. Adjust num_leds and rgbw parameters as needed. A restart is required after changes. ```bash echo "dtoverlay=ws2812-pio,gpio=18,num_leds=30,rgbw" | sudo tee -a /boot/firmware/config.txt ``` -------------------------------- ### Find and Use System Nanopb Source: https://github.com/awawa-dev/hyperhdr/blob/master/external/CMakeLists.txt Attempts to find and use system-installed nanopb libraries. Falls back to submodule if not found or if system libraries are explicitly not used. ```cmake if (USE_SYSTEM_NANOPB_LIBS) find_package(nanopb) if (NOT nanopb_FOUND) message(WARNING "Could NOT find nanopb system libraries. Fallback to nanopb submodule.") endif() endif() ``` -------------------------------- ### Create Database OBJECT Library and Link Dependencies Source: https://github.com/awawa-dev/hyperhdr/blob/master/sources/db/CMakeLists.txt Creates an OBJECT library named 'database' from the discovered source files. It then links this library against Qt Core, Qt Network, and the sqlite3 library. Precompiled headers are optionally enabled if the USE_PRECOMPILED_HEADERS flag is set and the command is available. ```cmake add_library(database OBJECT ${DB_SOURCES}) target_link_libraries(database Qt${Qt_VERSION}::Core Qt${Qt_VERSION}::Network sqlite3 ) if(USE_PRECOMPILED_HEADERS AND COMMAND target_precompile_headers) target_precompile_headers(database REUSE_FROM precompiled_hyperhdr_headers) endif() ``` -------------------------------- ### Windows Platform Configuration Source: https://github.com/awawa-dev/hyperhdr/blob/master/CMakeLists.txt Sets default options for Windows builds, specifically regarding Flatbuffers. ```cmake elseif (WIN32) SET ( DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS OFF ) ``` -------------------------------- ### Conditional Option for Standard Installer Name on UNIX/Linux Source: https://github.com/awawa-dev/hyperhdr/blob/master/tests/codec_test/CMakeLists.txt Sets the USE_STANDARD_INSTALLER_NAME option to OFF for UNIX systems (excluding macOS). This option controls the use of a standardized Linux installer name. ```cmake if(UNIX AND NOT APPLE) option(USE_STANDARD_INSTALLER_NAME "Use the standardized Linux installer name" OFF) colorMe("USE_STANDARD_INSTALLER_NAME = " ${USE_STANDARD_INSTALLER_NAME}) else() SET ( USE_STANDARD_INSTALLER_NAME OFF ) endif() ``` -------------------------------- ### CMakeLists.txt Configuration for Windows Sound Capture Source: https://github.com/awawa-dev/hyperhdr/blob/master/sources/sound-capture/windows/CMakeLists.txt This snippet defines source directories, globbs header and source files, creates an object library, and links necessary Qt modules. It also conditionally enables precompiled headers. ```cmake SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/sound-capture/windows) SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/sources/sound-capture/windows) FILE ( GLOB SOUNDCAPWINDOWS_SOURCES "${CURRENT_HEADER_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.cpp" ) add_library(sound-capture-windows OBJECT ${SOUNDCAPWINDOWS_SOURCES} ) target_link_libraries(sound-capture-windows Qt${Qt_VERSION}::Core Qt${Qt_VERSION}::Network ) if(USE_PRECOMPILED_HEADERS AND COMMAND target_precompile_headers) target_precompile_headers(sound-capture-windows REUSE_FROM precompiled_hyperhdr_headers) endif() ``` -------------------------------- ### Update HyperHDR Installation (Debian/Ubuntu) Source: https://github.com/awawa-dev/hyperhdr/wiki/Installation Run this command to update HyperHDR to the latest version if you have already set up the HyperHDR APT repository. It first updates the package list and then installs the latest package. ```bash sudo apt update && sudo apt install hyperhdr -y ``` -------------------------------- ### Set Default Build Options for Windows Source: https://github.com/awawa-dev/hyperhdr/blob/master/CMakeLists.txt Configures default build options for Windows systems, enabling DirectShow (DX) and Media Foundation (MF) for multimedia, and Windows-specific sound capture. ```cmake ELSEIF ( WIN32 ) SET ( DEFAULT_DX ON ) SET ( DEFAULT_MF ON ) SET ( DEFAULT_SOUNDCAPWINDOWS ON ) ``` -------------------------------- ### Configure MQTT System Library Search Source: https://github.com/awawa-dev/hyperhdr/blob/master/external/CMakeLists.txt Attempts to find system QMQTT libraries. Falls back to building embedded libraries if not found. ```cmake if ( ENABLE_MQTT ) if (USE_SYSTEM_MQTT_LIBS) message(STATUS "${YellowColor}Try using the qmqtt system libraries instead of the embedded submodule. Absolutely no guarantee.${ColorReset}") find_package(Qmqtt) if (NOT QMQTT_FOUND) message(WARNING "${RedColor}Could NOT find qmqtt system libraries, build static qmqtt libraries${ColorReset}") #Fallback: build qmqtt static libray inside project set(DEFAULT_USE_SYSTEM_MQTT_LIBS OFF PARENT_SCOPE) set(USE_SYSTEM_MQTT_LIBS OFF) else() message(STATUS "Found system QMQTT libs.") endif() endif() if (NOT USE_SYSTEM_MQTT_LIBS) # HyperHDR workaround for fixed Qt5 version file(READ "${CMAKE_CURRENT_SOURCE_DIR}/qmqtt/CMakeLists.txt" FILE_CONTENTS) string(REPLACE "Qt5" "Qt${Qt_VERSION}" FILE_CONTENTS "${FILE_CONTENTS}") string(REPLACE "find_package" "#find_package" FILE_CONTENTS "${FILE_CONTENTS}") file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/qmqtt/CMakeLists.txt" "${FILE_CONTENTS}") cmake_policy(PUSH) if (NOT USE_SHARED_LIBS) set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) set(qmqtt_SHARED OFF) endif() add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/qmqtt) if (NOT USE_SHARED_LIBS) target_compile_definitions(qmqtt INTERFACE MQTT_PROJECT_INCLUDE_SRC) endif() cmake_policy(POP) endif() endif() ``` -------------------------------- ### Find TurboJPEG Library Source: https://github.com/awawa-dev/hyperhdr/blob/master/CMakeLists.txt Finds the TurboJPEG library and its dependencies. Requires TurboJPEG to be installed or findable by CMake. ```cmake find_package(TurboJPEG REQUIRED) message( STATUS "TURBOJPEG_LIBRARY_DIRS=${TurboJPEG_LIBRARY}") message( STATUS "TURBOJPEG_INCLUDE_DIRS=${TurboJPEG_INCLUDE_DIRS}") ``` -------------------------------- ### Start/Stop HyperHDR service on Raspberry Pi Source: https://github.com/awawa-dev/hyperhdr/wiki/Installation Commands to start or stop the HyperHDR service on a Raspberry Pi. ```bash sudo systemctl start/stop hyperhdr@pi.service ``` -------------------------------- ### Restart Action Function Source: https://github.com/awawa-dev/hyperhdr/blob/master/www/content/restart.html Initiates the restart process by setting a flag for connection loss and starting a timer to attempt reconnection. ```javascript function restartAction() { if(!connectionLost) { connectionLost = true; connectionTimer = window.setInterval(tryReconnect, 1000); } } ``` -------------------------------- ### Linux Platform Configuration Source: https://github.com/awawa-dev/hyperhdr/blob/master/CMakeLists.txt Sets default options for Linux development environments. ```cmake elseif ( "${PLATFORM}" MATCHES "linux" ) if ( "${PLATFORM}" STREQUAL "linux-dev" ) SET ( DEFAULT_AMLOGIC ON) SET ( DEFAULT_WS281XPWM ON ) endif() ``` -------------------------------- ### Build LibreELEC Add-on for PC (x86_64) Source: https://github.com/awawa-dev/hyperhdr/blob/master/BUILDING.md Commands to build the HyperHDR add-on for LibreELEC on a PC (x86_64 architecture). This sets the project to Generic and specifies the architecture. ```bash PROJECT=Generic ARCH=x86_64 DEVICE=Generic make image PROJECT=Generic DEVICE=Generic ARCH=x86_64 ./scripts/create_addon hyperhdr ``` -------------------------------- ### Setup RPATH for Shared Libraries Source: https://github.com/awawa-dev/hyperhdr/blob/master/CMakeLists.txt Configures the RPATH to search for shared libraries in the BINARY/../lib folder on UNIX-like systems (excluding macOS). ```cmake if (UNIX AND NOT APPLE) SET(CMAKE_SKIP_BUILD_RPATH FALSE) SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) list(APPEND CMAKE_INSTALL_RPATH "$ORIGIN/../lib") list(APPEND CMAKE_INSTALL_RPATH "$ORIGIN/../lib/external") SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) endif() ``` -------------------------------- ### Glob SmartX11 Sources and Create Library Source: https://github.com/awawa-dev/hyperhdr/blob/master/sources/grabber/linux/X11/CMakeLists.txt Finds SmartX11 related header and source files and creates a shared library named 'smart-x11'. ```cmake FILE ( GLOB SMARTX11_SOURCES "${CURRENT_HEADER_DIR}/smartX11*.h" "${CURRENT_SOURCE_DIR}/smartX11.cpp" ) add_library(smart-x11 SHARED ${SMARTX11_SOURCES} ) target_include_directories(smart-x11 PUBLIC ${XLibs_INCLUDE_DIRS}) target_link_libraries(smart-x11 ${XLibs_LIBRARIES} ) ``` -------------------------------- ### Define Proto-Nano-Server Library Source: https://github.com/awawa-dev/hyperhdr/blob/master/sources/proto-nano-server/CMakeLists.txt Defines the proto-nano-server as an object library, listing its source and header files. It also sets a property to skip precompiling headers for message.pb.c. ```cmake set(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/proto-nano-server) set(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/sources/proto-nano-server) add_library(proto-nano-server OBJECT ${CURRENT_SOURCE_DIR}/ProtoNanoClientConnection.cpp ${CURRENT_HEADER_DIR}/ProtoNanoClientConnection.h ${CURRENT_SOURCE_DIR}/message.pb.c ${CURRENT_HEADER_DIR}/message.pb.h ${CURRENT_SOURCE_DIR}/ProtoServer.cpp ${CURRENT_HEADER_DIR}/ProtoServer.h ) set_source_files_properties(${CURRENT_SOURCE_DIR}/message.pb.c PROPERTIES SKIP_PRECOMPILE_HEADERS ON) ``` -------------------------------- ### Get Channel Index Offset Source: https://github.com/awawa-dev/hyperhdr/blob/master/www/content/lut_generator.html Returns the offset for a specific color channel (R, G, or B) within the LUT data. This is typically just the channel index itself. ```javascript function lutIndexC(c) { return c; } ``` -------------------------------- ### Build Pipewire Grabber Library Source: https://github.com/awawa-dev/hyperhdr/blob/master/sources/grabber/linux/pipewire/CMakeLists.txt Compiles the Pipewire-grabber library as an object library using specified source files. Links Qt Core and Network libraries. ```cmake # Grabber FILE ( GLOB PIPEWIRE_SOURCES "${CURRENT_HEADER_DIR}/smartPipewire.h" "${CURRENT_HEADER_DIR}/PipewireGrabber.h" "${CURRENT_HEADER_DIR}/PipewireWrapper.h" "${CURRENT_SOURCE_DIR}/PipewireGrabber.cpp" "${CURRENT_SOURCE_DIR}/PipewireWrapper.cpp" ) add_library(Pipewire-grabber OBJECT ${PIPEWIRE_SOURCES} ) target_link_libraries(Pipewire-grabber Qt${Qt_VERSION}::Core Qt${Qt_VERSION}::Network ) if(USE_PRECOMPILED_HEADERS AND COMMAND target_precompile_headers) target_precompile_headers(Pipewire-grabber REUSE_FROM precompiled_hyperhdr_headers) endif() ``` -------------------------------- ### Get First Subdirectory Path (macOS) Source: https://github.com/awawa-dev/hyperhdr/blob/master/CMakeLists.txt This macro is used to find the path of the first subdirectory within a given directory, primarily for macOS header searching. ```cmake MACRO(FIRSTSUBDIR result curdir) FILE(GLOB children RELATIVE ${curdir} ${curdir}/*) SET(dirlist "") FOREACH(child ${children}) IF(IS_DIRECTORY ${curdir}/${child}) LIST(APPEND dirlist "${curdir}/${child}") BREAK() ENDIF() ENDFOREACH() SET(${result} ${dirlist}) ENDMACRO() ``` -------------------------------- ### Configure MQTT Option Source: https://github.com/awawa-dev/hyperhdr/blob/master/CMakeLists.txt Enables or disables MQTT support. The default state is determined by DEFAULT_MQTT. ```cmake option(ENABLE_MQTT "Enable MQTT" ${DEFAULT_MQTT}) colorMe("ENABLE_MQTT = " ${ENABLE_MQTT}) ``` -------------------------------- ### Add Qt Definitions Source: https://github.com/awawa-dev/hyperhdr/blob/master/CMakeLists.txt Applies Qt-specific definitions to the build targets. ```cmake add_definitions(${QT_DEFINITIONS}) ``` -------------------------------- ### Create Uninstall Target Source: https://github.com/awawa-dev/hyperhdr/blob/master/CMakeLists.txt Defines a custom 'uninstall' target that uses a generated CMake script to remove installed files. This provides a convenient way to uninstall the project. ```cmake # uninstall target configure_file( "${OUR_CMAKE_MODULES}/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) ``` -------------------------------- ### Platform Define and X11 Support Source: https://github.com/awawa-dev/hyperhdr/blob/master/CMakeLists.txt Adds a preprocessor define based on the platform and checks for X11 library availability. ```cmake STRING( TOUPPER "-DPLATFORM_${PLATFORM}" PLATFORM_DEFINE) STRING( REPLACE "-DEV" "" PLATFORM_DEFINE "${PLATFORM_DEFINE}" ) ADD_DEFINITIONS( ${PLATFORM_DEFINE} ) if (DEFAULT_X11) if (NOT CMAKE_CROSSCOMPILING) find_package(XLibs QUIET ) endif() if (NOT XLibs_FOUND) message( WARNING "X11 libs not found. Disabling support for X11.") SET ( DEFAULT_X11 OFF ) endif() endif() ``` -------------------------------- ### Build LibreELEC Add-on for RPi (LibreELEC 12) Source: https://github.com/awawa-dev/hyperhdr/blob/master/BUILDING.md Commands to build the HyperHDR add-on for LibreELEC 12 on Raspberry Pi. Note the change in architecture to aarch64. ```bash PROJECT=RPi ARCH=aarch64 DEVICE=RPi4 make image PROJECT=RPi DEVICE=RPi4 ARCH=aarch64 ./scripts/create_addon hyperhdr ``` -------------------------------- ### Turn HDR Tone Mapping ON via HTTP Source: https://github.com/awawa-dev/hyperhdr/wiki/JSON-API Use this command to enable HDR tone mapping. It is sent via HTTP GET request to the HyperHDR API. ```http http://IP_OF_HYPERHDR:8090/json-rpc?request={%22command%22%3A%22videomodehdr%22%2C%22HDR%22%3A1} ``` -------------------------------- ### Configure Wi-Fi with wifi.nmconnection Source: https://github.com/awawa-dev/hyperhdr/wiki/Installation Use this configuration file to set up Wi-Fi credentials for your Raspberry Pi. Ensure you replace 'NAME_OF_YOUR_WIFI' and 'WIFI_PASSWORD' with your actual network details. ```ini # Uncomment everything below this line and set your ssid and password [connection] id=wifi uuid=f81d4fae-7dec-11d0-a765-00a0c91e6bf6 type=wifi interface-name=wlan0 [wifi] mode=infrastructure ssid=NAME_OF_YOUR_WIFI [wifi-security] auth-alg=open key-mgmt=wpa-psk psk=WIFI_PASSWORD [ipv4] method=auto [ipv6] addr-gen-mode=default method=auto [proxy] ``` -------------------------------- ### Turn HDR Tone Mapping OFF via HTTP Source: https://github.com/awawa-dev/hyperhdr/wiki/JSON-API Use this command to disable HDR tone mapping. It is sent via HTTP GET request to the HyperHDR API. ```http http://IP_OF_HYPERHDR:8090/json-rpc?request={%22command%22%3A%22videomodehdr%22%2C%22HDR%22%3A0} ``` -------------------------------- ### Build LibreELEC Add-on for RPi (LibreELEC 11) Source: https://github.com/awawa-dev/hyperhdr/blob/master/BUILDING.md Commands to build the HyperHDR add-on for LibreELEC 11 on Raspberry Pi. This involves setting project and architecture, then creating the add-on. ```bash PROJECT=RPi ARCH=arm DEVICE=RPi4 make image PROJECT=RPi DEVICE=RPi4 ARCH=arm ./scripts/create_addon hyperhdr ``` -------------------------------- ### Get HDR Tone Mapping State via HTTP Source: https://github.com/awawa-dev/hyperhdr/wiki/JSON-API Retrieve the current HDR tone mapping state by querying server information. Look for the 'videomodehdr' property in the response. ```http http://IP_OF_HYPERHDR:8090/json-rpc?request={%22command%22%3A%22serverinfo%22} ``` -------------------------------- ### Build SQLite Library (Static) Source: https://github.com/awawa-dev/hyperhdr/blob/master/external/CMakeLists.txt Configures SQLite as a static library. Use this when shared libraries are disabled. ```cmake if (NOT USE_SHARED_LIBS) add_library(sqlite3 "${CMAKE_CURRENT_SOURCE_DIR}/sqlite/sqlite3.c") else() add_library(sqlite3 SHARED "${CMAKE_CURRENT_SOURCE_DIR}/sqlite/sqlite3.c") if(WIN32) target_compile_definitions(sqlite3 INTERFACE "SQLITE_API=__declspec(dllimport)" PRIVATE "SQLITE_API=__declspec(dllexport)" ) else() target_compile_definitions(sqlite3 INTERFACE "SQLITE_API=__attribute__((visibility(\"default\")))" ) endif() endif() target_include_directories(sqlite3 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/sqlite") target_link_libraries(sqlite3 PRIVATE ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS}) install( TARGETS sqlite3 LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ) set_target_properties(sqlite3 PROPERTIES OUTPUT_NAME sqlite3 ) target_compile_definitions(sqlite3 PUBLIC SQLITE_THREADSAFE=2 SQLITE_DEFAULT_MEMSTATUS=0 SQLITE_DEFAULT_SYNCHRONOUS=3 SQLITE_OMIT_AUTHORIZATION SQLITE_OMIT_DEPRECATED ) if(MSVC) target_compile_options(sqlite3 PRIVATE /W0) else() target_compile_options(sqlite3 PRIVATE -w) endif() ``` -------------------------------- ### Get Server Information Source: https://github.com/awawa-dev/hyperhdr/wiki/JSON-API Retrieves general server information, including the current state of various HyperHDR features like HDR tone mapping. This is useful for monitoring and determining the current operational status. ```APIDOC ## GET /json-rpc ### Description Retrieves server information, which includes the current state of HDR tone mapping. ### Method GET ### Endpoint `http://IP_OF_HYPERHDR:8090/json-rpc?request={%22command%22%3A%22serverinfo%22}` ### Parameters #### Query Parameters - **request** (string) - Required - A JSON string containing the command. For example: `{"command":"serverinfo"}` ### Request Example ```json { "command": "serverinfo" } ``` ### Response #### Success Response (200) - **serverinfo** (object) - An object containing various server details. The `videomodehdr` property within this object indicates the HDR tone mapping state (0 for OFF, 1 for ON). #### Response Example ```json { "serverinfo": { "videomodehdr": 1 } } ``` ``` -------------------------------- ### Run windeployqt Post-Build for Windows Source: https://github.com/awawa-dev/hyperhdr/blob/master/tests/codec_test/CMakeLists.txt Configures a post-build custom command to run windeployqt on the 'DecoderTest' executable if on Windows and windeployqt is found. This ensures necessary Qt libraries are deployed. ```cmake if (WIN32 AND WINDEPLOYQT_EXECUTABLE) add_custom_command(TARGET DecoderTest POST_BUILD COMMAND "${WINDEPLOYQT_EXECUTABLE}" --no-compiler-runtime "$" COMMENT "Running windeployqt for $ build" ) endif() ``` -------------------------------- ### Control HDR Tone Mapping Source: https://github.com/awawa-dev/hyperhdr/wiki/JSON-API Remotely control the HDR tone mapping state by sending specific JSON commands via HTTP GET requests. This allows for dynamic adjustment of HDR processing based on external triggers or system states. ```APIDOC ## POST /json-rpc ### Description Turns HDR tone mapping OFF or ON by sending a JSON-RPC command. ### Method GET ### Endpoint `http://IP_OF_HYPERHDR:8090/json-rpc?request={%22command%22%3A%22videomodehdr%22%2C%22HDR%22%3A0}` (OFF) `http://IP_OF_HYPERHDR:8090/json-rpc?request={%22command%22%3A%22videomodehdr%22%2C%22HDR%22%3A1}` (ON) ### Parameters #### Query Parameters - **request** (string) - Required - A JSON string containing the command and parameters. For example: `{"command":"videomodehdr", "HDR":0}` ### Request Example ```json { "command": "videomodehdr", "HDR": 0 } ``` ### Response #### Success Response (200) - **videomodehdr** (integer) - The current state of HDR tone mapping (0 for OFF, 1 for ON). #### Response Example (Note: The exact response for this specific command is not detailed, but the `serverinfo` command returns a JSON object that includes `videomodehdr`.) ``` -------------------------------- ### Create macOS Sound Capture Library Source: https://github.com/awawa-dev/hyperhdr/blob/master/sources/sound-capture/macos/CMakeLists.txt Creates an OBJECT library named 'sound-capture-macos' using the collected source files. OBJECT libraries are useful for modular builds. ```cmake add_library(sound-capture-macos OBJECT ${SOUNDCAPMACOS_SOURCES} ) ```