Skip to content

Commit

Permalink
Merge branch 'master' into dx_multi_monior_support
Browse files Browse the repository at this point in the history
  • Loading branch information
awawa-dev committed Nov 20, 2024
2 parents ceefa88 + fa32e0f commit 96eae58
Show file tree
Hide file tree
Showing 77 changed files with 4,944 additions and 1,622 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/image-builder-from-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
sudo apt install coreutils p7zip-full qemu-user-static xz-utils
- name: Checkout CustomPiOS
uses: actions/[email protected].0
uses: actions/[email protected].2
with:
repository: 'guysoft/CustomPiOS'
ref: '${{ github.event.inputs.tagCustomPiOS }}'
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
echo "image=$IMAGE" >> $GITHUB_OUTPUT
# artifact upload will take care of zipping for us
- uses: actions/[email protected].0
- uses: actions/[email protected].3
with:
name: ${{ steps.copy.outputs.image }}
path: ${{ steps.copy.outputs.image }}.img.xz
4 changes: 2 additions & 2 deletions .github/workflows/image-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
sudo apt install coreutils p7zip-full qemu-user-static
- name: Checkout CustomPiOS
uses: actions/[email protected].0
uses: actions/[email protected].2
with:
repository: 'guysoft/CustomPiOS'
path: CustomPiOS
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
echo "image=$IMAGE" >> $GITHUB_OUTPUT
# artifact upload will take care of zipping for us
- uses: actions/[email protected].0
- uses: actions/[email protected].3
with:
name: ${{ steps.copy.outputs.image }}
path: ${{ steps.copy.outputs.image }}.img
32 changes: 16 additions & 16 deletions .github/workflows/push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
platform: linux
steps:
# checkout
- uses: actions/[email protected].0
- uses: actions/[email protected].2
with:
submodules: true

