2018-11-25 18:38:06 +00:00
|
|
|
# escape=`
|
|
|
|
|
2022-03-22 10:17:33 +00:00
|
|
|
FROM 'mcr.microsoft.com/windows/server:ltsc2022'
|
2018-11-25 18:38:06 +00:00
|
|
|
|
2022-03-22 10:17:33 +00:00
|
|
|
# Make sure any failure in PowerShell is fatal
|
2019-12-04 22:52:45 +00:00
|
|
|
ENV ErrorActionPreference='Stop'
|
2022-03-22 10:17:33 +00:00
|
|
|
SHELL ["powershell","-NoLogo", "-NonInteractive", "-Command"]
|
|
|
|
|
|
|
|
RUN Install-WindowsFeature -Name Server-Media-Foundation
|
2018-11-25 18:38:06 +00:00
|
|
|
|
2021-10-01 15:20:30 +00:00
|
|
|
# Install Chocolatey
|
|
|
|
RUN iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
|
|
|
|
# Install required packages
|
|
|
|
RUN choco install -y vcredist140
|
|
|
|
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
|
2022-08-18 12:25:08 +00:00
|
|
|
RUN choco install -y python3 --installargs 'AssociateFiles=1 PrependPath=1 Include_pip=1 Include_dev=1'
|
2021-10-01 15:20:30 +00:00
|
|
|
RUN choco install -y msys2 --params '/NoPath /NoUpdate /InstallDir:C:\\msys64'
|
|
|
|
|
2022-05-13 08:23:59 +00:00
|
|
|
# Remove MAX_PATH limit of 260 characters
|
|
|
|
RUN New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\FileSystem' `
|
|
|
|
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
|
|
|
|
RUN git config --system core.longpaths true
|
|
|
|
|
2021-10-12 21:13:44 +00:00
|
|
|
RUN c:\msys64\usr\bin\bash -lc 'pacman -S --noconfirm mingw-w64-ucrt-x86_64-toolchain ninja'
|
2021-10-01 15:20:30 +00:00
|
|
|
# Visual Studio can't be installed with choco.
|
|
|
|
# It depends on dotnetfx v4.8.0.20190930, which requires a reboot: dotnetfx (exit code 3010)
|
|
|
|
# https://github.com/microsoft/vs-dockerfiles/blob/main/native-desktop/
|
|
|
|
# Set up environment to collect install errors.
|
|
|
|
COPY Install.cmd C:\TEMP\
|
2022-07-29 11:53:06 +00:00
|
|
|
RUN Invoke-WebRequest -Uri https://aka.ms/vscollect.exe -OutFile C:\TEMP\collect.exe
|
2021-10-01 15:20:30 +00:00
|
|
|
# Download channel for fixed install.
|
2022-07-29 11:53:06 +00:00
|
|
|
RUN Invoke-WebRequest -Uri https://aka.ms/vs/16/release/channel -OutFile C:\TEMP\VisualStudio.chman
|
2021-10-01 15:20:30 +00:00
|
|
|
# Download and install Build Tools for Visual Studio 2017 for native desktop workload.
|
2022-07-29 11:53:06 +00:00
|
|
|
RUN Invoke-WebRequest -Uri https://aka.ms/vs/16/release/vs_buildtools.exe -OutFile C:\TEMP\vs_buildtools.exe
|
2021-10-01 15:20:30 +00:00
|
|
|
RUN C:\TEMP\Install.cmd C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
|
|
|
|
--channelUri C:\TEMP\VisualStudio.chman `
|
|
|
|
--installChannelUri C:\TEMP\VisualStudio.chman `
|
2022-01-27 05:55:53 +00:00
|
|
|
--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 `
|
2021-10-01 15:20:30 +00:00
|
|
|
--installPath C:\BuildTools
|
|
|
|
|
2021-10-12 21:13:44 +00:00
|
|
|
RUN Get-ChildItem C:\BuildTools
|
2022-01-27 05:55:53 +00:00
|
|
|
RUN Get-ChildItem C:\BuildTools\VC\Tools\MSVC
|
|
|
|
RUN Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\lib'
|
2021-10-12 21:13:44 +00:00
|
|
|
|
2022-07-29 17:12:46 +00:00
|
|
|
RUN pip3 install meson==0.62.2
|
2019-07-01 15:55:46 +00:00
|
|
|
|
2020-09-01 18:30:29 +00:00
|
|
|
RUN 'git config --global user.email "cirunner@gstreamer.freedesktop.org"; git config --global user.name "GStreamer CI system"'
|
|
|
|
|
2021-10-01 15:20:30 +00:00
|
|
|
COPY install_mingw.ps1 C:\
|
|
|
|
RUN C:\install_mingw.ps1
|
2019-07-01 15:55:46 +00:00
|
|
|
|
2020-10-24 17:56:22 +00:00
|
|
|
ARG DEFAULT_BRANCH="main"
|
2020-04-27 08:10:26 +00:00
|
|
|
|
2020-01-21 13:29:01 +00:00
|
|
|
COPY prepare_gst_env.ps1 C:\
|
2019-12-02 16:23:27 +00:00
|
|
|
RUN C:\prepare_gst_env.ps1
|
2020-08-07 12:29:39 +00:00
|
|
|
|
|
|
|
COPY prepare_cerbero_env.sh C:\
|
2022-01-27 05:55:53 +00:00
|
|
|
RUN C:\MinGW\msys\1.0\bin\bash.exe --login -c "C:/prepare_cerbero_env.sh"
|