Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bump to latest obs deps 30.1.2 #17

Merged
merged 1 commit into from
Jun 11, 2024
Merged
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
8 changes: 4 additions & 4 deletions .github/actions/run-clang-format/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ runs:
echo ::group::Install Dependencies
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
echo "/home/linuxbrew/.linuxbrew/opt/clang-format@16/bin" >> $GITHUB_PATH
echo "/home/linuxbrew/.linuxbrew/opt/clang-format@17/bin" >> $GITHUB_PATH
brew install --quiet zsh
echo ::endgroup::

Expand All @@ -51,11 +51,11 @@ runs:
}

if (( ${changes[(I)(*.c|*.h|*.cpp|*.hpp|*.m|*.mm)]} )) {
echo ::group::Install clang-format-16
brew install --quiet obsproject/tools/clang-format@16
echo ::group::Install clang-format-17
brew install --quiet obsproject/tools/clang-format@17
echo ::endgroup::

echo ::group::Run clang-format-16
echo ::group::Run clang-format-17
./build-aux/run-clang-format --fail-${{ inputs.failCondition }} --check
echo ::endgroup::
}
24 changes: 12 additions & 12 deletions .github/scripts/Package-Windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,20 @@ function Package {

Remove-Item @RemoveArgs

Log-Group "Archiving ${ProductName}..."
$CompressArgs = @{
Path = (Get-ChildItem -Path "${ProjectRoot}/release/${Configuration}" -Exclude "${OutputName}*.*")
CompressionLevel = 'Optimal'
DestinationPath = "${ProjectRoot}/release/${OutputName}.zip"
Verbose = ($Env:CI -ne $null)
}
Compress-Archive -Force @CompressArgs
Log-Group

if ( ( $BuildInstaller ) ) {
Log-Group "Packaging ${ProductName}..."
$IsccFile = "${ProjectRoot}/build_${Target}/installer-Windows.generated.iss"

$IsccFile = "${ProjectRoot}/build_${Target}/installer-Windows.generated.iss"
if ( ! ( Test-Path -Path $IsccFile ) ) {
throw 'InnoSetup install script not found. Run the build script or the CMake build and install procedures first.'
}
Expand All @@ -79,19 +89,9 @@ function Package {
Invoke-External iscc ${IsccFile} /O"${ProjectRoot}/release" /F"${OutputName}-Installer"
Remove-Item -Path Package -Recurse
Pop-Location -Stack BuildTemp
}

Log-Group "Archiving ${ProductName}..."
$CompressArgs = @{
Path = (Get-ChildItem -Path "${ProjectRoot}/release/${Configuration}" -Exclude "${OutputName}*.*")
CompressionLevel = 'Optimal'
DestinationPath = "${ProjectRoot}/release/${OutputName}.zip"
Verbose = ($Env:CI -ne $null)
Log-Group
}

Compress-Archive -Force @CompressArgs

Log-Group
}

Package
6 changes: 5 additions & 1 deletion .github/workflows/build-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:

# macos-build:
# name: Build for macOS 🍏
# runs-on: macos-13
# runs-on: macos-14
# needs: check-event
# defaults:
# run:
Expand All @@ -90,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
4 changes: 2 additions & 2 deletions .github/workflows/pr-pull.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
workflow_dispatch:
pull_request:
paths-ignore:
- '**.md'
- '**.md'
branches: [master, main, legacy]
types: [opened, synchronize, reopened]
types: [ opened, synchronize, reopened ]
permissions:
contents: read
concurrency:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ 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) }}
tag_name: ${{ steps.check.outputs.version }}
name: OBS Studio ${{ steps.check.outputs.version }}
name: ${{ needs.build-project.outputs.pluginName }} ${{ steps.check.outputs.version }}
body_path: ${{ github.workspace }}/CHECKSUMS.txt
files: |
${{ github.workspace }}/*.exe
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,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
15 changes: 5 additions & 10 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@
"rhs": "Darwin"
},
"generator": "Xcode",
"warnings": { "dev": true, "deprecated": true },
"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 @@ -57,9 +56,8 @@
},
"generator": "Visual Studio 17 2022",
"architecture": "Win32",
"warnings": { "dev": true, "deprecated": true },
"warnings": {"dev": true, "deprecated": true},
"cacheVariables": {
"QT_VERSION": "6",
"CMAKE_SYSTEM_VERSION": "10.0.18363.657"
}
},
Expand All @@ -85,9 +83,8 @@
},
"generator": "Visual Studio 17 2022",
"architecture": "x64",
"warnings": { "dev": true, "deprecated": true },
"warnings": {"dev": true, "deprecated": true},
"cacheVariables": {
"QT_VERSION": "6",
"CMAKE_SYSTEM_VERSION": "10.0.18363.657"
}
},
Expand All @@ -112,9 +109,8 @@
"rhs": "Linux"
},
"generator": "Ninja",
"warnings": { "dev": true, "deprecated": true },
"warnings": {"dev": true, "deprecated": true},
"cacheVariables": {
"QT_VERSION": "6",
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
Expand All @@ -140,9 +136,8 @@
"rhs": "Linux"
},
"generator": "Ninja",
"warnings": { "dev": true, "deprecated": true },
"warnings": {"dev": true, "deprecated": true},
"cacheVariables": {
"QT_VERSION": "6",
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
Expand Down
30 changes: 15 additions & 15 deletions buildspec.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
{
"dependencies": {
"obs-studio": {
"version": "30.0.2",
"version": "30.1.2",
"baseUrl": "https://github.com/obsproject/obs-studio/archive/refs/tags",
"label": "OBS sources",
"hashes": {
"macos": "be12c3ad0a85713750d8325e4b1db75086223402d7080d0e3c2833d7c5e83c27",
"windows-x64": "970058c49322cfa9cd6d620abb393fed89743ba7e74bd9dbb6ebe0ea8141d9c7",
"windows-x86": "970058c49322cfa9cd6d620abb393fed89743ba7e74bd9dbb6ebe0ea8141d9c7"
"macos": "490bae1c392b3b344b0270afd8cb887da4bc50bd92c0c426e96713c1ccb9701a",
"windows-x64": "c2dd03fa7fd01fad5beafce8f7156da11f9ed9a588373fd40b44a06f4c03b867",
"windows-x86": "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",
"windows-x86": "b69c864275189464483c240ef3f25ea16fba3050b136fe6c3db6e9ee63036683"
"macos": "2e9bfb55a5e0e4c1086fa1fda4cf268debfead473089df2aaea80e1c7a3ca7ff",
"windows-x64": "6e86068371526a967e805f6f9903f9407adb683c21820db5f07da8f30d11e998",
"windows-x86": "1002a7a19c55a6eb3cd0fb9c4c6d6bb1d649176439b6705e4bb5bd12948456a0"
}
},
"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",
"windows-x86": "50129f9836ef987c23db2e0535085fa2d52474ef0de44bc11c9df6cfa602b785"
"macos": "694f1e639c017e3b1f456f735330dc5afae287cbea85757101af1368de3142c8",
"windows-x64": "72d1df34a0ef7413a681d5fcc88cae81da60adc03dcd23ef17862ab170bcc0dd",
"windows-x86": "0376f0f4b308b1c65e2bfa0b95199fd26efaf79042450e7d9acff958449a9669"
},
"debugSymbols": {
"windows-x64": "fd8ecd1d8cd2ef049d9f4d7fb5c134f784836d6020758094855dfa98bd025036",
"windows-x86": "eb33bbca91b76fa0f302b5dc997e775779ed03989aa8e1d2e88ccdf6c34aecc7"
"windows-x64": "fbddd1f659c360f2291911ac5709b67b6f8182e6bca519d24712e4f6fd3cc865",
"windows-x86": "51e459b1447748c2435d41ef726da1cf1b3ed74f9872317ff2afbb15fe2a44d2"
}
}
},
Expand All @@ -49,4 +49,4 @@
"uuids": {
"windowsApp": "1DFBFA8F-CDD8-49B6-9E0F-475F693479A8"
}
}
}
10 changes: 8 additions & 2 deletions cmake/common/buildnumber.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ if(NOT DEFINED PLUGIN_BUILD_NUMBER AND EXISTS "${_BUILD_NUMBER_CACHE}")
file(READ "${_BUILD_NUMBER_CACHE}" PLUGIN_BUILD_NUMBER)
math(EXPR PLUGIN_BUILD_NUMBER "${PLUGIN_BUILD_NUMBER}+1")
elseif(NOT DEFINED PLUGIN_BUILD_NUMBER)
if($ENV{CI} AND $ENV{GITHUB_RUN_ID})
set(PLUGIN_BUILD_NUMBER "$ENV{GITHUB_RUN_ID}")
if($ENV{CI})
if($ENV{GITHUB_RUN_ID})
set(PLUGIN_BUILD_NUMBER "$ENV{GITHUB_RUN_ID}")
elseif($ENV{GITLAB_RUN_ID})
set(PLUGIN_BUILD_NUMBER "$ENV{GITLAB_RUN_ID}")
else()
set(PLUGIN_BUILD_NUMBER "1")
endif()
else()
set(PLUGIN_BUILD_NUMBER "1")
endif()
Expand Down
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: 1 addition & 2 deletions cmake/windows/resources/installer-Windows.iss.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,13 @@ Filename: "{sys}\regsvr32.exe"; Parameters: "/s /u ""{app}\bin\32bit\obs-virtual
Filename: "{sys}\regsvr32.exe"; Parameters: "/s /u ""{app}\bin\64bit\obs-virtualsource.dll"""; Flags: 64bit; RunOnceId: "Unregister64";

[Code]
procedure InitializeWizard();
var
GPLText: AnsiString;
Page: TOutputMsgMemoWizardPage;
OptionPage: TInputQueryWizardPage;
DevicesComboBox: TNewComboBox;
DeviceCount: Integer;

procedure InitializeWizard();
begin
ExtractTemporaryFile('LICENSE');
LoadStringFromFile(ExpandConstant('{tmp}\LICENSE'), GPLText);
Expand Down