3 FROM 'mcr.microsoft.com/windows/server:ltsc2022'
5 # Make sure any failure in PowerShell is fatal
6 ENV ErrorActionPreference='Stop'
7 SHELL ["powershell","-NoLogo", "-NonInteractive", "-Command"]
9 RUN Install-WindowsFeature -Name Server-Media-Foundation
12 RUN iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
13 # Install required packages
14 RUN choco install -y vcredist140
15 RUN choco install -y cmake --installargs 'ADD_CMAKE_TO_PATH=System'
16 RUN choco install -y git --params '/NoAutoCrlf /NoCredentialManager /NoShellHereIntegration /NoGuiHereIntegration /NoShellIntegration'
17 RUN choco install -y git-lfs
18 RUN choco install -y 7zip
19 RUN choco install -y python3 --installargs 'AssociateFiles=1 PrependPath=1 Include_pip=1 Include_dev=1'
20 RUN choco install -y msys2 --params '/NoPath /NoUpdate /InstallDir:C:\\msys64'
22 # Remove MAX_PATH limit of 260 characters
23 RUN New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\FileSystem' `
24 -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
25 RUN git config --system core.longpaths true
27 RUN c:\msys64\usr\bin\bash -lc 'pacman -S --noconfirm mingw-w64-ucrt-x86_64-toolchain ninja'
28 # Visual Studio can't be installed with choco.
29 # It depends on dotnetfx v4.8.0.20190930, which requires a reboot: dotnetfx (exit code 3010)
30 # https://github.com/microsoft/vs-dockerfiles/blob/main/native-desktop/
31 # Set up environment to collect install errors.
32 COPY Install.cmd C:\TEMP\
33 RUN Invoke-WebRequest -Uri https://aka.ms/vscollect.exe -OutFile C:\TEMP\collect.exe
34 # Download channel for fixed install.
35 RUN Invoke-WebRequest -Uri https://aka.ms/vs/16/release/channel -OutFile C:\TEMP\VisualStudio.chman
36 # Download and install Build Tools for Visual Studio 2017 for native desktop workload.
37 RUN Invoke-WebRequest -Uri https://aka.ms/vs/16/release/vs_buildtools.exe -OutFile C:\TEMP\vs_buildtools.exe
38 RUN C:\TEMP\Install.cmd C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
39 --channelUri C:\TEMP\VisualStudio.chman `
40 --installChannelUri C:\TEMP\VisualStudio.chman `
41 --add Microsoft.VisualStudio.Workload.VCTools `
42 --add Microsoft.VisualStudio.Workload.UniversalBuildTools `
43 --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 `
44 --add Microsoft.VisualStudio.Component.VC.Tools.ARM `
45 --add Microsoft.VisualStudio.Component.UWP.VC.ARM64 `
46 --includeRecommended `
47 --installPath C:\BuildTools
49 RUN Get-ChildItem C:\BuildTools
50 RUN Get-ChildItem C:\BuildTools\VC\Tools\MSVC
51 RUN Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\lib'
53 RUN pip3 install meson==0.62.2
55 RUN 'git config --global user.email "cirunner@gstreamer.freedesktop.org"; git config --global user.name "GStreamer CI system"'
57 COPY install_mingw.ps1 C:\
58 RUN C:\install_mingw.ps1
60 ARG DEFAULT_BRANCH="main"
62 COPY prepare_gst_env.ps1 C:\
63 RUN C:\prepare_gst_env.ps1
65 COPY prepare_cerbero_env.sh C:\
66 RUN C:\MinGW\msys\1.0\bin\bash.exe --login -c "C:/prepare_cerbero_env.sh"