diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5de83a9..595b699 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,13 +29,13 @@ jobs: shell: zsh {0} steps: - name: Checkout - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v4.1.1 with: path: plugin submodules: recursive - name: Checkout obs-studio - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.1 with: repository: 'obsproject/obs-studio' path: obs-studio @@ -79,7 +79,7 @@ jobs: - name: Restore Compilation Cache id: ccache-cache - uses: actions/cache@v3.0.11 + uses: actions/cache@v4.0.0 with: path: ${{ github.workspace }}/.ccache key: macos-${{ matrix.arch }}-ccache-plugin-${{ steps.setup.outputs.ccacheDate }} @@ -133,7 +133,7 @@ jobs: codesignPass: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }} - name: Upload Build Artifact - uses: actions/upload-artifact@v3.1.1 + uses: actions/upload-artifact@v4.3.1 with: name: ${{ env.PLUGIN_NAME }}-macos-${{ matrix.arch }}-${{ steps.setup.outputs.commitHash }} path: ${{ github.workspace }}/plugin/release/${{ env.PLUGIN_NAME }}-*-macos-${{ matrix.arch }}.pkg @@ -146,13 +146,13 @@ jobs: ubuntu: ['ubuntu-20.04', 'ubuntu-22.04'] steps: - name: Checkout - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v4.1.1 with: repository: obsproject/obs-studio ref: ${{ env.OBS_VERSION }} submodules: 'recursive' - name: "Checkout plugin" - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v4.1.1 with: path: plugins/${{ env.PLUGIN_NAME }} - name: Add plugin to obs cmake @@ -182,7 +182,7 @@ jobs: mv ./plugins/${{ env.PLUGIN_NAME }}/data ./${{ env.PLUGIN_NAME }}/data tar -cvzf "${FILE_NAME}" ${{ env.PLUGIN_NAME }} - name: 'Publish' - uses: actions/upload-artifact@v3.1.1 + uses: actions/upload-artifact@v4.3.1 with: name: '${{ env.FILE_NAME }}' path: '*.tar.gz' @@ -190,7 +190,7 @@ jobs: name: 'Windows Build' runs-on: [windows-latest] strategy: - fail-fast: true + fail-fast: false matrix: target: [x64, x86] include: @@ -207,20 +207,22 @@ jobs: WINDOWS_DEPS_VERSION: '2023-04-12' steps: - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.1.3 + uses: microsoft/setup-msbuild@v2 - name: Checkout obs - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v4.1.1 with: repository: obsproject/obs-studio ref: ${{ env.OBS_VERSION }} submodules: 'recursive' - name: Checkout plugin - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v4.1.1 with: path: plugins/${{ env.PLUGIN_NAME}} - name: Add plugin to obs cmake shell: cmd - run: echo add_subdirectory(${{ env.PLUGIN_NAME }}) >> plugins/CMakeLists.txt + run: | + echo add_subdirectory(${{ env.PLUGIN_NAME }}) >> plugins/CMakeLists.txt + echo int __cdecl __ms_vsnprintf(char *s, size_t n, const char *format, va_list arg){ return 0; } >> libobs/obs.c - name: Fetch Git Tags run: git fetch --prune --tags --unshallow - name: 'Install prerequisite: QT' @@ -252,13 +254,13 @@ jobs: exit 0 - name: Publish zip if: success() - uses: actions/upload-artifact@v3.1.1 + uses: actions/upload-artifact@v4.3.1 with: name: '${{ env.FILE_NAME }}' path: package/* - name: Publish Installer Files - if: success() - uses: actions/upload-artifact@v3.1.1 + if: success() && matrix.target == 'x64' + uses: actions/upload-artifact@v4.3.1 with: name: 'installer-files' path: installer/* @@ -279,23 +281,23 @@ jobs: $env:FILE_NAME_X64="${{ env.PLUGIN_NAME }}-${{ github.sha }}-windows-x64" echo "FILE_NAME_X64=${env:FILE_NAME_X64}" >> ${env:GITHUB_ENV} - name: Retrieve x86 build - uses: actions/download-artifact@v3.0.1 + uses: actions/download-artifact@v4.1.2 with: name: '${{ env.FILE_NAME_X86 }}' path: ./package - name: Retrieve x64 build - uses: actions/download-artifact@v3.0.1 + uses: actions/download-artifact@v4.1.2 with: name: '${{ env.FILE_NAME_X64 }}' path: ./package - name: Retrieve installer files - uses: actions/download-artifact@v3.0.1 + uses: actions/download-artifact@v4.1.2 with: name: 'installer-files' path: . - name: Publish zip if: success() - uses: actions/upload-artifact@v3.1.1 + uses: actions/upload-artifact@v4.3.1 with: name: '${{ env.FILE_NAME }}' path: package/* @@ -308,11 +310,11 @@ jobs: & 'C:\Program Files (x86)\Inno Setup 6\ISCC.exe' /Qp ".\installer.iss" - name: Publish installer if: success() - uses: actions/upload-artifact@v3.1.1 + uses: actions/upload-artifact@v4.3.1 with: name: '${{ env.FILE_NAME }}-installer' path: package/*.exe - name: Remove temp artifacts - uses: geekyeggo/delete-artifact@v2.0.0 + uses: geekyeggo/delete-artifact@v4.1.0 with: name: "${{ env.FILE_NAME_X86 }}\n${{ env.FILE_NAME_X64 }}" diff --git a/installer.iss.in b/installer.iss.in index 45bdaaa..10ce05e 100644 --- a/installer.iss.in +++ b/installer.iss.in @@ -25,6 +25,7 @@ SolidCompression=yes LZMAAlgorithm=1 ; Other Information DefaultDirName={code:GetDirName} +AppendDefaultDirName=no DefaultGroupName={#MyAppName} AllowNoIcons=yes OutputDir="package" diff --git a/replay-filter-async.c b/replay-filter-async.c index 6171e42..9a3448e 100644 --- a/replay-filter-async.c +++ b/replay-filter-async.c @@ -102,8 +102,11 @@ replay_filter_video(void *data, struct obs_source_frame *frame) if (obs_get_version() < MAKE_SEMANTIC_VERSION(30, 0, 0)) { filter->target_offset = 2000; - } else { + } else if (obs_get_version() < + MAKE_SEMANTIC_VERSION(30, 2, 0)) { filter->target_offset = 2008; + } else { + filter->target_offset = 2000; } } struct darray *async_cache = diff --git a/replay-source.c b/replay-source.c index 25f9a43..9072d32 100644 --- a/replay-source.c +++ b/replay-source.c @@ -7,7 +7,6 @@ #include #include #include -#include #include "replay.h" #include #include @@ -292,7 +291,7 @@ static bool EnumSceneItem(obs_scene_t *scene, obs_sceneitem_t *item, void *data) { UNUSED_PARAMETER(scene); struct siu *siu = data; - if (item->source == siu->source) { + if (obs_sceneitem_get_source(item) == siu->source) { struct obs_sceneitem_crop crop; obs_sceneitem_get_crop(item, &crop); crop.left = 0;