2020-10-27 22:03:02 +00:00
|
|
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
|
|
|
|
|
|
|
|
# Download gstreamer and all its subprojects
|
|
|
|
git clone -b $env:DEFAULT_BRANCH --depth 1 https://gitlab.freedesktop.org/gstreamer/gstreamer.git C:\gstreamer
|
2023-12-19 12:12:18 +00:00
|
|
|
if (!$?) {
|
|
|
|
Write-Host "Failed to clone gstreamer"
|
|
|
|
Exit 1
|
|
|
|
}
|
2020-10-27 22:03:02 +00:00
|
|
|
|
|
|
|
Set-Location C:\gstreamer
|
|
|
|
|
|
|
|
# Copy the cache we already have in the image to avoid massive redownloads
|
|
|
|
Move-Item C:/subprojects/* C:\gstreamer\subprojects
|
|
|
|
|
|
|
|
# Update the subprojects cache
|
|
|
|
Write-Output "Running meson subproject reset"
|
|
|
|
meson subprojects update --reset
|
2023-12-19 12:12:18 +00:00
|
|
|
if (!$?) {
|
|
|
|
Write-Host "Failed to update gstreamer subprojects"
|
|
|
|
Exit 1
|
|
|
|
}
|
2020-10-27 22:03:02 +00:00
|
|
|
|
2023-07-19 08:43:50 +00:00
|
|
|
$MESON_ARGS = @(`
|
|
|
|
"--prefix=C:\gst-install", `
|
|
|
|
"-Dglib:installed_tests=false", `
|
|
|
|
"-Dlibnice:tests=disabled", `
|
|
|
|
"-Dlibnice:examples=disabled", `
|
|
|
|
"-Dffmpeg:tests=disabled", `
|
|
|
|
"-Dopenh264:tests=disabled", `
|
|
|
|
"-Dpygobject:tests=false", `
|
|
|
|
"-Dgpl=enabled", `
|
|
|
|
"-Dugly=enabled", `
|
|
|
|
"-Dbad=enabled", `
|
|
|
|
"-Dges=enabled", `
|
|
|
|
"-Drtsp_server=enabled", `
|
|
|
|
"-Ddevtools=enabled", `
|
|
|
|
"-Dsharp=disabled", `
|
|
|
|
"-Dpython=disabled", `
|
|
|
|
"-Dlibav=disabled", `
|
|
|
|
"-Dvaapi=disabled", `
|
2024-08-17 08:18:48 +00:00
|
|
|
"-Dgtk=enabled", `
|
2023-07-19 08:43:50 +00:00
|
|
|
"-Dgst-plugins-base:pango=enabled", `
|
|
|
|
"-Dgst-plugins-good:cairo=enabled", `
|
|
|
|
"-Dgst-plugins-good:lame=disabled"
|
|
|
|
)
|
|
|
|
|
|
|
|
Write-Output "Building gstreamer"
|
|
|
|
meson setup --vsenv $MESON_ARGS _build
|
2023-12-19 12:12:18 +00:00
|
|
|
if (!$?) {
|
|
|
|
type "_build\meson-logs\meson-log.txt"
|
|
|
|
Write-Host "Failed to run meson setup, see log above"
|
|
|
|
Exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
Write-Output "Compiling gstreamer"
|
2023-07-19 08:43:50 +00:00
|
|
|
meson compile -C _build
|
2023-12-19 12:12:18 +00:00
|
|
|
if (!$?) {
|
|
|
|
Write-Host "Failed to run meson compile"
|
|
|
|
Exit 1
|
|
|
|
}
|
2023-07-19 08:43:50 +00:00
|
|
|
# meson install does a spurious rebuild sometimes that then fails
|
|
|
|
meson install --no-rebuild -C _build
|
2023-12-19 12:12:18 +00:00
|
|
|
if (!$?) {
|
|
|
|
Write-Host "Failed to run meson install"
|
|
|
|
Exit 1
|
|
|
|
}
|
2023-07-19 08:43:08 +00:00
|
|
|
|
|
|
|
cd c:\
|
|
|
|
Remove-Item -LiteralPath "C:\gstreamer" -Force -Recurse
|