mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-23 00:26:31 +00:00
ci: Install gtk on the windows image
So we can use it in gst-plugins-rs CI. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1084>
This commit is contained in:
parent
f7248408cb
commit
9a9b7bc5ce
2 changed files with 33 additions and 2 deletions
|
@ -9,10 +9,12 @@ SHELL ["powershell","-NoLogo", "-NonInteractive", "-Command"]
|
|||
ARG DEFAULT_BRANCH="main"
|
||||
ARG RUST_VERSION="invalid"
|
||||
|
||||
COPY install_gst.ps1 C:\
|
||||
RUN C:\install_gst.ps1
|
||||
RUN choco install -y pkgconfiglite
|
||||
ENV PKG_CONFIG_PATH="C:/lib/pkgconfig"
|
||||
|
||||
COPY install_gst.ps1 install_gtk.ps1 C:\
|
||||
RUN C:\install_gst.ps1
|
||||
RUN C:\install_gtk.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
|
||||
|
|
29
ci/windows-docker/install_gtk.ps1
Normal file
29
ci/windows-docker/install_gtk.ps1
Normal file
|
@ -0,0 +1,29 @@
|
|||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
|
||||
|
||||
$env:Path += ";C:\gst-install\bin\"
|
||||
|
||||
# Download gstreamer and all its subprojects
|
||||
git clone -b gtk-4-6 --depth 1 https://gitlab.gnome.org/gnome/gtk.git C:\gtk
|
||||
if (!$?) {
|
||||
Write-Host "Failed to clone gtk"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
Set-Location C:\gtk
|
||||
|
||||
$env:MESON_ARGS = ""
|
||||
|
||||
Write-Output "Building gtk"
|
||||
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 gtk"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
cd C:\
|
||||
cmd /c rmdir /s /q C:\gtk
|
||||
if (!$?) {
|
||||
Write-Host "Failed to remove gtk checkout"
|
||||
Exit 1
|
||||
}
|
Loading…
Reference in a new issue