From 52181e0e0ba43b5d53bb18ef7d4494e8d2127ae0 Mon Sep 17 00:00:00 2001 From: Dejan Jovasevic Date: Sat, 23 Mar 2024 15:12:46 +0100 Subject: [PATCH] Download and use cmake 3.21 --- .github/workflows/main.yml | 25 +++++++++++++++++++++++-- CI/windows/02_build_obs.ps1 | 3 --- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 88e2ee579..b590fa8e1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -497,6 +497,17 @@ jobs: - name: 'Fix ffmpeg installation' run: choco install ffmpeg + - name: Install cmake 3.21 and set path + run: | + Invoke-WebRequest -Uri "https://github.com/Kitware/CMake/releases/download/v3.21.3/cmake-3.21.3-windows-x86_64.zip" -OutFile "cmake.zip" + Expand-Archive "cmake.zip" -DestinationPath "C:\Program Files\cmake-3.21" + $newPath = "C:\Program Files\cmake-3.21\cmake-3.21.3-windows-x86_64\bin;" + $env:PATH + echo "PATH=$newPath" >> $GITHUB_ENV + echo "$env:PATH =$newPath" + Remove-Item cmake.zip + cmake --version + shell: powershell + - name: 'Setup plugings' run: | git stash @@ -505,10 +516,20 @@ jobs: git submodule update --init --recursive - name: 'Build OBS with no NDI' - run: ./CI/windows/02_build_obs.ps1 -BuildArch ${{ env.TARGET_ARCH }} -Vendor $env:VENDOR + run: | + $newPath = "C:\Program Files\cmake-3.21\cmake-3.21.3-windows-x86_64\bin;" + $env:PATH + echo "PATH=$newPath" >> $GITHUB_ENV + echo "$env:PATH =$newPath" + ./CI/windows/02_build_obs.ps1 -BuildArch ${{ env.TARGET_ARCH }} -Vendor $env:VENDOR + shell: powershell - name: 'Build OBS with NDI' - run: ./CI/windows/02_build_obs.ps1 -BuildArch ${{ env.TARGET_ARCH }} -Vendor $env:VENDOR -Ndi ON + run: | + $newPath = "C:\Program Files\cmake-3.21\cmake-3.21.3-windows-x86_64\bin;" + $env:PATH + echo "PATH=$newPath" >> $GITHUB_ENV + echo "$env:PATH =$newPath" + ./CI/windows/02_build_obs.ps1 -BuildArch ${{ env.TARGET_ARCH }} -Vendor $env:VENDOR -Ndi ON + shell: powershell - name: 'Prepare package' run: ./CI/windows/before-deploy-win.cmd ${{ env.VENDOR }} diff --git a/CI/windows/02_build_obs.ps1 b/CI/windows/02_build_obs.ps1 index ae4a67bfa..13e1afdc3 100644 --- a/CI/windows/02_build_obs.ps1 +++ b/CI/windows/02_build_obs.ps1 @@ -92,9 +92,6 @@ function Configure-OBS { "-DCOPIED_DEPENDENCIES=OFF", "-DCOPY_DEPENDENCIES=ON", "-DBUILD_FOR_DISTRIBUTION=ON", - "-DFFMPEG_DIR:PATH=C:\ProgramData\chocolatey\lib\ffmpeg", - "-DAVCODEC_INCLUDE_DIR:PATH=C:\ProgramData\chocolatey\lib\ffmpeg\include", - "-DAVCODEC_LIBRARY:FILEPATH=C:\ProgramData\chocolatey\lib\ffmpeg\lib\avcodec.lib", "$(if (Test-Path Env:CI) { "-DOBS_BUILD_NUMBER=${Env:GITHUB_RUN_ID}" })", "$(if (Test-Path Variable:$Quiet) { "-Wno-deprecated -Wno-dev --log-level=ERROR" })", "-Dlibwebrtc_DIR=`"C:/Program Files/libwebrtc/cmake`"",