Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/run-gersemi/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion .github/actions/sparkle-appcast/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 1 addition & 8 deletions .github/scripts/.build.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}

Expand Down
5 changes: 1 addition & 4 deletions .github/scripts/.package.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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'
Expand Down
3 changes: 0 additions & 3 deletions .github/scripts/Build-Windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion .github/scripts/Package-Windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 7 additions & 3 deletions .github/scripts/utils.zsh/setup_ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
Expand Down
63 changes: 63 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
42 changes: 31 additions & 11 deletions build-aux/.run-format.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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)/*})
Expand All @@ -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
Expand Down
64 changes: 0 additions & 64 deletions buildspec.json

This file was deleted.

35 changes: 30 additions & 5 deletions cmake/common/buildspec_common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -92,8 +118,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()
Expand Down
3 changes: 1 addition & 2 deletions cmake/common/helpers_common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@ function(find_qt_plugins)
endif()

list(
APPEND
qt_plugins_Core
APPEND qt_plugins_Core
platforms
printsupport
styles
Expand Down
3 changes: 1 addition & 2 deletions cmake/finders/FindAMF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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]*$"
)
Expand Down
3 changes: 1 addition & 2 deletions cmake/finders/FindAsio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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]+"
)
Expand Down
Loading
Loading