windows: Install dav1d in the docker image

Also to be used in the gst-plugins-rs CI

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1084>
This commit is contained in:
Jordan Petridis 2022-08-25 21:28:45 +03:00
parent 29bc304c88
commit 8ca9692924
3 changed files with 33 additions and 4 deletions

View file

@ -1,4 +1,4 @@
variables:
GST_RS_IMG_TAG: '2022-08-23.2'
GST_RS_IMG_TAG: '2022-08-31.1'
GST_RS_STABLE: '1.63.0'
GST_RS_MSRV: '1.60.0'

View file

@ -9,15 +9,16 @@ SHELL ["powershell","-NoLogo", "-NonInteractive", "-Command"]
ARG DEFAULT_BRANCH="main"
ARG RUST_VERSION="invalid"
RUN choco install -y pkgconfiglite
RUN choco install -y pkgconfiglite nasm llvm
# https://stackoverflow.com/a/50716450
RUN setx PATH '%PATH%;C:\gst-install\bin'
RUN setx PATH '%PATH%;C:\Program Files\NASM;C:\gst-install\bin'
ENV PKG_CONFIG_PATH="C:\gst-install\lib\pkgconfig"
COPY install_gst.ps1 install_gtk.ps1 C:\
COPY install_gst.ps1 install_gtk.ps1 install_dav1d.ps1 C:\
RUN C:\install_gst.ps1
RUN C:\install_gtk.ps1
RUN C:\install_dav1d.ps1
RUN Invoke-WebRequest -Uri https://win.rustup.rs/x86_64 -OutFile C:\rustup-init.exe
RUN C:\rustup-init.exe -y --profile minimal --default-toolchain $env:RUST_VERSION

View file

@ -0,0 +1,28 @@
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
# Download gstreamer and all its subprojects
git clone -b 1.0.0 --depth 1 https://code.videolan.org/videolan/dav1d.git C:\dav1d
if (!$?) {
Write-Host "Failed to clone dav1d"
Exit 1
}
Set-Location C:\dav1d
# This is fine, we are not going to use the GtkMedia* apis
$env:MESON_ARGS = "--prefix=C:\gst-install\"
Write-Output "Building dav1d"
cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && meson _build $env:MESON_ARGS && meson compile -C _build && ninja -C _build install"
if (!$?) {
Write-Host "Failed to build and install dav1d"
Exit 1
}
cd C:\
cmd /c rmdir /s /q C:\dav1d
if (!$?) {
Write-Host "Failed to remove dav1d checkout"
Exit 1
}