ci: Use meson --vsenv instead of invoking VsDevCmd.bat

This is simpler, easier to use, and less likely to break.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1298>
This commit is contained in:
Nirbheek Chauhan 2023-07-19 14:13:50 +05:30
parent 0d7555bed0
commit 16e1f92489

View file

@ -14,30 +14,35 @@ Move-Item C:/subprojects/* C:\gstreamer\subprojects
Write-Output "Running meson subproject reset" Write-Output "Running meson subproject reset"
meson subprojects update --reset meson subprojects update --reset
$env:MESON_ARGS = "--prefix=C:\gst-install\ " + $MESON_ARGS = @(`
"-Dglib:installed_tests=false " + "--prefix=C:\gst-install", `
"-Dlibnice:tests=disabled " + "-Dglib:installed_tests=false", `
"-Dlibnice:examples=disabled " + "-Dlibnice:tests=disabled", `
"-Dffmpeg:tests=disabled " + "-Dlibnice:examples=disabled", `
"-Dopenh264:tests=disabled " + "-Dffmpeg:tests=disabled", `
"-Dpygobject:tests=false " + "-Dopenh264:tests=disabled", `
"-Dgpl=enabled " + "-Dpygobject:tests=false", `
"-Dugly=enabled " + "-Dgpl=enabled", `
"-Dbad=enabled " + "-Dugly=enabled", `
"-Dges=enabled " + "-Dbad=enabled", `
"-Drtsp_server=enabled " + "-Dges=enabled", `
"-Ddevtools=enabled " + "-Drtsp_server=enabled", `
"-Dsharp=disabled " + "-Ddevtools=enabled", `
"-Dpython=disabled " + "-Dsharp=disabled", `
"-Dlibav=disabled " + "-Dpython=disabled", `
"-Dvaapi=disabled " + "-Dlibav=disabled", `
"-Dgst-plugins-base:pango=enabled " + "-Dvaapi=disabled", `
"-Dgst-plugins-good:cairo=enabled " + "-Dgst-plugins-base:pango=enabled", `
"-Dgst-plugins-good:cairo=enabled", `
"-Dgst-plugins-good:lame=disabled" "-Dgst-plugins-good:lame=disabled"
)
Write-Output "Building gst"
cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 && meson setup _build $env:MESON_ARGS && meson compile -C _build && meson install -C _build"
Write-Output "Building gstreamer"
meson setup --vsenv $MESON_ARGS _build
meson compile -C _build
# meson install does a spurious rebuild sometimes that then fails
meson install --no-rebuild -C _build
cd c:\ cd c:\
Remove-Item -LiteralPath "C:\gstreamer" -Force -Recurse Remove-Item -LiteralPath "C:\gstreamer" -Force -Recurse