From 34af543eca2286c5b6981825801bd16f8c126c0d Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Thu, 8 Jan 2026 20:21:00 +0100 Subject: [PATCH 1/9] CI: Update gersemi formula As gersemi exists as a core Homebrew formula now, CI needs to use a version-pinned formula to avoid sudden format check failures due to possible "breaking changes" between gersemi versions. --- .github/actions/run-gersemi/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/run-gersemi/action.yaml b/.github/actions/run-gersemi/action.yaml index 5a6818f91a9bd1..33571402b0a831 100644 --- a/.github/actions/run-gersemi/action.yaml +++ b/.github/actions/run-gersemi/action.yaml @@ -50,7 +50,7 @@ runs: if (( ${+RUNNER_DEBUG} )) setopt XTRACE print ::group::Install gersemi - brew install --quiet obsproject/tools/gersemi + brew install --quiet obsproject/tools/gersemi@0.25 print ::endgroup:: print ::group::Run gersemi From ab2097526b3168e034546adcb35ae56a195d6e81 Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Thu, 8 Jan 2026 20:40:29 +0100 Subject: [PATCH 2/9] cmake: Apply gersemi 0.25 formatting --- cmake/common/buildspec_common.cmake | 3 +-- cmake/common/helpers_common.cmake | 3 +-- cmake/finders/FindAMF.cmake | 3 +-- cmake/finders/FindAsio.cmake | 3 +-- cmake/finders/FindCEF.cmake | 3 +-- cmake/finders/FindFFmpeg.cmake | 12 ++++-------- cmake/finders/FindFFnvcodec.cmake | 3 +-- cmake/finders/FindLibAJANTV2.cmake | 3 +-- cmake/finders/FindLibVLC.cmake | 3 +-- cmake/finders/FindLibva.cmake | 3 +-- cmake/finders/FindMbedTLS.cmake | 6 ++---- cmake/finders/FindPipeWire.cmake | 3 +-- cmake/finders/FindPulseAudio.cmake | 3 +-- cmake/finders/FindSIMDe.cmake | 3 +-- cmake/finders/FindUthash.cmake | 3 +-- cmake/finders/FindWebsocketpp.cmake | 3 +-- cmake/linux/helpers.cmake | 3 +-- cmake/macos/helpers.cmake | 3 +-- cmake/windows/helpers.cmake | 3 +-- libobs/CMakeLists.txt | 3 +-- shared/obs-scripting/obspython/CMakeLists.txt | 3 +-- 21 files changed, 25 insertions(+), 50 deletions(-) diff --git a/cmake/common/buildspec_common.cmake b/cmake/common/buildspec_common.cmake index d5d02cb994c94e..ac5286ea1b5bda 100644 --- a/cmake/common/buildspec_common.cmake +++ b/cmake/common/buildspec_common.cmake @@ -92,8 +92,7 @@ function(_check_dependencies) if(EXISTS "${dependencies_dir}/.dependency_${dependency}_${arch}.sha256") file( - READ - "${dependencies_dir}/.dependency_${dependency}_${arch}.sha256" + READ "${dependencies_dir}/.dependency_${dependency}_${arch}.sha256" OBS_DEPENDENCY_${dependency}_${arch}_HASH ) endif() diff --git a/cmake/common/helpers_common.cmake b/cmake/common/helpers_common.cmake index 7f7d6eac7babcb..4ce77230a09a4b 100644 --- a/cmake/common/helpers_common.cmake +++ b/cmake/common/helpers_common.cmake @@ -227,8 +227,7 @@ function(find_qt_plugins) endif() list( - APPEND - qt_plugins_Core + APPEND qt_plugins_Core platforms printsupport styles diff --git a/cmake/finders/FindAMF.cmake b/cmake/finders/FindAMF.cmake index 0a24f40406efef..142331e258a33e 100644 --- a/cmake/finders/FindAMF.cmake +++ b/cmake/finders/FindAMF.cmake @@ -37,8 +37,7 @@ find_path(AMF_INCLUDE_DIR NAMES AMF/core/Factory.h PATHS /usr/include /usr/local if(EXISTS "${AMF_INCLUDE_DIR}/AMF/core/Version.h") file( - STRINGS - "${AMF_INCLUDE_DIR}/AMF/core/Version.h" + STRINGS "${AMF_INCLUDE_DIR}/AMF/core/Version.h" _version_string REGEX "^.*VERSION_(MAJOR|MINOR|RELEASE|BUILD_NUM)[ \t]+[0-9]+[ \t]*$" ) diff --git a/cmake/finders/FindAsio.cmake b/cmake/finders/FindAsio.cmake index 6cdae9bb3c854e..3ea564f90ed472 100644 --- a/cmake/finders/FindAsio.cmake +++ b/cmake/finders/FindAsio.cmake @@ -50,8 +50,7 @@ if(PC_Asio_VERSION VERSION_GREATER 0) set(Asio_VERSION ${PC_Asio_VERSION}) elseif(EXISTS "${Asio_INCLUDE_DIR}/asio/version.hpp") file( - STRINGS - "${Asio_INCLUDE_DIR}/asio/version.hpp" + STRINGS "${Asio_INCLUDE_DIR}/asio/version.hpp" _version_string REGEX "#define[ \t]+ASIO_VERSION[ \t]+[0-9]+[ \t]+\\/\\/[ \t][0-9]+\\.[0-9]+\\.[0-9]+" ) diff --git a/cmake/finders/FindCEF.cmake b/cmake/finders/FindCEF.cmake index 2366f0b2d64666..f07eda39f34102 100644 --- a/cmake/finders/FindCEF.cmake +++ b/cmake/finders/FindCEF.cmake @@ -71,8 +71,7 @@ find_path( if(CEF_INCLUDE_DIR) file( - STRINGS - "${CEF_INCLUDE_DIR}/cef_version.h" + STRINGS "${CEF_INCLUDE_DIR}/cef_version.h" _VERSION_STRING REGEX "^.*CEF_VERSION_(MAJOR|MINOR|PATCH)[ \t]+[0-9]+[ \t]*$" ) diff --git a/cmake/finders/FindFFmpeg.cmake b/cmake/finders/FindFFmpeg.cmake index d5200ced887e80..ecba82d397315d 100644 --- a/cmake/finders/FindFFmpeg.cmake +++ b/cmake/finders/FindFFmpeg.cmake @@ -202,16 +202,14 @@ macro(FFmpeg_check_version) elseif(EXISTS "${FFmpeg_${component}_INCLUDE_DIR}/${component_libname}/version.h") if(EXISTS "${FFmpeg_${component}_INCLUDE_DIR}/${component_libname}/version_major.h") file( - STRINGS - "${FFmpeg_${component}_INCLUDE_DIR}/${component_libname}/version_major.h" + STRINGS "${FFmpeg_${component}_INCLUDE_DIR}/${component_libname}/version_major.h" _version_string REGEX "^.*VERSION_MAJOR[ \t]+[0-9]+[ \t]*$" ) string(REGEX REPLACE ".*VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" _version_major "${_version_string}") file( - STRINGS - "${FFmpeg_${component}_INCLUDE_DIR}/${component_libname}/version.h" + STRINGS "${FFmpeg_${component}_INCLUDE_DIR}/${component_libname}/version.h" _version_string REGEX "^.*VERSION_(MINOR|MICRO)[ \t]+[0-9]+[ \t]*$" ) @@ -219,8 +217,7 @@ macro(FFmpeg_check_version) string(REGEX REPLACE ".*VERSION_MICRO[ \t]+([0-9]+).*" "\\1" _version_patch "${_version_string}") else() file( - STRINGS - "${FFmpeg_${component}_INCLUDE_DIR}/${component_libname}/version.h" + STRINGS "${FFmpeg_${component}_INCLUDE_DIR}/${component_libname}/version.h" _version_string REGEX "^.*VERSION_(MAJOR|MINOR|MICRO)[ \t]+[0-9]+[ \t]*$" ) @@ -292,8 +289,7 @@ endif() if(EXISTS "${FFmpeg_avutil_INCLUDE_DIR}/libavutil/ffversion.h") file( - STRINGS - "${FFmpeg_avutil_INCLUDE_DIR}/libavutil/ffversion.h" + STRINGS "${FFmpeg_avutil_INCLUDE_DIR}/libavutil/ffversion.h" _version_string REGEX "^.*FFMPEG_VERSION[ \t]+\"n?[0-9a-z\\~+.-]+\"[ \t]*$" ) diff --git a/cmake/finders/FindFFnvcodec.cmake b/cmake/finders/FindFFnvcodec.cmake index 3d6564f5857278..80363a3c86273f 100644 --- a/cmake/finders/FindFFnvcodec.cmake +++ b/cmake/finders/FindFFnvcodec.cmake @@ -50,8 +50,7 @@ if(PC_FFnvcodec_VERSION VERSION_GREATER 0) set(FFnvcodec_VERSION ${PC_FFnvcodec_VERSION}) elseif(EXISTS "${FFnvcodec_INCLUDE_DIR}/ffnvcodec/nvEncodeAPI.h") file( - STRINGS - "${FFnvcodec_INCLUDE_DIR}/ffnvcodec/nvEncodeAPI.h" + STRINGS "${FFnvcodec_INCLUDE_DIR}/ffnvcodec/nvEncodeAPI.h" _version_string REGEX "^.*NVENCAPI_(MAJOR|MINOR)_VERSION[ \t]+[0-9]+[ \t]*$" ) diff --git a/cmake/finders/FindLibAJANTV2.cmake b/cmake/finders/FindLibAJANTV2.cmake index 9418f04cd60f41..460d91c4af34c2 100644 --- a/cmake/finders/FindLibAJANTV2.cmake +++ b/cmake/finders/FindLibAJANTV2.cmake @@ -122,8 +122,7 @@ unset(LibAJANTV2_ERROR_REASON) if(LibAJANTV2_FOUND) list( - APPEND - LibAJANTV2_INCLUDE_DIRS + APPEND LibAJANTV2_INCLUDE_DIRS ${LibAJANTV2_INCLUDE_DIR} ${LibAJANTV2_INCLUDE_DIR}/ajaanc ${LibAJANTV2_INCLUDE_DIR}/ajabase diff --git a/cmake/finders/FindLibVLC.cmake b/cmake/finders/FindLibVLC.cmake index bae5d1969b0b9c..80fe6fd123f3bc 100644 --- a/cmake/finders/FindLibVLC.cmake +++ b/cmake/finders/FindLibVLC.cmake @@ -64,8 +64,7 @@ if(PC_LibVLC_VERSION VERSION_GREATER 0) set(LibVLC_VERSION ${PC_LibVLC_VERSION}) elseif(EXISTS "${LibVLC_INCLUDE_DIR}/libvlc_version.h") file( - STRINGS - "${LibVLC_INCLUDE_DIR}/libvlc_version.h" + STRINGS "${LibVLC_INCLUDE_DIR}/libvlc_version.h" _VERSION_STRING REGEX "^.*LIBVLC_VERSION_(MAJOR|MINOR|PATCH)[ \t]+[0-9]+[ \t]*$" ) diff --git a/cmake/finders/FindLibva.cmake b/cmake/finders/FindLibva.cmake index 9a0089c7caa71b..757f6e988a93ff 100644 --- a/cmake/finders/FindLibva.cmake +++ b/cmake/finders/FindLibva.cmake @@ -79,8 +79,7 @@ if(PC_Libva_VERSION VERSION_GREATER 0) set(Libva_VERSION ${PC_Libva_VERSION}) elseif(EXISTS "${Libva_INCLUDE_DIR}/va_version.h") file( - STRINGS - "${Libva_INCLUDE_DIR}/va_version.h" + STRINGS "${Libva_INCLUDE_DIR}/va_version.h" _VERSION_STRING REGEX "^.*(MAJOR|MINOR|MICRO)_VERSION[ \t]+[0-9]+[ \t]*$" ) diff --git a/cmake/finders/FindMbedTLS.cmake b/cmake/finders/FindMbedTLS.cmake index 5b9d9d95536e90..f6fa184e9376c4 100644 --- a/cmake/finders/FindMbedTLS.cmake +++ b/cmake/finders/FindMbedTLS.cmake @@ -109,8 +109,7 @@ if(PC_MbedTLS_VERSION VERSION_GREATER 0) set(MbedTLS_VERSION ${PC_MbedTLS_VERSION}) elseif(EXISTS "${MbedTLS_INCLUDE_DIR}/mbedtls/build_info.h") file( - STRINGS - "${MbedTLS_INCLUDE_DIR}/mbedtls/build_info.h" + STRINGS "${MbedTLS_INCLUDE_DIR}/mbedtls/build_info.h" _VERSION_STRING REGEX "#define[ \t]+MBEDTLS_VERSION_STRING[ \t]+.+" ) @@ -123,8 +122,7 @@ elseif(EXISTS "${MbedTLS_INCLUDE_DIR}/mbedtls/build_info.h") ) elseif(EXISTS "${MbedTLS_INCLUDE_DIR}/mbedtls/version.h") file( - STRINGS - "${MbedTLS_INCLUDE_DIR}/mbedtls/version.h" + STRINGS "${MbedTLS_INCLUDE_DIR}/mbedtls/version.h" _VERSION_STRING REGEX "#define[ \t]+MBEDTLS_VERSION_STRING[ \t]+.+" ) diff --git a/cmake/finders/FindPipeWire.cmake b/cmake/finders/FindPipeWire.cmake index 377dcd776334a6..3c6447654638ae 100644 --- a/cmake/finders/FindPipeWire.cmake +++ b/cmake/finders/FindPipeWire.cmake @@ -74,8 +74,7 @@ if(PC_PipeWire_VERSION VERSION_GREATER 0) set(PipeWire_VERSION ${PC_PipeWire_VERSION}) elseif(EXISTS "${PipeWire_INCLUDE_DIR}/pipewire/version.h") file( - STRINGS - "${PipeWire_INCLUDE_DIR}/pipewire/version.h" + STRINGS "${PipeWire_INCLUDE_DIR}/pipewire/version.h" _version_string REGEX "^.*PW_(MAJOR|MINOR|MICRO)[ \t]+[0-9]+[ \t]*$" ) diff --git a/cmake/finders/FindPulseAudio.cmake b/cmake/finders/FindPulseAudio.cmake index d4aaa762831819..798b4d3a1c48b5 100644 --- a/cmake/finders/FindPulseAudio.cmake +++ b/cmake/finders/FindPulseAudio.cmake @@ -63,8 +63,7 @@ if(PC_PulseAudio_VERSION VERSION_GREATER 0) set(PulseAudio_VERSION ${PC_PulseAudio_VERSION}) elseif(EXISTS "${PulseAudio_INCLUDE_DIR}/version.h") file( - STRINGS - "${PulseAudio_INCLUDE_DIR}/version.h" + STRINGS "${PulseAudio_INCLUDE_DIR}/version.h" _VERSION_STRING REGEX "^.*pa_get_headers_version\\(\\)[\t ]+\\(\".*\"\\)[ \t]*$" ) diff --git a/cmake/finders/FindSIMDe.cmake b/cmake/finders/FindSIMDe.cmake index c2fbc541102c31..f58a9542957a72 100644 --- a/cmake/finders/FindSIMDe.cmake +++ b/cmake/finders/FindSIMDe.cmake @@ -48,8 +48,7 @@ find_path( if(EXISTS "${SIMDe_INCLUDE_DIR}/simde/simde-common.h") file( - STRINGS - "${SIMDe_INCLUDE_DIR}/simde/simde-common.h" + STRINGS "${SIMDe_INCLUDE_DIR}/simde/simde-common.h" _version_string REGEX "^.*VERSION_(MAJOR|MINOR|MICRO)[ \t]+[0-9]+[ \t]*$" ) diff --git a/cmake/finders/FindUthash.cmake b/cmake/finders/FindUthash.cmake index e3e1d5f0d86191..3eb7e8a2ef5473 100644 --- a/cmake/finders/FindUthash.cmake +++ b/cmake/finders/FindUthash.cmake @@ -37,8 +37,7 @@ find_path(Uthash_INCLUDE_DIR NAMES uthash.h PATHS /usr/include /usr/local/includ if(EXISTS "${Uthash_INCLUDE_DIR}/uthash.h") file( - STRINGS - "${Uthash_INCLUDE_DIR}/uthash.h" + STRINGS "${Uthash_INCLUDE_DIR}/uthash.h" _version_string REGEX "#define[ \t]+UTHASH_VERSION[ \t]+[0-9]+\\.[0-9]+\\.[0-9]+" ) diff --git a/cmake/finders/FindWebsocketpp.cmake b/cmake/finders/FindWebsocketpp.cmake index 5d928596c7e954..5c39c2d9b53e66 100644 --- a/cmake/finders/FindWebsocketpp.cmake +++ b/cmake/finders/FindWebsocketpp.cmake @@ -42,8 +42,7 @@ find_path( if(EXISTS "${Websocketpp_INCLUDE_DIR}/websocketpp/version.hpp") file( - STRINGS - "${Websocketpp_INCLUDE_DIR}/websocketpp/version.hpp" + STRINGS "${Websocketpp_INCLUDE_DIR}/websocketpp/version.hpp" _version_string REGEX "^.*(major|minor|patch)_version[ \t]+=[ \t]+[0-9]+" ) diff --git a/cmake/linux/helpers.cmake b/cmake/linux/helpers.cmake index c0966e69296092..d2d38dcd250c04 100644 --- a/cmake/linux/helpers.cmake +++ b/cmake/linux/helpers.cmake @@ -227,8 +227,7 @@ function(target_install_resources target) file(GLOB_RECURSE data_files "${CMAKE_CURRENT_SOURCE_DIR}/data/*") foreach(data_file IN LISTS data_files) cmake_path( - RELATIVE_PATH - data_file + RELATIVE_PATH data_file BASE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/" OUTPUT_VARIABLE relative_path ) diff --git a/cmake/macos/helpers.cmake b/cmake/macos/helpers.cmake index 2f203cd580fd6e..8913b2b24f9d96 100644 --- a/cmake/macos/helpers.cmake +++ b/cmake/macos/helpers.cmake @@ -357,8 +357,7 @@ function(target_install_resources target) list(FILTER data_files EXCLUDE REGEX "\\.DS_Store$") foreach(data_file IN LISTS data_files) cmake_path( - RELATIVE_PATH - data_file + RELATIVE_PATH data_file BASE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/" OUTPUT_VARIABLE relative_path ) diff --git a/cmake/windows/helpers.cmake b/cmake/windows/helpers.cmake index b4d0bf4ddd5658..9a443f1cf75736 100644 --- a/cmake/windows/helpers.cmake +++ b/cmake/windows/helpers.cmake @@ -305,8 +305,7 @@ function(target_install_resources target) file(GLOB_RECURSE data_files "${CMAKE_CURRENT_SOURCE_DIR}/data/*") foreach(data_file IN LISTS data_files) cmake_path( - RELATIVE_PATH - data_file + RELATIVE_PATH data_file BASE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/" OUTPUT_VARIABLE relative_path ) diff --git a/libobs/CMakeLists.txt b/libobs/CMakeLists.txt index 3dc0a28e1852d1..b20c2fa476ce5c 100644 --- a/libobs/CMakeLists.txt +++ b/libobs/CMakeLists.txt @@ -356,8 +356,7 @@ set( if(OS_WINDOWS) list( - APPEND - public_headers + APPEND public_headers util/threading-windows.h util/windows/ComPtr.hpp util/windows/CoTaskMemPtr.hpp diff --git a/shared/obs-scripting/obspython/CMakeLists.txt b/shared/obs-scripting/obspython/CMakeLists.txt index 837032f15db4da..28266ca474cf6c 100644 --- a/shared/obs-scripting/obspython/CMakeLists.txt +++ b/shared/obs-scripting/obspython/CMakeLists.txt @@ -31,8 +31,7 @@ swig_add_library(obspython LANGUAGE python TYPE MODULE SOURCES obspython.i) add_library(OBS::python ALIAS obspython) file( - GENERATE OUTPUT - $<$:$/>obspython.h + GENERATE OUTPUT $<$:$/>obspython.h CONTENT "#pragma once\n\n#define PYTHON_LIB \"$\"\n" ) From 2918db6b89944ca1ca5fc1a5e54a03bfa7c046c0 Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Thu, 8 Jan 2026 21:01:34 +0100 Subject: [PATCH 3/9] build-aux: Update gersemi formatting script --- build-aux/.run-format.zsh | 42 +++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/build-aux/.run-format.zsh b/build-aux/.run-format.zsh index ab74d28355d430..6d65893bf83629 100755 --- a/build-aux/.run-format.zsh +++ b/build-aux/.run-format.zsh @@ -92,16 +92,23 @@ invoke_formatter() { } ;; gersemi) - local formatter=gersemi - if (( ${+commands[gersemi]} )) { - local gersemi_version=($(gersemi --version)) - if ! is-at-least 0.21.0 ${gersemi_version[2]}; then - log_error "gersemi is not version 0.21.0 or above (found ${gersemi_version[2]}." - exit 2 - fi + if (( ${+commands[gersemi-0.25]} )) { + local formatter=gersemi-0.25 + } elif (( ${+commands[gersemi]} )) { + local formatter=gersemi + } else { + log_error "No viable gersemi version found (required 0.25.0)" + exit 2 } + local gersemi_version=($(${formatter} --version)) + + if ! is-at-least 0.25.0 ${gersemi_version[2]}; then + log_error "gersemi is not version 0.25.0 or above (found ${gersemi_version[2]}." + exit 2 + fi + if (( ! #source_files )) source_files=(CMakeLists.txt (libobs|libobs-*|frontend|plugins|deps|shared|cmake|test)/**/(CMakeLists.txt|*.cmake)(.N)) source_files=(${source_files:#*/(jansson|decklink/*/decklink-sdk|obs-websocket|obs-browser|libdshowcapture)/*}) @@ -112,16 +119,29 @@ invoke_formatter() { local -a source_files=($@) local file local -a command=(${formatter} -c --no-cache ${source_files}) + local -i in_error=0 if (( ${#source_files} )) { while read -r line; do local -a line_tokens=(${(z)line}) if (( #line_tokens )) { - file=${line_tokens[1]//*${project_root}\//} - - log_error "${file} requires formatting changes." + file=${line_tokens[1]} + + if [[ -r ${file} ]] { + in_error=0 + file=${file//*${project_root}\//} + + log_error "${file} requires formatting changes." + } else { + if (( in_error )) { + log_output "${line}" + } else { + log_error "${line}" + } + in_error=1 + } } else { - log_error "${line}" + log_output "${line}" } if (( fail_on_error == 2 )) return 2 From 155f180beebe4d908c21e18834e4aa544fccee34 Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Tue, 6 Jan 2026 22:37:54 +0100 Subject: [PATCH 4/9] cmake: Add dependency information to preset Custom build information can be added as "vendor" information to CMake preset files. This allows arbitrary JSON data to be added to the file, making the separate (custom) buildspec file obsolete. --- CMakePresets.json | 63 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/CMakePresets.json b/CMakePresets.json index f3ceafadaa8475..62b82ec8b6568b 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -20,6 +20,69 @@ "YOUTUBE_SECRET_HASH": {"type": "STRING", "value": "$penv{YOUTUBE_SECRET_HASH}"} } }, + { + "name": "dependencies", + "hidden": true, + "vendor": { + "obsproject.com/obs-studio": { + "dependencies": { + "prebuilt": { + "version": "2025-08-23", + "baseUrl": "https://github.com/obsproject/obs-deps/releases/download", + "label": "Pre-Built obs-deps", + "hashes": { + "macos-universal": "9403bb43fb0a9bb215739a5659ca274fe884dbbbcd22bd9ca781c961fb041c42", + "windows-x64": "8de229cff6f1981508c0eb646b35e644633a5855787b9f5d3b90ae2aeb87ffc1", + "windows-x86": "fb3c68b75911f292b3206e346053638db1c73605957207445a0a92b33ab5e00a", + "windows-arm64": "dd87ba00a6cbc153182fb62b3678a3b5021d1d11eb2730442060937a645eb97e" + } + }, + "qt6": { + "version": "2025-08-23", + "baseUrl": "https://github.com/obsproject/obs-deps/releases/download", + "label": "Pre-Built Qt6", + "hashes": { + "macos-universal": "990f11638b80a4509e14e8c315f6e4caa0861e37fcd3113a256fbff835ffca29", + "windows-x64": "c62e82483bc7c0bf199e8ac3220c66a85a6e8a0cd69a05b6d44f873b830e415f", + "windows-arm64": "cc8ec983de9b7d81aa98beeb1b989d707ee3c73b85b4d41c85d94114eba81f91" + }, + "debugSymbols": { + "windows-x64": "aae88a17e0211cb37db6a8602f2e20d69255be1f9700c699008ca5adbce1dde2", + "windows-arm64": "6e866490277a8b29e82a87fc2f22407f93ddaf86444ea0d284370339a05511b3" + } + }, + "cef": { + "version": "6533", + "baseUrl": "https://cdn-fastly.obsproject.com/downloads", + "label": "Chromium Embedded Framework", + "hashes": { + "macos-x86_64": "37bf7571a48c5dfa8519817e4a90a3503a0eb30f9eadd68f4c3e783e363f272a", + "macos-arm64": "429b50e74f6c174dcfe2f14d8204b54add497eaafe117f7b69ce6bb2354d2626", + "ubuntu-x86_64": "7963335519a19ccdc5233f7334c5ab023026e2f3e9a0cc417007c09d86608146", + "ubuntu-aarch64": "642514469eaa29a5c887891084d2e73f7dc2d7405f7dfa7726b2dbc24b309999", + "windows-x64": "922efbda1f2f8be9e5b2754d878a14d90afc81f04e94fc9101a7513e2b5cecc1", + "windows-arm64": "df9df4bd85826b4c071c6db404fd59cf93efd9c58ec3ab64e204466ae19bb02a" + }, + "revision": { + "macos-x86_64": 5, + "macos-arm64": 5, + "ubuntu-x86_64": 6, + "ubuntu-aarch64": 6, + "windows-x64": 2 + } + } + }, + "tools": { + "sparkle": { + "version": "2.6.4", + "baseUrl": "https://github.com/sparkle-project/Sparkle/releases/download", + "label": "Sparkle 2", + "hash": "50612a06038abc931f16011d7903b8326a362c1074dabccb718404ce8e585f0b" + } + } + } + } + }, { "name": "macos", "displayName": "macOS", From f143f7417450371c7d4a8df4e565c2a0c6de9f10 Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Tue, 6 Jan 2026 22:38:53 +0100 Subject: [PATCH 5/9] cmake: Update buildspec system to use preset file Updates code for dependency management to use "vendor" information from the CMake preset file. --- cmake/common/buildspec_common.cmake | 32 ++++++++++++++++++++++++++--- cmake/macos/buildspec.cmake | 4 +--- cmake/windows/buildspec.cmake | 5 ++--- 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/cmake/common/buildspec_common.cmake b/cmake/common/buildspec_common.cmake index ac5286ea1b5bda..8d01026e534ec5 100644 --- a/cmake/common/buildspec_common.cmake +++ b/cmake/common/buildspec_common.cmake @@ -46,11 +46,37 @@ function(_check_deps_version version) return(PROPAGATE found CMAKE_PREFIX_PATH) endfunction() +function(_get_dependency_data variable_name) + file(READ "${CMAKE_CURRENT_SOURCE_DIR}/CMakePresets.json" preset_data) + + string(JSON configure_presets GET ${preset_data} "configurePresets") + + string(JSON preset_count LENGTH "${configure_presets}") + math(EXPR preset_count "${preset_count}-1") + + foreach(index RANGE 0 ${preset_count}) + string(JSON preset_member_data GET "${configure_presets}" ${index}) + string(JSON preset_name GET ${preset_member_data} "name") + + if(preset_name STREQUAL dependencies) + string(JSON vendor_data GET ${preset_member_data} "vendor") + string(JSON vendor_data GET ${vendor_data} "obsproject.com/obs-studio") + string(JSON dependency_data GET ${vendor_data} "dependencies") + break() + else() + continue() + endif() + endforeach() + + set(${variable_name} "${dependency_data}") + + return(PROPAGATE ${variable_name}) +endfunction() + # _check_dependencies: Fetch and extract pre-built OBS build dependencies function(_check_dependencies) - file(READ "${CMAKE_CURRENT_SOURCE_DIR}/buildspec.json" buildspec) - - string(JSON dependency_data GET ${buildspec} dependencies) + set(dependencies_list ${ARGV}) + _get_dependency_data(dependency_data) foreach(dependency IN LISTS dependencies_list) if(dependency STREQUAL cef AND NOT ENABLE_BROWSER) diff --git a/cmake/macos/buildspec.cmake b/cmake/macos/buildspec.cmake index f4670c21ca23e8..f54608e29f2e4c 100644 --- a/cmake/macos/buildspec.cmake +++ b/cmake/macos/buildspec.cmake @@ -9,8 +9,6 @@ function(_check_dependencies_macos) set(arch universal) set(platform macos-${arch}) - file(READ "${CMAKE_CURRENT_SOURCE_DIR}/buildspec.json" buildspec) - set(dependencies_dir "${CMAKE_CURRENT_SOURCE_DIR}/.deps") set(prebuilt_filename "macos-deps-VERSION-ARCH-REVISION.tar.xz") set(prebuilt_destination "obs-deps-VERSION-ARCH") @@ -20,7 +18,7 @@ function(_check_dependencies_macos) set(cef_destination "cef_binary_VERSION_macos_ARCH") set(dependencies_list prebuilt qt6 cef) - _check_dependencies() + _check_dependencies(${dependencies_list}) execute_process( COMMAND "xattr" -r -d com.apple.quarantine "${dependencies_dir}/${destination}" diff --git a/cmake/windows/buildspec.cmake b/cmake/windows/buildspec.cmake index 3692cb1cfd1a57..f2a58493c78b18 100644 --- a/cmake/windows/buildspec.cmake +++ b/cmake/windows/buildspec.cmake @@ -11,9 +11,8 @@ function(_handle_qt_cross_compile architecture) set(multiValueArgs "") cmake_parse_arguments(PARSE_ARGV 0 _HQCC "${options}" "${oneValueArgs}" "${multiValueArgs}") - file(READ "${CMAKE_CURRENT_SOURCE_DIR}/buildspec.json" buildspec) + _get_dependency_data(dependency_data) - string(JSON dependency_data GET ${buildspec} dependencies) string(JSON data GET ${dependency_data} qt6) string(JSON version GET ${data} version) @@ -100,7 +99,7 @@ function(_check_dependencies_windows) endif() set(platform windows-${arch}) - _check_dependencies() + _check_dependencies(${dependencies_list}) if(NOT CMAKE_VS_PLATFORM_NAME STREQUAL Win32) _handle_qt_cross_compile(${CMAKE_HOST_SYSTEM_PROCESSOR} DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.deps/${qt6_destination}") From 208996196cdd03472b7b300580b4346cfc23bad4 Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Tue, 6 Jan 2026 22:40:21 +0100 Subject: [PATCH 6/9] CI: Replace buildspec in Appcast update action Updates the sparkle-appcast action to use Sparkle version information from the CMake preset file instead of the obsoleted buildspec file. --- .github/actions/sparkle-appcast/action.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/actions/sparkle-appcast/action.yaml b/.github/actions/sparkle-appcast/action.yaml index 348d4404f31456..c366113f08f010 100644 --- a/.github/actions/sparkle-appcast/action.yaml +++ b/.github/actions/sparkle-appcast/action.yaml @@ -55,7 +55,13 @@ runs: local base_url local hash IFS=';' read -r version base_url hash <<< \ - "$(jq -r '.tools.sparkle | {version, baseUrl, hash} | join(";")' buildspec.json)" + "$(jq -r ' + .configurePresets[] + | select(.name=="dependencies") + | .vendor["obsproject.com/obs-studio"].tools.sparkle + | {version, baseUrl, hash} + | join(";") + ' CMakePresets.json)" mkdir -p Sparkle && pushd Sparkle curl -s -L -O "${base_url}/${version}/Sparkle-${version}.tar.xz" From 2a2637a46a355bb4928a2ecf409c26ecd6c1041b Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Thu, 8 Jan 2026 19:38:02 +0100 Subject: [PATCH 7/9] CI: Remove buildspec usage from Zsh scripts --- .github/scripts/.build.zsh | 9 +-------- .github/scripts/.package.zsh | 5 +---- .github/scripts/utils.zsh/setup_ubuntu | 10 +++++++--- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/scripts/.build.zsh b/.github/scripts/.build.zsh index f579aca3fde224..707188423986df 100755 --- a/.github/scripts/.build.zsh +++ b/.github/scripts/.build.zsh @@ -40,16 +40,10 @@ build() { if (( ! ${+SCRIPT_HOME} )) typeset -g SCRIPT_HOME=${ZSH_ARGZERO:A:h} local host_os=${${(s:-:)ZSH_ARGZERO:t:r}[2]} local project_root=${SCRIPT_HOME:A:h:h} - local buildspec_file=${project_root}/buildspec.json fpath=(${SCRIPT_HOME}/utils.zsh ${fpath}) autoload -Uz log_group log_error log_output check_${host_os} setup_ccache - if [[ ! -r ${buildspec_file} ]] { - log_error 'Missing buildspec.json in project checkout.' - return 2 - } - local -i debug=0 local target @@ -110,8 +104,7 @@ build() { autoload -Uz setup_ubuntu && setup_ubuntu } - local product_name - read -r product_name <<< "$(jq -r '.name' ${buildspec_file})" + local product_name='obs-studio' pushd ${project_root} diff --git a/.github/scripts/.package.zsh b/.github/scripts/.package.zsh index 22fd34ef8686a2..821dc9f385241d 100755 --- a/.github/scripts/.package.zsh +++ b/.github/scripts/.package.zsh @@ -40,7 +40,6 @@ package() { if (( ! ${+SCRIPT_HOME} )) typeset -g SCRIPT_HOME=${ZSH_ARGZERO:A:h} local host_os=${${(s:-:)ZSH_ARGZERO:t:r}[2]} local project_root=${SCRIPT_HOME:A:h:h} - local buildspec_file=${project_root}/buildspec.json fpath=(${SCRIPT_HOME}/utils.zsh ${fpath}) autoload -Uz log_error log_output log_group check_${host_os} @@ -104,9 +103,7 @@ package() { check_${host_os} - local product_name - read -r product_name <<< \ - "$(jq -r '.name' ${buildspec_file})" + local product_name='obs-studio' local commit_version='0.0.0' local commit_distance='0' diff --git a/.github/scripts/utils.zsh/setup_ubuntu b/.github/scripts/utils.zsh/setup_ubuntu index ad1e857442a1ed..d877352c27a312 100644 --- a/.github/scripts/utils.zsh/setup_ubuntu +++ b/.github/scripts/utils.zsh/setup_ubuntu @@ -23,9 +23,13 @@ local deps_label local deps_hash IFS=';' read -r deps_version deps_baseurl deps_label deps_hash deps_revision <<< \ - "$(jq -r --arg target "${target}" \ - '.dependencies["cef"] | {version, baseUrl, "label", "hash": .hashes[$target], "revision": .revision[$target]} | join(";")' \ - ${buildspec_file})" + "$(jq -r --arg target "${target}" ' + .configurePresets[] + | select(.name=="dependencies") + | .vendor["obsproject.com/obs-studio"].dependencies["cef"] + | {version, baseUrl, "label", "hash": .hashes[$target], "revision": .revision[$target]} + | join(";") + ' ${project_root}/CMakePresets.json)" if (( ! deps_version )) { log_error 'No valid cef spec found in buildspec.json.' From f4a9807f49a5959756969948ba4c28ff4e268302 Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Tue, 6 Jan 2026 22:48:02 +0100 Subject: [PATCH 8/9] CI: Remove buildspec usage from Windows builds --- .github/scripts/Build-Windows.ps1 | 3 --- .github/scripts/Package-Windows.ps1 | 1 - 2 files changed, 4 deletions(-) diff --git a/.github/scripts/Build-Windows.ps1 b/.github/scripts/Build-Windows.ps1 index 586a9d64d303f2..c8eb6bb74de2f6 100644 --- a/.github/scripts/Build-Windows.ps1 +++ b/.github/scripts/Build-Windows.ps1 @@ -36,7 +36,6 @@ function Build { $ScriptHome = $PSScriptRoot $ProjectRoot = Resolve-Path -Path "$PSScriptRoot/../.." - $BuildSpecFile = "${ProjectRoot}/buildspec.json" $UtilityFunctions = Get-ChildItem -Path $PSScriptRoot/utils.pwsh/*.ps1 -Recurse @@ -45,8 +44,6 @@ function Build { . $Utility.FullName } - $BuildSpec = Get-Content -Path ${BuildSpecFile} -Raw | ConvertFrom-Json - Install-BuildDependencies -WingetFile "${ScriptHome}/.Wingetfile" Push-Location -Stack BuildTemp diff --git a/.github/scripts/Package-Windows.ps1 b/.github/scripts/Package-Windows.ps1 index 5c68533b8f6a6b..e2f276a0d1cdf3 100644 --- a/.github/scripts/Package-Windows.ps1 +++ b/.github/scripts/Package-Windows.ps1 @@ -34,7 +34,6 @@ function Package { $ScriptHome = $PSScriptRoot $ProjectRoot = Resolve-Path -Path "$PSScriptRoot/../.." - $BuildSpecFile = "${ProjectRoot}/buildspec.json" $UtilityFunctions = Get-ChildItem -Path $PSScriptRoot/utils.pwsh/*.ps1 -Recurse From 56693de813b1e09e91dba9b139ea30de6aa6c415 Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Tue, 6 Jan 2026 22:48:39 +0100 Subject: [PATCH 9/9] Remove buildspec file from project --- buildspec.json | 64 -------------------------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 buildspec.json diff --git a/buildspec.json b/buildspec.json deleted file mode 100644 index 121e7eeb6a416a..00000000000000 --- a/buildspec.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "dependencies": { - "prebuilt": { - "version": "2025-08-23", - "baseUrl": "https://github.com/obsproject/obs-deps/releases/download", - "label": "Pre-Built obs-deps", - "hashes": { - "macos-universal": "9403bb43fb0a9bb215739a5659ca274fe884dbbbcd22bd9ca781c961fb041c42", - "windows-x64": "8de229cff6f1981508c0eb646b35e644633a5855787b9f5d3b90ae2aeb87ffc1", - "windows-x86": "fb3c68b75911f292b3206e346053638db1c73605957207445a0a92b33ab5e00a", - "windows-arm64": "dd87ba00a6cbc153182fb62b3678a3b5021d1d11eb2730442060937a645eb97e" - } - }, - "qt6": { - "version": "2025-08-23", - "baseUrl": "https://github.com/obsproject/obs-deps/releases/download", - "label": "Pre-Built Qt6", - "hashes": { - "macos-universal": "990f11638b80a4509e14e8c315f6e4caa0861e37fcd3113a256fbff835ffca29", - "windows-x64": "c62e82483bc7c0bf199e8ac3220c66a85a6e8a0cd69a05b6d44f873b830e415f", - "windows-arm64": "cc8ec983de9b7d81aa98beeb1b989d707ee3c73b85b4d41c85d94114eba81f91" - }, - "debugSymbols": { - "windows-x64": "aae88a17e0211cb37db6a8602f2e20d69255be1f9700c699008ca5adbce1dde2", - "windows-arm64": "6e866490277a8b29e82a87fc2f22407f93ddaf86444ea0d284370339a05511b3" - } - }, - "cef": { - "version": "6533", - "baseUrl": "https://cdn-fastly.obsproject.com/downloads", - "label": "Chromium Embedded Framework", - "hashes": { - "macos-x86_64": "37bf7571a48c5dfa8519817e4a90a3503a0eb30f9eadd68f4c3e783e363f272a", - "macos-arm64": "429b50e74f6c174dcfe2f14d8204b54add497eaafe117f7b69ce6bb2354d2626", - "ubuntu-x86_64": "7963335519a19ccdc5233f7334c5ab023026e2f3e9a0cc417007c09d86608146", - "ubuntu-aarch64": "642514469eaa29a5c887891084d2e73f7dc2d7405f7dfa7726b2dbc24b309999", - "windows-x64": "922efbda1f2f8be9e5b2754d878a14d90afc81f04e94fc9101a7513e2b5cecc1", - "windows-arm64": "df9df4bd85826b4c071c6db404fd59cf93efd9c58ec3ab64e204466ae19bb02a" - }, - "revision": { - "macos-x86_64": 5, - "macos-arm64": 5, - "ubuntu-x86_64": 6, - "ubuntu-aarch64": 6, - "windows-x64": 2 - } - } - }, - "tools": { - "sparkle": { - "version": "2.6.4", - "baseUrl": "https://github.com/sparkle-project/Sparkle/releases/download", - "label": "Sparkle 2", - "hash": "50612a06038abc931f16011d7903b8326a362c1074dabccb718404ce8e585f0b" - }, - "ccache-win": { - "version": "4.8.1", - "baseUrl": "https://github.com/ccache/ccache/releases/download/", - "label": "Ccache for Windows x64", - "hash": "ca59770e9f46b59d6bec6e7036a17a27d601a0a5a0a721fe8e03fea734ccf732" - } - }, - "name": "obs-studio" -}