diff --git a/.github/workflows/build-project.yaml b/.github/workflows/build-project.yaml index f4328ab84c8801..68e2addf344ba8 100644 --- a/.github/workflows/build-project.yaml +++ b/.github/workflows/build-project.yaml @@ -59,7 +59,7 @@ jobs: macos-build: name: macOS ๐Ÿ - runs-on: macos-15 + runs-on: macos-14 needs: check-event strategy: fail-fast: false @@ -80,8 +80,8 @@ jobs: : Set Up Environment ๐Ÿ”ง if (( ${+RUNNER_DEBUG} )) setopt XTRACE - print '::group::Enable Xcode 16.1' - sudo xcode-select --switch /Applications/Xcode_16.1.0.app/Contents/Developer + print '::group::Enable Xcode 15.4' + sudo xcode-select --switch /Applications/Xcode_15.4.app/Contents/Developer print '::endgroup::' print '::group::Clean Homebrew Environment' @@ -168,6 +168,7 @@ jobs: path: ${{ github.workspace }}/.ccache key: ${{ runner.os }}-ccache-${{ matrix.target }}-${{ needs.check-event.outputs.config }} + ubuntu-build: name: Ubuntu ๐Ÿง strategy: @@ -191,7 +192,6 @@ jobs: key: ${{ runner.os }}-${{ matrix.os }}-ccache-x86_64-${{ needs.check-event.outputs.config }} restore-keys: | ${{ runner.os }}-${{ matrix.os }}-ccache-x86_64- - - name: Build OBS Studio ๐Ÿงฑ uses: ./.github/actions/build-obs env: @@ -239,90 +239,6 @@ jobs: path: ${{ github.workspace }}/.ccache key: ${{ runner.os }}-${{ matrix.os }}-ccache-x86_64-${{ needs.check-event.outputs.config }} - flatpak-build: - name: Flatpak ๐Ÿ“ฆ - runs-on: ubuntu-24.04 - needs: check-event - defaults: - run: - shell: bash - env: - FLATPAK_BUILD_SHARE_PATH: flatpak_app/files/share - container: - image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.8 - options: --privileged - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - fetch-depth: 0 - set-safe-directory: ${{ env.GITHUB_WORKSPACE }} - - - name: Set Up Environment ๐Ÿ”ง - id: setup - env: - GH_TOKEN: ${{ github.token }} - run: | - : Set Up Environment ๐Ÿ”ง - if [[ "${RUNNER_DEBUG}" ]]; then set -x; fi - - git config --global --add safe.directory "${GITHUB_WORKSPACE}" - - cache_key='flatpak-builder-${{ hashFiles('build-aux/**/*.json') }}' - cache_ref='master' - read -r id key size unit created accessed <<< \ - "$(gh cache list --ref "refs/heads/${cache_ref}" --key "${cache_key}-x86_64" | head -1)" - - if [[ "${key}" ]]; then - echo "cacheHit=true" >> $GITHUB_OUTPUT - else - echo "cacheHit=false" >> $GITHUB_OUTPUT - fi - - echo "cacheKey=${cache_key}" >> $GITHUB_OUTPUT - - - name: Validate Flatpak manifest - uses: ./.github/actions/flatpak-builder-lint - with: - artifact: manifest - path: build-aux/com.obsproject.Studio.json - - - name: Build Flatpak Manifest ๐Ÿงพ - uses: flatpak/flatpak-github-actions/flatpak-builder@10a3c29f0162516f0f68006be14c92f34bd4fa6c - with: - build-bundle: ${{ fromJSON(needs.check-event.outputs.package) }} - bundle: obs-studio-flatpak-${{ needs.check-event.outputs.commitHash }}.flatpak - manifest-path: ${{ github.workspace }}/build-aux/com.obsproject.Studio.json - cache: ${{ fromJSON(steps.setup.outputs.cacheHit) || (github.event_name == 'push' && github.ref_name == 'master')}} - restore-cache: ${{ fromJSON(steps.setup.outputs.cacheHit) }} - cache-key: ${{ steps.setup.outputs.cacheKey }} - mirror-screenshots-url: https://dl.flathub.org/media - - - name: Validate AppStream - uses: ./.github/actions/flatpak-builder-lint - with: - artifact: appstream - path: ${{ env.FLATPAK_BUILD_SHARE_PATH }}/metainfo/com.obsproject.Studio.metainfo.xml - - - name: Verify Icon and Metadata in app-info - working-directory: ${{ env.FLATPAK_BUILD_SHARE_PATH }} - run: | - : Verify Icon and Metadata in app-info - test -f app-info/icons/flatpak/128x128/com.obsproject.Studio.png || { echo "::error::Missing 128x128 icon in app-info"; exit 1; } - test -f app-info/xmls/com.obsproject.Studio.xml.gz || { echo "::error::Missing com.obsproject.Studio.xml.gz in app-info"; exit 1; } - - - name: Validate build directory - uses: ./.github/actions/flatpak-builder-lint - with: - artifact: builddir - path: flatpak_app - - - name: Validate repository - uses: ./.github/actions/flatpak-builder-lint - with: - artifact: repo - path: repo - windows-build: name: Windows ๐ŸชŸ strategy: diff --git a/cmake/macos/compilerconfig.cmake b/cmake/macos/compilerconfig.cmake index 5c6ebdb8bb6318..3d58be54a5cf5b 100644 --- a/cmake/macos/compilerconfig.cmake +++ b/cmake/macos/compilerconfig.cmake @@ -22,8 +22,8 @@ set_property(CACHE CMAKE_OSX_ARCHITECTURES PROPERTY STRINGS arm64 x86_64) # Ensure recent enough Xcode and platform SDK function(check_sdk_requirements) - set(obs_macos_minimum_sdk 15.0) # Keep in sync with Xcode - set(obs_macos_minimum_xcode 16.0) # Keep in sync with SDK + set(obs_macos_minimum_sdk 14.2) # Keep in sync with Xcode + set(obs_macos_minimum_xcode 15.1) # Keep in sync with SDK execute_process( COMMAND xcrun --sdk macosx --show-sdk-platform-version OUTPUT_VARIABLE obs_macos_current_sdk diff --git a/cmake/macos/helpers.cmake b/cmake/macos/helpers.cmake index 2f203cd580fd6e..f8375d181e8c62 100644 --- a/cmake/macos/helpers.cmake +++ b/cmake/macos/helpers.cmake @@ -26,7 +26,7 @@ function(set_target_properties_obs target) set(multiValueArgs PROPERTIES) cmake_parse_arguments(PARSE_ARGV 0 _STPO "${options}" "${oneValueArgs}" "${multiValueArgs}") - message(DEBUG "Setting additional properties for target ${target}...") + message(STATUS "Setting additional properties for target ${target}...") while(_STPO_PROPERTIES) list(POP_FRONT _STPO_PROPERTIES key value) @@ -86,21 +86,30 @@ function(set_target_properties_obs target) endif() get_property(obs_executables GLOBAL PROPERTY _OBS_EXECUTABLES) - add_dependencies(${target} ${obs_executables}) - foreach(executable IN LISTS obs_executables) - set_target_xcode_properties(${executable} PROPERTIES INSTALL_PATH - "$(LOCAL_APPS_DIR)/$/Contents/MacOS" - ) + + if ("${obs_executables}") + message(STATUS "Add dependencies (${target}) (${obs_executables})") + add_dependencies(${target} ${obs_executables}) + + foreach(executable IN LISTS obs_executables) + message(STATUS "Set target xcode properties (${executable}) ($(LOCAL_APPS_DIR)/$/Contents/MacOS)") + set_target_xcode_properties(${executable} PROPERTIES INSTALL_PATH + "$(LOCAL_APPS_DIR)/$/Contents/MacOS" + ) - add_custom_command( - TARGET ${target} - POST_BUILD - COMMAND - "${CMAKE_COMMAND}" -E copy_if_different "$" - "$/MacOS/" - COMMENT "Copy ${executable} to application bundle" - ) - endforeach() + message(STATUS "Add custom command (${target}) (${CMAKE_COMMAND}" -E copy_if_different "$) ($/MacOS/)") + add_custom_command( + TARGET ${target} + POST_BUILD + COMMAND + "${CMAKE_COMMAND}" -E copy_if_different "$" + "$/MacOS/" + COMMENT "Copy ${executable} to application bundle" + ) + endforeach() + else() + message(STATUS "No dependencies (${target})") + endif() if(VIRTUALCAM_DEVICE_UUID AND VIRTUALCAM_SOURCE_UUID AND VIRTUALCAM_SINK_UUID) set(has_virtualcam_uuids TRUE) diff --git a/cmake/windows/helpers.cmake b/cmake/windows/helpers.cmake index b4d0bf4ddd5658..3fe76f8d4509c5 100644 --- a/cmake/windows/helpers.cmake +++ b/cmake/windows/helpers.cmake @@ -11,7 +11,7 @@ function(set_target_properties_obs target) set(multiValueArgs PROPERTIES) cmake_parse_arguments(PARSE_ARGV 0 _STPO "${options}" "${oneValueArgs}" "${multiValueArgs}") - message(DEBUG "Setting additional properties for target ${target}...") + message(STATUS "Setting additional properties for target ${target}...") while(_STPO_PROPERTIES) list(POP_FRONT _STPO_PROPERTIES key value) @@ -20,6 +20,8 @@ function(set_target_properties_obs target) get_target_property(target_type ${target} TYPE) + message(STATUS "Windows target_type: ${target_type}") + if(target_type STREQUAL EXECUTABLE) if(target STREQUAL obs-browser-helper) set(OBS_EXECUTABLE_DESTINATION "${OBS_PLUGIN_DESTINATION}") @@ -107,7 +109,7 @@ function(set_target_properties_obs target) COMPONENT Runtime ) elseif(${target} STREQUAL obs-browser) - message(DEBUG "Add Chromium Embedded Framework to project for obs-browser plugin...") + message(STATUS "Add Chromium Embedded Framework to project for obs-browser plugin...") if(TARGET CEF::Library) get_target_property(imported_location CEF::Library IMPORTED_LOCATION_RELEASE) @@ -300,7 +302,7 @@ endfunction() # Helper function to add resources into bundle function(target_install_resources target) - message(DEBUG "Installing resources for target ${target}...") + message(STATUS "Installing resources for target ${target}...") if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/data") file(GLOB_RECURSE data_files "${CMAKE_CURRENT_SOURCE_DIR}/data/*") foreach(data_file IN LISTS data_files) @@ -358,7 +360,7 @@ function(target_add_resource target resource) set(target_destination "${OBS_DATA_DESTINATION}/${target}") endif() - message(DEBUG "Add resource '${resource}' to target ${target} at destination '${target_destination}'...") + message(STATUS "Add resource '${resource}' to target ${target} at destination '${target_destination}'...") install(FILES "${resource}" DESTINATION "${target_destination}" COMPONENT Runtime) @@ -377,7 +379,7 @@ endfunction() # _bundle_dependencies: Resolve third party dependencies and add them to Windows binary directory function(_bundle_dependencies target) - message(DEBUG "Discover dependencies of target ${target}...") + message(STATUS "Discover dependencies of target ${target}...") set(found_dependencies) find_dependencies(TARGET ${target} FOUND_VAR found_dependencies) diff --git a/plugins/mac-videotoolbox/encoder.c b/plugins/mac-videotoolbox/encoder.c index 5d9d9e4ca4ca60..d80ef42a5eb393 100644 --- a/plugins/mac-videotoolbox/encoder.c +++ b/plugins/mac-videotoolbox/encoder.c @@ -576,19 +576,19 @@ static OSStatus create_encoder(struct vt_encoder *enc) return code; } - if (__builtin_available(macOS 15.0, *)) { - int spatial_aq = enc->spatial_aq ? kVTQPModulationLevel_Default : kVTQPModulationLevel_Disable; - CFNumberRef spatialAQ = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &spatial_aq); - - code = VTSessionSetProperty(s, kVTCompressionPropertyKey_SpatialAdaptiveQPLevel, spatialAQ); - - if (code != noErr) { - log_osstatus(LOG_WARNING, enc, - "setting kVTCompressionPropertyKey_SpatialAdaptiveQPLevel failed", code); - } - - CFRelease(spatialAQ); - } +// if (__builtin_available(macOS 15.0, *)) { +// int spatial_aq = enc->spatial_aq ? kVTQPModulationLevel_Default : kVTQPModulationLevel_Disable; +// CFNumberRef spatialAQ = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &spatial_aq); +// +// code = VTSessionSetProperty(s, kVTCompressionPropertyKey_SpatialAdaptiveQPLevel, spatialAQ); +// +// if (code != noErr) { +// log_osstatus(LOG_WARNING, enc, +// "setting kVTCompressionPropertyKey_SpatialAdaptiveQPLevel failed", code); +// } +// +// CFRelease(spatialAQ); +// } } // This can fail depending on hardware configuration