Debian Codegraph @

tools/mingw-w64/setup-msys2.ps1

raw
1 # Install (if necessary) and set up msys2.
2
3
4 $url="https://github.com/msys2/msys2-installer/releases/download/2025-08-30/msys2-base-x86_64-20250830.sfx.exe"
5 $sha256="e365b79b4b30b6f4baf34bd93f3d2a41c0a92801c7a96d79cddbfca1090a0554"
6
7
8 if (!(Test-Path -Path "c:\msys64\usr\bin\bash.exe")) {
9 echo "Downloading and installing msys2 to c:\msys64"
10
11 (New-Object System.Net.WebClient).DownloadFile($url, './msys2-installer.exe')
12
13 # Verify checksum
14 (Get-FileHash -Algorithm "SHA256" .\msys2-installer.exe).hash -eq $sha256
15
16 # Install msys2
17 .\msys2-installer.exe -y -oc:\
18
19 Remove-Item msys2-installer.exe
20
21 # Set up msys2 the first time
22 echo "Setting up msys"
23 c:\msys64\usr\bin\bash -lc ' '
24
25 } else {
26 echo "Using previously installed msys2"
27 }
28
29 # Update packages
30 echo "Updating msys2 packages"
31 c:\msys64\usr\bin\bash -lc "pacman --noconfirm -Syuu --overwrite '*'"