diff --git a/.cmake-format.json b/.cmake-format.json index b70e8c5..31bd607 100644 --- a/.cmake-format.json +++ b/.cmake-format.json @@ -6,15 +6,6 @@ "autosort": true }, "additional_commands": { - "find_qt": { - "flags": [], - "kwargs": { - "COMPONENTS": "+", - "COMPONENTS_WIN": "+", - "COMPONENTS_MACOS": "+", - "COMPONENTS_LINUX": "+" - } - }, "set_target_properties_obs": { "pargs": 1, "flags": [], diff --git a/.github/scripts/utils.zsh/setup_linux b/.github/scripts/utils.zsh/setup_linux index cc3a2f6..d7fe829 100644 --- a/.github/scripts/utils.zsh/setup_linux +++ b/.github/scripts/utils.zsh/setup_linux @@ -42,6 +42,7 @@ if (( ! (${skips[(Ie)all]} + ${skips[(Ie)deps]}) )) { build-essential \ libgles2-mesa-dev \ libasound2-dev \ + libobs-dev \ obs-studio local -a _qt_packages=() diff --git a/.github/workflows/build-project.yaml b/.github/workflows/build-project.yaml index 9b53b75..bfcd7d8 100644 --- a/.github/workflows/build-project.yaml +++ b/.github/workflows/build-project.yaml @@ -73,16 +73,12 @@ jobs: macos-build: name: Build for macOS 🍏 - runs-on: macos-13 + runs-on: macos-14 needs: check-event defaults: run: shell: zsh --no-rcs --errexit --pipefail {0} steps: - - uses: "maxim-lobanov/setup-xcode@v1" - with: - xcode-version: "14.3" - - uses: actions/checkout@v4 with: submodules: recursive @@ -94,6 +90,10 @@ jobs: : Set Up Environment 🔧 if (( ${+RUNNER_DEBUG} )) setopt XTRACE + print '::group::Enable Xcode 15.2' + sudo xcode-select --switch /Applications/Xcode_15.2.app/Contents/Developer + print '::endgroup::' + print '::group::Clean Homebrew Environment' local -a to_remove=() diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 64ec703..af5b530 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -106,7 +106,7 @@ jobs: - name: Create Release 🛫 if: fromJSON(steps.check.outputs.validTag) id: create_release - uses: softprops/action-gh-release@d4e8205d7e959a9107da6396278b2f1f07af0f9b + uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564 with: draft: true prerelease: ${{ fromJSON(steps.check.outputs.prerelease) }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 780a1b6..a5c036f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,8 +26,8 @@ if(ENABLE_FRONTEND_API) endif() if(ENABLE_QT) - find_qt(COMPONENTS Widgets Core) - target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE Qt::Core Qt::Widgets) + find_package(Qt6 COMPONENTS Widgets Core) + target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE Qt6::Core Qt6::Widgets) target_compile_options( ${CMAKE_PROJECT_NAME} PRIVATE $<$:-Wno-quoted-include-in-framework-header -Wno-comma>) diff --git a/CMakePresets.json b/CMakePresets.json index d3345f0..70eeb71 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -28,7 +28,6 @@ "generator": "Xcode", "warnings": {"dev": true, "deprecated": true}, "cacheVariables": { - "QT_VERSION": "6", "CMAKE_OSX_DEPLOYMENT_TARGET": "11.0", "CODESIGN_IDENTITY": "$penv{CODESIGN_IDENT}", "CODESIGN_TEAM": "$penv{CODESIGN_TEAM}" @@ -59,7 +58,6 @@ "architecture": "x64", "warnings": {"dev": true, "deprecated": true}, "cacheVariables": { - "QT_VERSION": "6", "CMAKE_SYSTEM_VERSION": "10.0.18363.657" } }, @@ -86,7 +84,6 @@ "generator": "Ninja", "warnings": {"dev": true, "deprecated": true}, "cacheVariables": { - "QT_VERSION": "6", "CMAKE_BUILD_TYPE": "RelWithDebInfo" } }, @@ -114,7 +111,6 @@ "generator": "Ninja", "warnings": {"dev": true, "deprecated": true}, "cacheVariables": { - "QT_VERSION": "6", "CMAKE_BUILD_TYPE": "RelWithDebInfo" } }, diff --git a/buildspec.json b/buildspec.json index b389114..cfb8a17 100644 --- a/buildspec.json +++ b/buildspec.json @@ -1,33 +1,33 @@ { "dependencies": { "obs-studio": { - "version": "30.0.2", + "version": "30.1.2", "baseUrl": "https://github.com/obsproject/obs-studio/archive/refs/tags", "label": "OBS Studio source code", "hashes": { - "macos": "be12c3ad0a85713750d8325e4b1db75086223402d7080d0e3c2833d7c5e83c27", - "windows-x64": "970058c49322cfa9cd6d620abb393fed89743ba7e74bd9dbb6ebe0ea8141d9c7" + "macos": "490bae1c392b3b344b0270afd8cb887da4bc50bd92c0c426e96713c1ccb9701a", + "windows-x64": "c2dd03fa7fd01fad5beafce8f7156da11f9ed9a588373fd40b44a06f4c03b867" } }, "prebuilt": { - "version": "2023-11-03", + "version": "2024-03-19", "baseUrl": "https://github.com/obsproject/obs-deps/releases/download", "label": "Pre-Built obs-deps", "hashes": { - "macos": "90c2fc069847ec2768dcc867c1c63b112c615ed845a907dc44acab7a97181974", - "windows-x64": "d0825a6fb65822c993a3059edfba70d72d2e632ef74893588cf12b1f0d329ce6" + "macos": "2e9bfb55a5e0e4c1086fa1fda4cf268debfead473089df2aaea80e1c7a3ca7ff", + "windows-x64": "6e86068371526a967e805f6f9903f9407adb683c21820db5f07da8f30d11e998" } }, "qt6": { - "version": "2023-11-03", + "version": "2024-03-19", "baseUrl": "https://github.com/obsproject/obs-deps/releases/download", "label": "Pre-Built Qt6", "hashes": { - "macos": "ba4a7152848da0053f63427a2a2cb0a199af3992997c0db08564df6f48c9db98", - "windows-x64": "bc57dedf76b47119a6dce0435a2f21b35b08c8f2948b1cb34a157320f77732d1" + "macos": "694f1e639c017e3b1f456f735330dc5afae287cbea85757101af1368de3142c8", + "windows-x64": "72d1df34a0ef7413a681d5fcc88cae81da60adc03dcd23ef17862ab170bcc0dd" }, "debugSymbols": { - "windows-x64": "fd8ecd1d8cd2ef049d9f4d7fb5c134f784836d6020758094855dfa98bd025036" + "windows-x64": "fbddd1f659c360f2291911ac5709b67b6f8182e6bca519d24712e4f6fd3cc865" } } }, @@ -38,11 +38,11 @@ }, "name": "obs-midi-mg", "displayName": "obs-midi-mg", - "version": "3.0.2", + "version": "3.0.3", "author": "nhielost", "email": "nhielost@gmail.com", "website": "https://github.com/nhielost/obs-midi-mg", "uuids": { - "windowsApp": "4B306DCD-DA45-4F74-BE41-B66947BA118A" + "windowsApp": "3C15961E-1303-4243-B467-82EA866275B4" } } diff --git a/cmake/common/helpers_common.cmake b/cmake/common/helpers_common.cmake index b61fa54..cdae2b1 100644 --- a/cmake/common/helpers_common.cmake +++ b/cmake/common/helpers_common.cmake @@ -6,91 +6,6 @@ include_guard(GLOBAL) -# * Use QT_VERSION value as a hint for desired Qt version -# * If "AUTO" was specified, prefer Qt6 over Qt5 -# * Creates versionless targets of desired component if none had been created by Qt itself (Qt versions < 5.15) -if(NOT QT_VERSION) - set(QT_VERSION - AUTO - CACHE STRING "OBS Qt version [AUTO, 5, 6]" FORCE) - set_property(CACHE QT_VERSION PROPERTY STRINGS AUTO 5 6) -endif() - -# find_qt: Macro to find best possible Qt version for use with the project: -macro(find_qt) - set(multiValueArgs COMPONENTS COMPONENTS_WIN COMPONENTS_MAC COMPONENTS_LINUX) - cmake_parse_arguments(find_qt "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - # Do not use versionless targets in the first step to avoid Qt::Core being clobbered by later opportunistic - # find_package runs - set(QT_NO_CREATE_VERSIONLESS_TARGETS TRUE) - - message(DEBUG "Start Qt version discovery...") - # Loop until _QT_VERSION is set or FATAL_ERROR aborts script execution early - while(NOT _QT_VERSION) - message(DEBUG "QT_VERSION set to ${QT_VERSION}") - if(QT_VERSION STREQUAL AUTO AND NOT qt_test_version) - set(qt_test_version 6) - elseif(NOT QT_VERSION STREQUAL AUTO) - set(qt_test_version ${QT_VERSION}) - endif() - message(DEBUG "Attempting to find Qt${qt_test_version}") - - find_package( - Qt${qt_test_version} - COMPONENTS Core - QUIET) - - if(TARGET Qt${qt_test_version}::Core) - set(_QT_VERSION - ${qt_test_version} - CACHE INTERNAL "") - message(STATUS "Qt version found: ${_QT_VERSION}") - unset(qt_test_version) - break() - elseif(QT_VERSION STREQUAL AUTO) - if(qt_test_version EQUAL 6) - message(WARNING "Qt6 was not found, falling back to Qt5") - set(qt_test_version 5) - continue() - endif() - endif() - message(FATAL_ERROR "Neither Qt6 nor Qt5 found.") - endwhile() - - # Enable versionless targets for the remaining Qt components - set(QT_NO_CREATE_VERSIONLESS_TARGETS FALSE) - - set(qt_components ${find_qt_COMPONENTS}) - if(OS_WINDOWS) - list(APPEND qt_components ${find_qt_COMPONENTS_WIN}) - elseif(OS_MACOS) - list(APPEND qt_components ${find_qt_COMPONENTS_MAC}) - else() - list(APPEND qt_components ${find_qt_COMPONENTS_LINUX}) - endif() - message(DEBUG "Trying to find Qt components ${qt_components}...") - - find_package(Qt${_QT_VERSION} REQUIRED ${qt_components}) - - list(APPEND qt_components Core) - - if("Gui" IN_LIST find_qt_COMPONENTS_LINUX) - list(APPEND qt_components "GuiPrivate") - endif() - - # Check for versionless targets of each requested component and create if necessary - foreach(component IN LISTS qt_components) - message(DEBUG "Checking for target Qt::${component}") - if(NOT TARGET Qt::${component} AND TARGET Qt${_QT_VERSION}::${component}) - add_library(Qt::${component} INTERFACE IMPORTED) - set_target_properties(Qt::${component} PROPERTIES INTERFACE_LINK_LIBRARIES Qt${_QT_VERSION}::${component}) - endif() - set_property(TARGET Qt::${component} PROPERTY INTERFACE_COMPILE_FEATURES "") - endforeach() - -endmacro() - # check_uuid: Helper function to check for valid UUID function(check_uuid uuid_string return_value) set(valid_uuid TRUE) diff --git a/src/actions/mmg-action-video-sources.cpp b/src/actions/mmg-action-video-sources.cpp index c7624bc..3f7a272 100644 --- a/src/actions/mmg-action-video-sources.cpp +++ b/src/actions/mmg-action-video-sources.cpp @@ -313,7 +313,8 @@ void MMGActionVideoSources::onList2Change() break; case SOURCE_VIDEO_CUSTOM: - display()->setFields(MMGOBSFields::registerSource(OBSSourceAutoRelease(currentSource()), _json)); + display()->setFields( + MMGOBSFields::registerSource(OBSSourceAutoRelease(currentSource()), _json)); break; default: diff --git a/src/obs-midi-mg.h b/src/obs-midi-mg.h index 828e281..9d4f013 100644 --- a/src/obs-midi-mg.h +++ b/src/obs-midi-mg.h @@ -30,7 +30,7 @@ with this program. If not, see class MMGConfig; MMGConfig *config(); -#define OBS_MIDIMG_VERSION "v3.0.2" +#define OBS_MIDIMG_VERSION "v3.0.3" #define qtocs() toUtf8().constData() #define mmgtocs() value().qtocs() diff --git a/src/ui/mmg-fields.cpp b/src/ui/mmg-fields.cpp index e008901..8a509eb 100644 --- a/src/ui/mmg-fields.cpp +++ b/src/ui/mmg-fields.cpp @@ -119,7 +119,7 @@ void MMGOBSNumberField::execute(QJsonObject &data, const MMGMessage *message) co void MMGOBSNumberField::customEventReceived(MMGNumberList &nums, const QJsonObject &data) const { if (number.state() == STATE_IGNORE) return; - + MMGNumber _number = number; double val = data[_name].toDouble();