ci: Eliminate MSYS from the windows docker image

We require MSYS2 now

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5043>
This commit is contained in:
Nirbheek Chauhan 2023-07-12 15:11:27 +05:30 committed by GStreamer Marge Bot
parent 038a8c5308
commit ab85826498
4 changed files with 18 additions and 36 deletions

View file

@ -49,15 +49,15 @@ RUN New-ItemProperty -Path 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\FileSyste
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
RUN git config --system core.longpaths true
RUN c:\msys64\usr\bin\bash -lc 'pacman -S --noconfirm mingw-w64-ucrt-x86_64-toolchain ninja'
COPY upgrade_msys2.ps1 C:\
RUN C:\upgrade_msys2.ps1
RUN pip3 install meson==1.1.1
RUN C:\msys64\msys2_shell.cmd -ucrt64 -defterm -here -no-start -use-full-path -lc 'pacman -S --noconfirm mingw-w64-ucrt-x86_64-toolchain ninja'
RUN python -m pip install meson==1.1.1
RUN 'git config --global user.email "cirunner@gstreamer.freedesktop.org"; git config --global user.name "GStreamer CI system"'
COPY install_mingw.ps1 C:\
RUN C:\install_mingw.ps1
COPY install_rust.ps1 C:\
RUN C:\install_rust.ps1
@ -67,4 +67,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"
RUN C:\msys64\msys2_shell.cmd -ucrt64 -defterm -here -no-start -use-full-path -lc "C:/prepare_cerbero_env.sh"

View file

@ -1,29 +0,0 @@
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
$msys_mingw_get_url = 'https://dotsrc.dl.osdn.net/osdn/mingw/68260/mingw-get-0.6.3-mingw32-pre-20170905-1-bin.tar.xz'
Get-Date
Write-Host "Downloading and extracting mingw-get for MSYS"
Invoke-WebRequest -Uri $msys_mingw_get_url -OutFile C:\mingw-get.tar.xz
7z e C:\mingw-get.tar.xz -o"C:\\"
$res1 = $?
7z x C:\mingw-get.tar -o"C:\\MinGW"
$res2 = $?
if (!($res1 -and $res2)) {
Write-Host "Failed to extract mingw-get"
Exit 1
}
Remove-Item C:\mingw-get.tar.xz -Force
Remove-Item C:\mingw-get.tar -Force
Get-Date
Write-Host "Installing MSYS for Cerbero into C:/MinGW using mingw-get"
Start-Process -Wait C:\MinGW\bin\mingw-get.exe -ArgumentList 'install msys-base mingw32-base mingw-developer-toolkit'
if (!$?) {
Write-Host "Failed to install Msys for cerbero using MinGW"
Exit 1
}
Write-Host "MSYS/MinGW Install Complete"

View file

@ -18,7 +18,7 @@ echo 'vs_install_version = "vs17"' >> localconf.cbc
# Fetch all package requirements for a visualstudio gstreamer build
./cerbero-uninstalled -t -v visualstudio -c localconf.cbc -c config/win64.cbc fetch-package --jobs=4 gstreamer-1.0
# Fixup the MSYS installation
# Fixup the MSYS2 installation
./cerbero-uninstalled -t -c localconf.cbc -c config/win64.cbc bootstrap -y --build-tools=no --toolchains=no --offline
# Wipe visualstudio package dist, sources, logs, and the build tools recipes

View file

@ -0,0 +1,11 @@
$ErrorActionPreference = 'Continue'
# Perform a sysupgrade on MSYS2, otherwise it will do the upgrade at a later stage
while (1) {
C:\msys64\msys2_shell.cmd -ucrt64 -defterm -here -no-start -use-full-path -lc 'pacman -Syuu --noconfirm'
if (!$?) {
Write-Host "System upgrade needed to kill MSYS2 processes or something, running it again..."
continue
}
Write-Host "MSYS2 system upgrade complete"
break
}