Expand All @@ -83,7 +83,7 @@ jobs:
# download cache
- name: Download ccache files
if: env.USE_CACHE == 'true'
uses: actions/cache@v4.0.2
uses: actions/cache@v4.1.2
with:
path: .ccache
key: ${{ matrix.linuxVersion }}-${{ matrix.dockerImage }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
Expand Down Expand Up @@ -115,15 +115,15 @@ jobs:
# Upload artifacts (only on tagged commit)
- name: Upload artifacts
if: startsWith(github.event.ref, 'refs/tags') && github.event_name != 'pull_request'
uses: actions/[email protected].0
uses: actions/[email protected].3
with:
name: release-artifact-${{ matrix.linuxVersion }}-${{ matrix.dockerImage }}
path: deploy/Hyper*

# Upload artifacts from commit
- name: Upload artifacts from commit
if: (startsWith(github.event.ref, 'refs/tags') != true) && github.event_name != 'pull_request'
uses: actions/[email protected].0
uses: actions/[email protected].3
with:
name: Linux-${{ matrix.linuxVersion }}-${{ matrix.dockerImage }}-installer
path: |
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
NICE_NAME: x64
steps:
# Checkout
- uses: actions/[email protected].0
- uses: actions/[email protected].2
with:
submodules: true

Expand All @@ -167,7 +167,7 @@ jobs:
# Download cache
- name: Download ccache files
if: env.USE_CACHE == 'true'
uses: actions/cache@v4.0.2
uses: actions/cache@v4.1.2
with:
path: build/.ccache
key: macOS-ccache-${{ matrix.NICE_NAME }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
Expand Down Expand Up @@ -204,15 +204,15 @@ jobs:
# Upload artifacts (only on tagged commit)
- name: Upload artifacts
if: startsWith(github.event.ref, 'refs/tags') && github.event_name != 'pull_request'
uses: actions/[email protected].0
uses: actions/[email protected].3
with:
name: release-artifact-${{ matrix.JOB_RUNNER }}
path: build/Hyper*.dmg

# Upload artifacts from commit
- name: Upload artifacts from commit
if: (startsWith(github.event.ref, 'refs/tags') != true) && github.event_name != 'pull_request'
uses: actions/[email protected].0
uses: actions/[email protected].3
with:
name: Apple_macOS_${{ matrix.NICE_NAME }}_DMG_installer
path: build/Hyper*.dmg
Expand All @@ -229,12 +229,12 @@ jobs:
QT_VERSION: 6.5.3
steps:
- name: Checkout
uses: actions/[email protected].0
uses: actions/[email protected].2
with:
submodules: true

- name: Cache Qt
uses: actions/cache@v4.0.2
uses: actions/cache@v4.1.2
id: cache-qt-windows
with:
path: ${{ runner.workspace }}/Qt
Expand All @@ -258,7 +258,7 @@ jobs:
# Download cache
- name: Download ccache files
if: env.USE_CACHE == 'true'
uses: actions/cache@v4.0.2
uses: actions/cache@v4.1.2
with:
path: build/.ccache
key: ${{ runner.os }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
Expand Down Expand Up @@ -303,15 +303,15 @@ jobs:
# Upload artifacts (only on tagged commit)
- name: Upload artifacts
if: startsWith(github.event.ref, 'refs/tags') && github.event_name != 'pull_request'
uses: actions/[email protected].0
uses: actions/[email protected].3
with:
name: release-artifact-windows
path: build/Hyper*

# Upload artifacts from commit
- name: Upload artifacts from commit
if: (startsWith(github.event.ref, 'refs/tags') != true) && github.event_name != 'pull_request'
uses: actions/[email protected].0
uses: actions/[email protected].3
with:
name: Windows_x64_setup
path: build/Hyper*.exe
Expand All @@ -337,7 +337,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/[email protected].0
uses: actions/[email protected].2
if: env.USE_CODEQL == 'true'
with:
submodules: true
Expand All @@ -361,7 +361,7 @@ jobs:
contents: write
steps:
- name: Checkout
uses: actions/[email protected].0
uses: actions/[email protected].2

# generate environment variables
- name: Generate environment variables from version and tag
Expand All @@ -385,7 +385,7 @@ jobs:

# create draft release and upload artifacts
- name: Create draft release
uses: softprops/[email protected].8
uses: softprops/[email protected].9
with:
name: HyperHDR ${{ env.VERSION }}
tag_name: ${{ env.TAG }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/upload-to-github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:

steps:
# checkout
- uses: actions/[email protected].0
- uses: actions/[email protected].2
with:
submodules: true

Expand All @@ -78,7 +78,7 @@ jobs:
# download cache
- name: ccache cache files
if: ( env.USE_CACHE == '1' )
uses: actions/cache@v4.0.2
uses: actions/cache@v4.1.2
with:
path: .ccache
key: ${{ matrix.linuxVersion }}-${{ matrix.dockerImage }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
rm -r repo/pool/ArchLinux ||:
- name: Upload artifacts from commit
uses: actions/[email protected].0
uses: actions/[email protected].3
with:
name: release-artifact-${{ matrix.linuxVersion }}-${{ matrix.dockerImage }}
path: repo
Expand All @@ -124,7 +124,7 @@ jobs:

steps:
# Download artifacts from previous build process
- uses: actions/[email protected].0
- uses: actions/[email protected].2
with:
submodules: false
- name: Download artifacts
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@
[submodule "external/stb"]
path = external/stb
url = https://github.com/nothings/stb.git
[submodule "external/linalg"]
path = external/linalg
url = https://github.com/sgorsten/linalg.git
48 changes: 38 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,41 @@ if ( "${PLATFORM}" MATCHES "osx" )
list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/qt5")
endif()

SET ( DEFAULT_AVF ON )
SET ( DEFAULT_MAC_SYSTEM ON )
SET ( DEFAULT_AVF ON )
SET ( DEFAULT_EMBEDDED_WEB_RESOURCES OFF )

if (CMAKE_OSX_DEPLOYMENT_TARGET)
set(CMAKE_OSX_HYPERHDR_DEPLOYMENT_TARGET ${CMAKE_OSX_DEPLOYMENT_TARGET})
else()
set(VERSION_REPLACEMENT ${CMAKE_OSX_SYSROOT})
string(REPLACE "/SDKs/MacOSX" "." VERSION_REPLACEMENT ${VERSION_REPLACEMENT})
string(REPLACE "." ";" VERSION_REPLACEMENT_LIST ${VERSION_REPLACEMENT})
list(LENGTH VERSION_REPLACEMENT_LIST VERSION_REPLACEMENT_LIST_LENGTH)
if (${VERSION_REPLACEMENT_LIST_LENGTH} GREATER_EQUAL 1)
list (GET VERSION_REPLACEMENT_LIST 1 CMAKE_OSX_HYPERHDR_DEPLOYMENT_TARGET)
endif()
endif(CMAKE_OSX_DEPLOYMENT_TARGET)

if (CMAKE_OSX_HYPERHDR_DEPLOYMENT_TARGET)
message(STATUS "CMAKE_OSX_DEPLOYMENT_TARGET: ${CMAKE_OSX_HYPERHDR_DEPLOYMENT_TARGET}")
SET(CMAKE_OSX_DEPLOYMENT_TARGET_COPY ${CMAKE_OSX_HYPERHDR_DEPLOYMENT_TARGET})
string(REPLACE "." ";" CMAKE_OSX_DEPLOYMENT_TARGET_COPY_LIST ${CMAKE_OSX_DEPLOYMENT_TARGET_COPY})
list(GET CMAKE_OSX_DEPLOYMENT_TARGET_COPY_LIST 0 MACOS_MAJOR_VERSION)
message(STATUS "MAJOR MACOS VERSION: ${MACOS_MAJOR_VERSION}")

if (${MACOS_MAJOR_VERSION} GREATER_EQUAL "15")
message(STATUS "Looking for: ScreenCaptureKit")
find_library(MACOS_SCK ScreenCaptureKit)
if (MACOS_SCK)
SET ( DEFAULT_MAC_SYSTEM ON )
else()
message(WARNING "Could not find: ScreenCaptureKit")
endif(MACOS_SCK)
else()
SET ( DEFAULT_MAC_SYSTEM ON )
endif()
endif(CMAKE_OSX_HYPERHDR_DEPLOYMENT_TARGET)

elseif ( "${PLATFORM}" MATCHES "rpi" )
SET ( DEFAULT_WS281XPWM ON )
SET ( DEFAULT_CEC ON )
Expand Down Expand Up @@ -550,14 +581,11 @@ if(NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-psabi")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-psabi")
endif()
if(COMPILER_SUPPORTS_CXX17 AND Qt_VERSION EQUAL 6)
message(STATUS "Enabling support for C++17 for QT6")
if(COMPILER_SUPPORTS_CXX17)
message(STATUS "Enabling support for C++17")
set(CMAKE_CXX_STANDARD 17)
elseif(COMPILER_SUPPORTS_CXX11)
message(STATUS "Enabling support for C++11")
set(CMAKE_CXX_STANDARD 11)
else()
message(STATUS "No support for C++11 detected. Compilation will most likely fail on your compiler")
message(STATUS "No support for C++17 detected. Compilation will most likely fail on your compiler")
endif()
else()
include(CheckCXXCompilerFlag)
Expand Down Expand Up @@ -691,8 +719,8 @@ add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_D
include (${CMAKE_CURRENT_SOURCE_DIR}/cmake/packages.cmake)

# external targets
if (WIN32 AND TARGET stb AND TARGET flatbuffers AND TARGET protobuf-nanopb AND TARGET lunasvg AND TARGET flatc AND TARGET qmqtt AND TARGET liblzma AND TARGET sqlite3)
set_target_properties(stb qmqtt flatbuffers protobuf-nanopb lunasvg flatc resources uninstall liblzma sqlite3 PROPERTIES FOLDER ExternalLibsTargets)
if (WIN32 AND TARGET stb AND TARGET flatbuffers AND TARGET protobuf-nanopb AND TARGET lunasvg AND TARGET flatc AND TARGET qmqtt AND TARGET liblzma AND TARGET sqlite3 AND TARGET precompiled_hyperhdr_headers)
set_target_properties(stb qmqtt flatbuffers protobuf-nanopb lunasvg flatc resources uninstall liblzma sqlite3 precompiled_hyperhdr_headers PROPERTIES FOLDER ExternalLibsTargets)
else()
set_target_properties(resources uninstall PROPERTIES FOLDER ExternalLibsTargets)
endif()
Expand Down
8 changes: 8 additions & 0 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ if(ENABLE_WS281XPWM)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/rpi_ws281x)
endif()

#=============================================================================
# LINALG
#=============================================================================

add_library(linalg INTERFACE)
target_compile_definitions(linalg INTERFACE LINALG_FORWARD_COMPATIBLE )
target_include_directories(linalg INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/linalg")

#=============================================================================
# LUNASVG
#=============================================================================
Expand Down
1 change: 1 addition & 0 deletions external/linalg
Submodule linalg added at 4460f1
2 changes: 1 addition & 1 deletion external/rpi_ws281x
Submodule rpi_ws281x updated 2 files
+1 −0 README.md
+14 −0 rpihw.c
16 changes: 11 additions & 5 deletions include/api/BaseAPI.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#pragma once

#ifndef PCH_ENABLED
#include <QThread>
#include <memory>
#endif

#include <base/HyperHdrInstance.h>
#include <base/HyperHdrManager.h>
#include <base/AccessManager.h>
Expand All @@ -18,12 +23,12 @@ class BaseAPI : public QObject

struct ImageCmdData
{
int priority;
int priority = 0;
QString origin;
int64_t duration;
int width;
int height;
int scale;
int64_t duration = 0;
int width = 0;
int height = 0;
int scale = 0;
QString format;
QString imgName;
QString imagedata;
Expand Down Expand Up @@ -122,6 +127,7 @@ class BaseAPI : public QObject
std::shared_ptr<GrabberHelper> _systemGrabber;
std::shared_ptr<PerformanceCounters> _performanceCounters;
std::shared_ptr<DiscoveryWrapper> _discoveryWrapper;
std::unique_ptr<QThread, std::function<void(QThread*)>> _lutCalibratorThread;

struct {
bool init = false;
Expand Down
4 changes: 2 additions & 2 deletions include/api/CallbackAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class CallbackAPI : public BaseAPI
void subscribe(QJsonArray subsArr);

protected:
std::unique_ptr<LutCalibrator> _lutCalibrator;
Image<ColorRgb> _liveImage;

void stopDataConnections() override = 0;
Expand All @@ -59,11 +58,12 @@ private slots:
void instancesListChangedHandler();
void tokenChangeHandler(const QVector<AccessManager::AuthDefinition>& def);
void signalBenchmarkUpdateHandler(int status, QString message);
void lutCalibrationUpdateHandler(const QJsonObject& data);
void performanceUpdateHandler(const QJsonObject& data);
#ifdef ENABLE_BONJOUR
void signalDiscoveryFoundServiceHandler(DiscoveryRecord::Service type, QList<DiscoveryRecord> records);
#endif
public slots:
void lutCalibrationUpdateHandler(const QJsonObject& data);

private:
QStringList _availableCommands;
Expand Down
Loading

0 comments on commit 96eae58

Please sign in to comment.