@@ -51,8 +51,8 @@ param (
5151 [string ]$Msys2Env
5252)
5353
54- $DefaultMsys2Version = " 20221216 "
55- $DefaultMsys2Hash = " 18370d32b0264915c97e3d7c618f7b32d48ad80858923883fde5145acd32ca0f "
54+ $DefaultMsys2Version = " 20250221 "
55+ $DefaultMsys2Hash = " 6d4952fd65d1924c56620355c3c7d5a1b40e3c7d7be358f6eb1017363d2dbbb1 "
5656
5757$Silent = ! $Interactive
5858
@@ -561,12 +561,6 @@ if ($msys2Action -eq 0) {
561561
562562 Exec " $env: windir \system32\taskkill.exe" / F / FI " MODULES eq msys-2.0.dll"
563563
564- Print- Msg - msg ' Upgrading full system...'
565- Exec " $Bash " ' -lc' ' pacman --noconfirm -Syuu'
566-
567- Print- Msg - msg ' Upgrading full system twice...'
568- Exec " $Bash " ' -lc' ' pacman --noconfirm -Syuu'
569-
570564 Print- Msg - msg ' Installing Dependencies...'
571565 Exec " $Bash " ' -lc' (' pacman --noconfirm -S --needed curl autoconf {0}' -f $PkgConf )
572566
@@ -650,9 +644,15 @@ if ($Host.Name -eq "ConsoleHost")
650644
651645 $GhcInstArgs = (' {0} -mintty -c "pacman --noconfirm -S --needed base-devel gettext autoconf make libtool automake python p7zip patch unzip"' -f $ShellType )
652646 Create- Shortcut - SourceExe (' {0}\msys2_shell.cmd' -f $MsysDir ) - ArgumentsToSourceExe $GhcInstArgs - DestinationPath ' Install GHC dev dependencies.lnk' - TempPath $GhcupDir
653- Create- Shortcut - SourceExe (' {0}\msys2_shell.cmd' -f $MsysDir ) - ArgumentsToSourceExe $ShellType - DestinationPath ' Mingw haskell shell.lnk' - TempPath $GhcupDir
654- Create- Shortcut - SourceExe ' https://www.msys2.org/docs/package-management' - ArgumentsToSourceExe ' ' - DestinationPath ' Mingw package management docs.url' - TempPath $GhcupDir
647+
655648 $DesktopDir = [Environment ]::GetFolderPath(" Desktop" )
649+ $shellScript = (@'
650+ powershell.exe -ExecutionPolicy Bypass -Command ". '{0}\msys2_shell.cmd' '{1}' '-here' '-no-start' '-shell' 'bash' '-use-full-path' '-c' 'echo && echo To keep your msys2 env and bash shell up to date, run: pacman -Syuu && /usr/bin/bash -l'"
651+ '@ -f $MsysDir , $ShellType )
652+ $null = New-Item - Path $MsysDir - Name " Haskell Shell.bat" - ItemType " file" - Force - Value $shellScript
653+ Create- Shortcut - SourceExe (' {0}\Haskell Shell.bat' -f $MsysDir ) - ArgumentsToSourceExe ' ' - DestinationPath ' Mingw haskell shell.lnk' - TempPath $GhcupDir
654+
655+ Create- Shortcut - SourceExe ' https://www.msys2.org/docs/package-management' - ArgumentsToSourceExe ' ' - DestinationPath ' Mingw package management docs.url' - TempPath $GhcupDir
656656 $null = New-Item - Path $DesktopDir - Name " Uninstall Haskell.ps1" - ItemType " file" - Force - Value $uninstallShortCut
657657}
658658
0 commit comments