diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dfb4fc0acfeb16f6a3221521a677393dd8b7c295..fc6b716ae28676ba325b84256f51dc7735d62318 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,7 +27,7 @@ variables: ### FEDORA_TAG: '2021-12-03.1' INDENT_TAG: '2021-10-04.0' - WINDOWS_TAG: "2021-10-12.0" + WINDOWS_TAG: "2022-01-26.3" GST_UPSTREAM_REPO: 'gstreamer/gstreamer' FDO_UPSTREAM_REPO: 'gstreamer/gstreamer' @@ -388,6 +388,9 @@ build clang fedora x86_64: -Dvaapi=disabled -Dgst-plugins-base:pango=enabled -Dgst-plugins-good:cairo=enabled + # Needs to not be empty otherwise the newline -> space replace command in + # `script:` will fail + MESON_CROSS_ARGS: ' ' rules: # If this matches, it means the pipeline is running against either the main # or a stable branch, so make it manual @@ -400,8 +403,9 @@ build clang fedora x86_64: # For some reason, options are separated by newline instead of space, so we # have to replace them first. - $env:MESON_ARGS = $env:MESON_ARGS.replace("`n"," ") + - $env:MESON_CROSS_ARGS = $env:MESON_CROSS_ARGS.replace("`n"," ") - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH && - meson build $env:MESON_ARGS && + meson build $env:MESON_ARGS $env:MESON_CROSS_ARGS && ninja -C build" # XXX: Re-enable when uploading stops timing out #artifacts: @@ -409,17 +413,31 @@ build clang fedora x86_64: # when: "always" # paths: # - 'build/meson-logs/' + # - 'vslogs.zip' -build vs2017 amd64: +build vs2019 amd64: extends: '.build windows' variables: ARCH: 'amd64' -build vs2017 x86: +build vs2019 x86: extends: '.build windows' variables: ARCH: 'x86' +build vs2019 arm64 uwp: + extends: '.build windows' + variables: + ARCH: 'arm64' + # pango pulls in cairo which pulls in pixman which doesn't build because of + # https://github.com/mesonbuild/meson/issues/9889 + MESON_CROSS_ARGS: > + -Dgst-plugins-base:pango=disabled + -Dgst-plugins-good:cairo=disabled + -Dgst-devtools:cairo=disabled + --cross-file ci/meson/vs2019-arm64-cross-file.txt + --native-file ci/meson/vs2019-x64-native-file.txt + build msys2 : extends: '.build windows' timeout: '60min' diff --git a/ci/docker/windows/Dockerfile b/ci/docker/windows/Dockerfile index 8ab3d5b431de19cb7b73a0efd0660e7e90219d4d..59ebf799843b1f574f43431ae01e1f6b17ee4487 100644 --- a/ci/docker/windows/Dockerfile +++ b/ci/docker/windows/Dockerfile @@ -14,7 +14,6 @@ RUN choco install -y cmake --installargs 'ADD_CMAKE_TO_PATH=System' RUN choco install -y git --params '/NoAutoCrlf /NoCredentialManager /NoShellHereIntegration /NoGuiHereIntegration /NoShellIntegration' RUN choco install -y git-lfs RUN choco install -y 7zip -RUN choco install -y windows-sdk-8.1 RUN choco install -y python3 RUN choco install -y msys2 --params '/NoPath /NoUpdate /InstallDir:C:\\msys64' @@ -26,17 +25,24 @@ RUN c:\msys64\usr\bin\bash -lc 'pacman -S --noconfirm mingw-w64-ucrt-x86_64-tool COPY Install.cmd C:\TEMP\ ADD https://aka.ms/vscollect.exe C:\TEMP\collect.exe # Download channel for fixed install. -ARG CHANNEL_URL=https://aka.ms/vs/15/release/channel +ARG CHANNEL_URL=https://aka.ms/vs/16/release/channel ADD ${CHANNEL_URL} C:\TEMP\VisualStudio.chman # Download and install Build Tools for Visual Studio 2017 for native desktop workload. -ADD https://aka.ms/vs/15/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe +ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe RUN C:\TEMP\Install.cmd C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache ` --channelUri C:\TEMP\VisualStudio.chman ` --installChannelUri C:\TEMP\VisualStudio.chman ` - --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended` + --add Microsoft.VisualStudio.Workload.VCTools ` + --add Microsoft.VisualStudio.Workload.UniversalBuildTools ` + --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 ` + --add Microsoft.VisualStudio.Component.VC.Tools.ARM ` + --add Microsoft.VisualStudio.Component.UWP.VC.ARM64 ` + --includeRecommended ` --installPath C:\BuildTools RUN Get-ChildItem C:\BuildTools +RUN Get-ChildItem C:\BuildTools\VC\Tools\MSVC +RUN Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\lib' RUN pip3 install meson @@ -51,4 +57,4 @@ COPY prepare_gst_env.ps1 C:\ RUN C:\prepare_gst_env.ps1 COPY prepare_cerbero_env.sh C:\ -RUN C:\MinGW\msys\1.0\bin\bash.exe --login -c "C:/prepare_cerbero_env.sh" \ No newline at end of file +RUN C:\MinGW\msys\1.0\bin\bash.exe --login -c "C:/prepare_cerbero_env.sh" diff --git a/ci/docker/windows/Install.cmd b/ci/docker/windows/Install.cmd index f3b73d0df797ff16f1790acc2e4c6a838187181a..8b5af12a505c9872222e92e0a6355bead83efb3a 100644 --- a/ci/docker/windows/Install.cmd +++ b/ci/docker/windows/Install.cmd @@ -25,8 +25,11 @@ if "%ERRORLEVEL%"=="3010" ( ) else ( if not "%ERRORLEVEL%"=="0" ( set ERR=%ERRORLEVEL% - call C:\TEMP\collect.exe -zip:C:\vslogs.zip - + if "%CI_PROJECT_PATH%"=="" ( + call C:\TEMP\collect.exe -zip:C:\vslogs.zip + ) else ( + call C:\TEMP\collect.exe -zip:%CI_PROJECT_PATH%\vslogs.zip + ) exit /b !ERR! ) ) diff --git a/ci/meson/vs2019-arm64-cross-file.txt b/ci/meson/vs2019-arm64-cross-file.txt new file mode 100644 index 0000000000000000000000000000000000000000..21b05dbb4d49997552922a81de0c592f96f6419f --- /dev/null +++ b/ci/meson/vs2019-arm64-cross-file.txt @@ -0,0 +1,23 @@ +[constants] +vs_path = 'C:\BuildTools' +msvc_version = '14.29.30133' +msvc_version_dir = vs_path / 'VC\Tools\MSVC' / msvc_version +msvc_arm64_bindir = msvc_version_dir / 'bin\Hostx64\arm64' +msvc_arm64_libdir = msvc_version_dir / 'lib\arm64' + +[host_machine] +system = 'windows' +cpu_family = 'aarch64' +cpu = 'aarch64' +endian = 'little' + +[properties] +needs_exe_wrapper = true + +[binaries] +lib = msvc_arm64_bindir / 'lib.exe' +c = msvc_arm64_bindir / 'cl.exe' +c_ld = msvc_arm64_bindir / 'link.exe' +cpp = msvc_arm64_bindir / 'cl.exe' +cpp_ld = msvc_arm64_bindir / 'link.exe' +pkgconfig = 'false' diff --git a/ci/meson/vs2019-x64-native-file.txt b/ci/meson/vs2019-x64-native-file.txt new file mode 100644 index 0000000000000000000000000000000000000000..f4568d75a6dd33247c0ba8c0432a1352a885b29a --- /dev/null +++ b/ci/meson/vs2019-x64-native-file.txt @@ -0,0 +1,38 @@ +[constants] +vs_path = 'C:\BuildTools' +msvc_version = '14.29.30133' +msvc_version_dir = vs_path / 'VC\Tools\MSVC' / msvc_version +msvc_x64_bindir = msvc_version_dir / 'bin\Hostx64\x64' +msvc_x64_libdir = msvc_version_dir / 'lib\x64' +wk_path = 'C:\Program Files (x86)\Windows Kits' +wk_version = '10.0.19041.0' +wk_x64_libdir = wk_path / '10\lib' / wk_version / 'um\x64' +wk_x64_crt_libdir = wk_path / '10\lib' / wk_version / 'ucrt\x64' +# Forcibly link to x64 libs when using native linker, otherwise the LIB +# variable in the env will cause link.exe to pick up libs from the cross +# msvc libdir. A better fix might be to use a wrapper script that calls +# link.exe inside the correct VS environment for x64. +msvc_x64_libs = [msvc_x64_libdir / 'msvcrt.lib', msvc_x64_libdir / 'msvcrtd.lib', msvc_x64_libdir / 'vcruntime.lib', msvc_x64_libdir / 'oldnames.lib', wk_x64_crt_libdir / 'ucrt.lib'] + +[host_machine] +system = 'windows' +cpu_family = 'x86_64' +cpu = 'x86_64' +endian = 'little' + +[properties] +needs_exe_wrapper = true + +[built-in options] +# Ensure that x64 libs are used for linking even when we're inside, say, an +# arm64 VS environment +c_link_args = ['/LIBPATH:' + wk_x64_libdir] + msvc_x64_libs +cpp_link_args = ['/LIBPATH:' + wk_x64_libdir] + msvc_x64_libs + +[binaries] +lib = msvc_x64_bindir / 'lib.exe' +c = msvc_x64_bindir / 'cl.exe' +c_ld = msvc_x64_bindir / 'link.exe' +cpp = msvc_x64_bindir / 'cl.exe' +cpp_ld = msvc_x64_bindir / 'link.exe' +pkgconfig = 'false' diff --git a/subprojects/gst-devtools/meson_options.txt b/subprojects/gst-devtools/meson_options.txt index 5da5abf92120c6195c314cb62bb1f68737f08a35..d7f5337c3e1c4784a0d219607bf907ed7b805018 100644 --- a/subprojects/gst-devtools/meson_options.txt +++ b/subprojects/gst-devtools/meson_options.txt @@ -1,7 +1,10 @@ option('validate', type : 'feature', value : 'auto', description : 'Build GstValidate') +option('cairo', type : 'feature', value : 'auto', description : 'Build GstValidateVideo') option('debug_viewer', type : 'feature', value : 'disabled', description : 'Build GstDebugViewer (GPLv3+)') + +# Common feature options option('introspection', type : 'feature', value : 'auto', yield : true, description : 'Generate gobject-introspection bindings') option('tests', type : 'feature', value : 'auto', yield : true, diff --git a/subprojects/gst-devtools/validate/gst-libs/gst/video/meson.build b/subprojects/gst-devtools/validate/gst-libs/gst/video/meson.build index c4a84da5764ba9ada2e5034ab7673423781634af..ad1c88b7e23c4ebaec2293c114a1bae3c4bae479 100644 --- a/subprojects/gst-devtools/validate/gst-libs/gst/video/meson.build +++ b/subprojects/gst-devtools/validate/gst-libs/gst/video/meson.build @@ -1,5 +1,5 @@ validate_video_dep = dependency('', required: false) -cairo_dep = dependency('cairo-png', required: false, fallback: 'cairo') +cairo_dep = dependency('cairo-png', required: get_option('cairo'), fallback: 'cairo') if cairo_dep.found() video = static_library( diff --git a/subprojects/lame.wrap b/subprojects/lame.wrap index d2eb6adfee54b9b285fff959befbe123bfc0fc8e..ab985c6d380a9a484ce36c0664f04cf795d47c38 100644 --- a/subprojects/lame.wrap +++ b/subprojects/lame.wrap @@ -3,7 +3,11 @@ directory = lame-3.100 source_url = http://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz source_filename = lame-3.100.tar.gz source_hash = ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e -patch_url = https://wrapdb.mesonbuild.com/v2/lame_3.100-1/get_patch -patch_filename = lame-3.100-1-wrap.zip -patch_hash = 3e62e95d13aef0f139e4376e775acb367525a8ed2dbeb8d09c93fd318f093654 +patch_filename = lame_3.100-4_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/lame_3.100-4/get_patch +patch_hash = d2df5d27be783b29bd8a8a57f60f769b71164c3a2df22a3ec87ef0b27f37de14 + +[provide] +mp3lame = lame_dep +mpglib = mpglib_dep diff --git a/subprojects/libpng.wrap b/subprojects/libpng.wrap new file mode 100644 index 0000000000000000000000000000000000000000..35cfaa75c10148698937789abca4b00581ab594e --- /dev/null +++ b/subprojects/libpng.wrap @@ -0,0 +1,11 @@ +[wrap-file] +directory = libpng-1.6.37 +source_url = https://github.com/glennrp/libpng/archive/v1.6.37.tar.gz +source_filename = libpng-1.6.37.tar.gz +source_hash = ca74a0dace179a8422187671aee97dd3892b53e168627145271cad5b5ac81307 +patch_filename = libpng_1.6.37-5_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/libpng_1.6.37-5/get_patch +patch_hash = 822200906ad2e82dc8b44e79fe960e980ccad96263548c35eef721086a9926f1 + +[provide] +libpng = libpng_dep diff --git a/subprojects/pcre.wrap b/subprojects/pcre.wrap new file mode 100644 index 0000000000000000000000000000000000000000..663032601fd5fa35e0543b52740bcbb6a8f2eb22 --- /dev/null +++ b/subprojects/pcre.wrap @@ -0,0 +1,12 @@ +[wrap-file] +directory = pcre-8.37 +source_url = https://sourceforge.net/projects/pcre/files/pcre/8.37/pcre-8.37.tar.bz2 +source_filename = pcre-8.37.tar.bz2 +source_hash = 51679ea8006ce31379fb0860e46dd86665d864b5020fc9cd19e71260eef4789d +patch_filename = pcre_8.37-4_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/pcre_8.37-4/get_patch +patch_hash = c957f42da6f6378300eb8a18f4a5cccdb8e2aada51a703cac842982f9f785399 + +[provide] +libpcre = pcre_dep +