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"
meson subprojects update --reset
$env: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 " +
"-Dgst-plugins-base:pango=enabled " +
"-Dgst-plugins-good:cairo=enabled " +
"-Dgst-plugins-good:lame=disabled "
$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", `
"-Dgst-plugins-base:pango=enabled", `
"-Dgst-plugins-good:cairo=enabled", `
"-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:\
Remove-Item -LiteralPath "C:\gstreamer" -Force -Recurse