2020-08-07 12:29:39 +00:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
|
|
set -eux
|
|
|
|
|
2023-07-13 10:08:50 +00:00
|
|
|
# Clone `-b main gstreamer/cerbero` by default, but if running on a gstreamer
|
|
|
|
# branch in another namespace that has a corresponding cerbero branch by the
|
|
|
|
# same name, clone that instead.
|
|
|
|
clone_args="$(py -3 C:/get_cerbero_clone_args.py)"
|
|
|
|
echo "Cloning Cerbero using $clone_args"
|
|
|
|
git clone $clone_args C:/cerbero
|
2023-02-24 13:28:48 +00:00
|
|
|
cd C:/cerbero
|
2020-08-07 12:29:39 +00:00
|
|
|
|
|
|
|
echo 'local_sources="C:/cerbero/cerbero-sources"' > localconf.cbc
|
|
|
|
echo 'home_dir="C:/cerbero/cerbero-build"' >> localconf.cbc
|
|
|
|
echo 'vs_install_path = "C:/BuildTools"' >> localconf.cbc
|
ci: Update to VS 2022 Build Tools
We need the Windows 11 SDK for Windows Graphics Capture API support,
which will be enabled at runtime based on feature availability on
Windows, so should work correctly on Windows 8, 8.1, 10, and 11.
However, if we enable it in the VS 2019 installer, it will install
both Windows 10 SDK (required) and Windows 11 SDK (optional), which
will bloat the image by 3GB or more.
So just move to VS 2022 for the Windows images, which requires only
the Windows 11 SDK.
Had to remove the UWP build tools because they were causing the
installation to fail, likely due to an installer bug. We don't need
UWP anymore anyway. We just need the ARM64 build tools for the
cross-arm64 monorepo build.
Also stop installing into C:\BuildTools and let Meson pick the install
up with --vsenv.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4939>
2023-06-27 18:28:51 +00:00
|
|
|
echo 'vs_install_version = "vs17"' >> localconf.cbc
|
2020-08-07 12:29:39 +00:00
|
|
|
|
|
|
|
# Fetch all bootstrap requirements
|
2022-09-17 21:01:01 +00:00
|
|
|
./cerbero-uninstalled -t -v visualstudio -c localconf.cbc -c config/win64.cbc fetch-bootstrap --jobs=4
|
2020-08-07 12:29:39 +00:00
|
|
|
# Fetch all package requirements for a mingw gstreamer build
|
2021-08-17 10:34:42 +00:00
|
|
|
./cerbero-uninstalled -t -c localconf.cbc -c config/win64.cbc fetch-package --jobs=4 gstreamer-1.0
|
2020-08-07 12:29:39 +00:00
|
|
|
# Fetch all package requirements for a visualstudio gstreamer build
|
2021-08-17 10:34:42 +00:00
|
|
|
./cerbero-uninstalled -t -v visualstudio -c localconf.cbc -c config/win64.cbc fetch-package --jobs=4 gstreamer-1.0
|
2020-08-07 12:29:39 +00:00
|
|
|
|
2023-07-12 09:41:27 +00:00
|
|
|
# Fixup the MSYS2 installation
|
2020-09-21 18:34:08 +00:00
|
|
|
./cerbero-uninstalled -t -c localconf.cbc -c config/win64.cbc bootstrap -y --build-tools=no --toolchains=no --offline
|
2020-08-07 12:29:39 +00:00
|
|
|
|
|
|
|
# Wipe visualstudio package dist, sources, logs, and the build tools recipes
|
|
|
|
./cerbero-uninstalled -t -v visualstudio -c localconf.cbc -c config/win64.cbc wipe --force --build-tools
|
2023-07-13 00:13:02 +00:00
|
|
|
# Vendored sources get confused with hard links. This is not needed anyway,
|
|
|
|
# because cargo stores sources in ~/.cargo/registry/ for offline use.
|
|
|
|
rm -rf /c/cerbero/cerbero-sources/*/cargo-vendor
|
2020-08-07 12:29:39 +00:00
|
|
|
# clean the localconf
|
2022-09-29 14:00:05 +00:00
|
|
|
rm -v /c/cerbero/localconf.cbc
|