From 8ed8d8d127f4c26b9f5bd4f5415cb0a5410f8605 Mon Sep 17 00:00:00 2001 From: Alejandro R Mosteo Date: Tue, 22 Jun 2021 16:12:31 +0200 Subject: [PATCH] Update msys installer to latest stable release (#756) * Update msys installer to latest stable release * Alr.Platforms.Windows: new msys2 installer doesn't need extra script Co-authored-by: Fabien Chouteau --- src/alr/os_windows/alr-platforms-windows.adb | 27 +++++--------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/src/alr/os_windows/alr-platforms-windows.adb b/src/alr/os_windows/alr-platforms-windows.adb index 0d243ac1..0aa083cc 100644 --- a/src/alr/os_windows/alr-platforms-windows.adb +++ b/src/alr/os_windows/alr-platforms-windows.adb @@ -17,16 +17,11 @@ package body Alr.Platforms.Windows is package Cfg renames Alire.Config; - Msys2_Installer : constant String := "msys2-x86_64-20200903.exe"; + Msys2_Installer : constant String := "msys2-x86_64-20210604.exe"; Msys2_Installer_URL : constant String := - "https://github.com/msys2/msys2-installer/releases/download/2020-09-03/" + "https://github.com/msys2/msys2-installer/releases/download/2021-06-04/" & Msys2_Installer; - Msys2_Installer_Script : constant String := "auto-install.js"; - Msys2_Installer_Script_URL : constant String := - "https://raw.githubusercontent.com/msys2/msys2-installer/a588bcc/" & - Msys2_Installer_Script; - ------------------- -- Set_Msys2_Env -- ------------------- @@ -104,9 +99,6 @@ package body Alr.Platforms.Windows is is use Alire.Utils; - Install_Prefix : constant String := - "InstallDir=" & Install_Dir; - Result : Alire.Outcome; begin if not Query_User_For_Msys2_Install (Install_Dir) then @@ -121,21 +113,16 @@ package body Alr.Platforms.Windows is return Result; end if; - Result := Alire.OS_Lib.Download.File (Msys2_Installer_Script_URL, - Msys2_Installer_Script, - Install_Dir); - if not Result.Success then - return Result; - end if; - begin -- Run msys2's installer Alire.OS_Lib.Subprocess.Checked_Spawn (Install_Dir / Msys2_Installer, Alire.Utils.Empty_Vector & - "--script" & (Install_Dir / Msys2_Installer_Script) & - "-v" & - Install_Prefix); + "in" & + "--confirm-command" & + "--accept-messages" & + "--root" & + Install_Dir); exception when others => -- 2.39.5