Skip to content

Commit

Permalink
Fix build issues and update version to 3.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
nhielost committed Apr 18, 2024
1 parent 701abe0 commit 0d1d8fd
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 121 deletions.
9 changes: 0 additions & 9 deletions .cmake-format.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [],
Expand Down
1 change: 1 addition & 0 deletions .github/scripts/utils.zsh/setup_linux
Original file line number Diff line number Diff line change
Expand Up @@ -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=()
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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=()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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) }}
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 $<$<C_COMPILER_ID:Clang,AppleClang>:-Wno-quoted-include-in-framework-header
-Wno-comma>)
Expand Down
4 changes: 0 additions & 4 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -59,7 +58,6 @@
"architecture": "x64",
"warnings": {"dev": true, "deprecated": true},
"cacheVariables": {
"QT_VERSION": "6",
"CMAKE_SYSTEM_VERSION": "10.0.18363.657"
}
},
Expand All @@ -86,7 +84,6 @@
"generator": "Ninja",
"warnings": {"dev": true, "deprecated": true},
"cacheVariables": {
"QT_VERSION": "6",
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
Expand Down Expand Up @@ -114,7 +111,6 @@
"generator": "Ninja",
"warnings": {"dev": true, "deprecated": true},
"cacheVariables": {
"QT_VERSION": "6",
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
Expand Down
24 changes: 12 additions & 12 deletions buildspec.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
},
Expand All @@ -38,11 +38,11 @@
},
"name": "obs-midi-mg",
"displayName": "obs-midi-mg",
"version": "3.0.2",
"version": "3.0.3",
"author": "nhielost",
"email": "[email protected]",
"website": "https://github.com/nhielost/obs-midi-mg",
"uuids": {
"windowsApp": "4B306DCD-DA45-4F74-BE41-B66947BA118A"
"windowsApp": "3C15961E-1303-4243-B467-82EA866275B4"
}
}
85 changes: 0 additions & 85 deletions cmake/common/helpers_common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion src/actions/mmg-action-video-sources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/obs-midi-mg.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
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()
Expand Down
2 changes: 1 addition & 1 deletion src/ui/mmg-fields.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 0d1d8fd

Please sign in to comment.