ci: prepare the Windows image for MSYS2 cerbero builds
[platform/upstream/gstreamer.git] / ci / docker / windows / install_mingw.ps1
1 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
2
3 $msys_mingw_get_url = 'https://dotsrc.dl.osdn.net/osdn/mingw/68260/mingw-get-0.6.3-mingw32-pre-20170905-1-bin.tar.xz'
4
5 Get-Date
6 Write-Host "Downloading and extracting mingw-get for MSYS"
7 Invoke-WebRequest -Uri $msys_mingw_get_url -OutFile C:\mingw-get.tar.xz
8 7z e C:\mingw-get.tar.xz -o"C:\\"
9 $res1 = $?
10 7z x C:\mingw-get.tar -o"C:\\MinGW"
11 $res2 = $?
12
13 if (!($res1 -and $res2)) {
14   Write-Host "Failed to extract mingw-get"
15   Exit 1
16 }
17
18 Remove-Item C:\mingw-get.tar.xz -Force
19 Remove-Item C:\mingw-get.tar -Force
20
21 Get-Date
22 Write-Host "Installing MSYS for Cerbero into C:/MinGW using mingw-get"
23 Start-Process -Wait C:\MinGW\bin\mingw-get.exe -ArgumentList 'install msys-base mingw32-base mingw-developer-toolkit'
24 if (!$?) {
25   Write-Host "Failed to install Msys for cerbero using MinGW"
26   Exit 1
27 }
28
29 Write-Host "MSYS/MinGW Install Complete"