meson.buildでAviSynthPlus/vapoursynthのヘッダを準備するように。 ( #285 ) #427
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Windows Releases | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - actions | |
| tags: | |
| - '*' | |
| jobs: | |
| get_version_name: | |
| name: Get version name | |
| runs-on: ubuntu-latest | |
| outputs: | |
| rev_count: ${{ steps.rev.outputs.rev_count }} | |
| version_name: ${{ steps.rev.outputs.version_name }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Verify tag matches VER_STR_FILEVERSION | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: | | |
| cd ${{ github.workspace }} | |
| TAG=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g") | |
| VER=$(sed -n 's/^#define VER_STR_FILEVERSION[ \t]*"\([^"]*\)".*$/\1/p' QSVPipeline/rgy_version.h | tr -d '\r\n') | |
| if [ "$TAG" = "$VER" ] || [ "${TAG#v}" = "$VER" ]; then | |
| echo "Version OK: tag=${TAG}, header=${VER}" | |
| else | |
| echo "ERROR: Tag version (${TAG}) does not match VER_STR_FILEVERSION (${VER})" >&2 | |
| exit 1 | |
| fi | |
| - name: Set version name | |
| id: rev | |
| run: | | |
| cd ${{ github.workspace }} | |
| REVCOUNT=`git rev-list --count HEAD` | |
| echo "rev_count=${REVCOUNT}" >> $GITHUB_OUTPUT | |
| if [[ "${{ github.ref }}" =~ "refs/tags/" ]]; then | |
| VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g") | |
| else | |
| VERSION=r${REVCOUNT} | |
| fi | |
| echo "version_name=${VERSION}" >> $GITHUB_OUTPUT | |
| build: | |
| name: Upload Release Asset | |
| runs-on: windows-2022 | |
| needs: get_version_name | |
| defaults: | |
| run: | |
| shell: cmd | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: x86 | |
| platform: Win32 | |
| - arch: x64 | |
| platform: x64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| fetch-depth: 0 | |
| - name: Checkout dependencies | |
| run: | | |
| curl -s -o ffmpeg_lgpl.7z -L https://github.com/rigaya/ffmpeg_dlls_for_hwenc/releases/download/20250830/ffmpeg_dlls_for_hwenc_20250830.7z | |
| 7z x -offmpeg_lgpl -y ffmpeg_lgpl.7z | |
| git clone --depth 1 https://github.com/AviSynth/AviSynthPlus.git ..\AviSynthPlus | |
| git clone -b R72 --depth 1 https://github.com/vapoursynth/vapoursynth.git ..\vapoursynth | |
| git clone --depth 1 https://github.com/KhronosGroup/OpenCL-Headers.git ..\openclheaders | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v2 | |
| with: | |
| msbuild-architecture: ${{ matrix.arch }} | |
| - name: MSBuild | |
| run: | | |
| set AVISYNTH_SDK=${{ github.workspace }}\..\AviSynthPlus\avs_core | |
| set VAPOURSYNTH_SDK=${{ github.workspace }}\..\vapoursynth | |
| set OPENCL_HEADERS=${{ github.workspace }}\..\openclheaders | |
| msbuild QSVEnc.sln /t:build /p:configuration=ReleaseStatic /p:Platform=${{ matrix.platform }} -maxcpucount | |
| - name: Create Archieve | |
| id: archieve | |
| run: | | |
| mkdir QSVEncC_Release | |
| copy _build\${{ matrix.platform }}\ReleaseStatic\QSVEncC*.exe QSVEncC_Release | |
| copy _build\${{ matrix.platform }}\ReleaseStatic\*.dll QSVEncC_Release | |
| 7z a -mx9 QSVEncC_${{ needs.get_version_name.outputs.version_name }}_${{ matrix.platform }}.7z .\QSVEncC_Release\* | |
| - name: Check dll | |
| run: | | |
| if ("${{ matrix.platform }}" == "x64") "QSVEncC_Release\QSVEncC64.exe" --check-avcodec-dll | |
| if ("${{ matrix.platform }}" == "Win32") "QSVEncC_Release\QSVEncC.exe" --check-avcodec-dll | |
| - name: Check Version | |
| if: startsWith(github.ref, 'refs/tags/') | |
| id: check_ver | |
| run: | | |
| powershell "$ver = (Get-ItemProperty .\QSVEncC_Release\QSVEncC*.exe).VersionInfo.FileVersion; if ($ver -eq '${{ needs.get_version_name.outputs.version_name }}') { exit 0; } exit 1;" | |
| - name: Upload Release Asset | |
| id: upload-release-asset | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| files: QSVEncC_${{ needs.get_version_name.outputs.version_name }}_${{ matrix.platform }}.7z | |
| - name: Calc hash | |
| id: calc_hash | |
| run: | | |
| 7z h -scrc* QSVEncC_${{ needs.get_version_name.outputs.version_name }}_${{ matrix.platform }}.7z | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: QSVEncC_release_${{ needs.get_version_name.outputs.version_name }}_${{ matrix.platform }} | |
| path: QSVEncC_${{ needs.get_version_name.outputs.version_name }}_${{ matrix.platform }}.7z | |
| upload_aviutl_release: | |
| name: Upload Aviutl Release Asset | |
| runs-on: windows-2022 | |
| needs: [ get_version_name, build ] | |
| defaults: | |
| run: | |
| shell: cmd | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: x86 | |
| platform: Win32 | |
| aviutlver: AviUtl | |
| outext: auo | |
| - arch: x64 | |
| platform: x64 | |
| aviutlver: AviUtl2 | |
| outext: auo2 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| fetch-depth: 0 | |
| - name: Checkout dependencies | |
| run: | | |
| curl -s -o ffmpeg_lgpl.7z -L https://github.com/rigaya/ffmpeg_dlls_for_hwenc/releases/download/20250830/ffmpeg_dlls_for_hwenc_20250830.7z | |
| 7z x -offmpeg_lgpl -y ffmpeg_lgpl.7z | |
| move ffmpeg5* ffmpeg_lgpl | |
| git clone https://github.com/AviSynth/AviSynthPlus.git ..\AviSynthPlus | |
| git clone -b R72 https://github.com/vapoursynth/vapoursynth.git ..\vapoursynth | |
| git clone https://github.com/KhronosGroup/OpenCL-Headers.git ..\openclheaders | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v2 | |
| with: | |
| msbuild-architecture: ${{ matrix.platform }} | |
| - name: MSBuild | |
| run: | | |
| set AVISYNTH_SDK=${{ github.workspace }}\..\AviSynthPlus\avs_core | |
| set VAPOURSYNTH_SDK=${{ github.workspace }}\..\vapoursynth | |
| set OPENCL_HEADERS=${{ github.workspace }}\..\openclheaders | |
| msbuild QSVEnc.sln /t:build /p:configuration=Release /p:Platform=${{ matrix.platform }} -maxcpucount | |
| - name: Download auo_setup | |
| id: download_auosetup_win32 | |
| if: matrix.platform == 'Win32' | |
| run: | | |
| curl -o auo_setup.zip -L https://github.com/rigaya/auo_setup/releases/download/2.01/auo_setup_2.01v2.zip | |
| - name: Download auo_setup x64 | |
| id: download_auosetup_x64 | |
| if: matrix.platform == 'x64' | |
| run: | | |
| curl -o auo_setup.zip -L https://github.com/rigaya/auo_setup/releases/download/2.04/auo_setup_2.04_x64.zip | |
| - name: Download QSVEncC Win32 | |
| uses: actions/download-artifact@v4 | |
| if: matrix.platform == 'Win32' | |
| with: | |
| name: QSVEncC_release_${{ needs.get_version_name.outputs.version_name }}_Win32 | |
| path: QSVEncC_${{ needs.get_version_name.outputs.version_name }}_Win32.7z | |
| - name: Download QSVEncC x64 | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: QSVEncC_release_${{ needs.get_version_name.outputs.version_name }}_x64 | |
| path: QSVEncC_${{ needs.get_version_name.outputs.version_name }}_x64.7z | |
| - name: Create package Win32 | |
| id: archieve_win32 | |
| if: matrix.platform == 'Win32' | |
| run: | | |
| mkdir Aviutl_QSVEnc_release | |
| 7z x -oAviutl_QSVEnc_release\ auo_setup.zip | |
| mkdir Aviutl_QSVEnc_release\exe_files\QSVEncC | |
| mkdir Aviutl_QSVEnc_release\exe_files\QSVEncC\x86 | |
| mkdir Aviutl_QSVEnc_release\exe_files\QSVEncC\x64 | |
| 7z x -oAviutl_QSVEnc_release\exe_files\QSVEncC\x86\ QSVEncC_${{ needs.get_version_name.outputs.version_name }}_Win32.7z | |
| 7z x -oAviutl_QSVEnc_release\exe_files\QSVEncC\x64\ QSVEncC_${{ needs.get_version_name.outputs.version_name }}_x64.7z | |
| copy /y _build\Win32\Release\QSVEnc.auo Aviutl_QSVEnc_release\plugins\ | |
| copy /y QSVEnc\QSVEnc.ini Aviutl_QSVEnc_release\plugins\ | |
| copy /y QSVEnc\QSVEnc.en.ini Aviutl_QSVEnc_release\plugins\ | |
| copy /y QSVEnc\QSVEnc.zh.ini Aviutl_QSVEnc_release\plugins\ | |
| copy /y QSVEnc\QSVEnc_uninstall.bat Aviutl_QSVEnc_release\plugins\ | |
| copy /y QSVEnc\auo_setup.ini Aviutl_QSVEnc_release\exe_files\ | |
| copy /y QSVEnc\QSVEnc_readme.txt Aviutl_QSVEnc_release\ | |
| copy /y "QSVEnc\QSVが利用可能か確認 [ダブルクリック].bat" Aviutl_QSVEnc_release\ | |
| copy /y "QSVEnc\デバイスマネージャを開く [ダブルクリック].bat" Aviutl_QSVEnc_release\ | |
| echo D | xcopy /y /e QSVEnc\stg Aviutl_QSVEnc_release\plugins\QSVEnc_stg | |
| dir /b /s Aviutl_QSVEnc_release\ | |
| 7z a -mx9 Aviutl_QSVEnc_${{ needs.get_version_name.outputs.version_name }}.zip .\Aviutl_QSVEnc_release\* | |
| - name: Create package x64 | |
| id: archieve_x64 | |
| if: matrix.platform == 'x64' | |
| run: | | |
| mkdir Aviutl_QSVEnc_release | |
| 7z x -oAviutl_QSVEnc_release\ auo_setup.zip | |
| mkdir Aviutl_QSVEnc_release\Plugin\exe_files\QSVEncC | |
| mkdir Aviutl_QSVEnc_release\Plugin\exe_files\QSVEncC\x64 | |
| 7z x -oAviutl_QSVEnc_release\Plugin\exe_files\QSVEncC\x64\ QSVEncC_${{ needs.get_version_name.outputs.version_name }}_x64.7z | |
| copy /y _build\x64\Release\QSVEnc.auo2 Aviutl_QSVEnc_release\Plugin\ | |
| copy /y QSVEnc\QSVEnc.ini Aviutl_QSVEnc_release\Plugin\ | |
| copy /y QSVEnc\QSVEnc.en.ini Aviutl_QSVEnc_release\Plugin\ | |
| copy /y QSVEnc\QSVEnc.zh.ini Aviutl_QSVEnc_release\Plugin\ | |
| copy /y QSVEnc\QSVEnc_uninstall.bat Aviutl_QSVEnc_release\Plugin\ | |
| copy /y QSVEnc\auo_setup.ini Aviutl_QSVEnc_release\Plugin\exe_files\ | |
| copy /y QSVEnc\QSVEnc_readme.txt Aviutl_QSVEnc_release\ | |
| echo D | xcopy /y /e QSVEnc\stg Aviutl_QSVEnc_release\Plugin\QSVEnc_stg | |
| 7z a -t7z -m0=lzma -mx=9 -mmt Aviutl2_QSVEnc_${{ needs.get_version_name.outputs.version_name }}.7z .\Aviutl_QSVEnc_release\* | |
| copy /b QSVEnc\7zSD.noadmin.sfx + QSVEnc\7zInstallerConfig.txt + Aviutl2_QSVEnc_${{ needs.get_version_name.outputs.version_name }}.7z Aviutl2_QSVEnc_${{ needs.get_version_name.outputs.version_name }}_install.exe | |
| - name: Check Version | |
| id: check_ver | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: | | |
| powershell "$ver = (Get-ItemProperty .\_build\${{ matrix.platform }}\Release\QSVEnc.${{ matrix.outext }}).VersionInfo.FileVersion; if ($ver -eq '${{ needs.get_version_name.outputs.version_name }}') { exit 0; } exit 1;" | |
| - name: Check dll Win32 | |
| id: check_dll_win32 | |
| if: matrix.platform == 'Win32' | |
| run: | | |
| "Aviutl_QSVEnc_release\exe_files\QSVEncC\x86\QSVEncC.exe" --check-avcodec-dll | |
| "Aviutl_QSVEnc_release\exe_files\QSVEncC\x64\QSVEncC64.exe" --check-avcodec-dll | |
| - name: Check dll x64 | |
| id: check_dll_x64 | |
| if: matrix.platform == 'x64' | |
| run: | | |
| "Aviutl_QSVEnc_release\Plugin\exe_files\QSVEncC\x64\QSVEncC64.exe" --check-avcodec-dll | |
| - name: Calc hash Win32 | |
| id: calc_hash_win32 | |
| if: matrix.platform == 'Win32' | |
| run: | | |
| 7z h -scrc* Aviutl_QSVEnc_${{ needs.get_version_name.outputs.version_name }}.zip | |
| - name: Calc hash x64 | |
| id: calc_hash_x64 | |
| if: matrix.platform == 'x64' | |
| run: | | |
| 7z h -scrc* Aviutl2_QSVEnc_${{ needs.get_version_name.outputs.version_name }}_install.exe | |
| - name: Upload Release Asset Win32 | |
| id: upload-release-asset-win32 | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') && matrix.platform == 'Win32' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| files: | | |
| Aviutl_QSVEnc_${{ needs.get_version_name.outputs.version_name }}.zip | |
| - name: Upload Release Asset x64 | |
| id: upload-release-asset-x64 | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') && matrix.platform == 'x64' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| files: | | |
| Aviutl2_QSVEnc_${{ needs.get_version_name.outputs.version_name }}_install.exe | |
| - name: Upload artifact Win32 | |
| uses: actions/upload-artifact@v4 | |
| if: matrix.platform == 'Win32' | |
| with: | |
| name: Aviutl_QSVEnc_${{ needs.get_version_name.outputs.version_name }} | |
| path: Aviutl_QSVEnc_${{ needs.get_version_name.outputs.version_name }}.zip | |
| - name: Upload artifact x64 | |
| uses: actions/upload-artifact@v4 | |
| if: matrix.platform == 'x64' | |
| with: | |
| name: Aviutl2_QSVEnc_${{ needs.get_version_name.outputs.version_name }}_install | |
| path: Aviutl2_QSVEnc_${{ needs.get_version_name.outputs.version_name }}_install.exe |