From 265b6596fa076802082a09004de156b368344d69 Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Wed, 23 Jun 2021 18:49:14 +0300 Subject: [PATCH 1/9] ucrt added --- images/win/scripts/Tests/MSYS2.Tests.ps1 | 12 ++------ images/win/toolsets/toolset-2019.json | 36 ++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/images/win/scripts/Tests/MSYS2.Tests.ps1 b/images/win/scripts/Tests/MSYS2.Tests.ps1 index 1290dd1606c1..0a7fc53d4aaf 100644 --- a/images/win/scripts/Tests/MSYS2.Tests.ps1 +++ b/images/win/scripts/Tests/MSYS2.Tests.ps1 @@ -38,22 +38,14 @@ foreach ($arch in $archs) { Describe "$arch arch packages" { $archPackages = $toolsetContent.mingw | Where-Object { $_.arch -eq $arch } $tools = $archPackages.runtime_packages.name - - if ($arch -eq "mingw-w64-i686") - { - $ExecDir = "C:\msys64\mingw32\bin" - } - else - { - $ExecDir = "C:\msys64\mingw64\bin" - } + $execDir = "C:\msys64\" + $archPackages.exec_dir + "\bin" foreach ($tool in $tools) { Context "$tool package"{ $executables = ($archPackages.runtime_packages | Where-Object { $_.name -eq $tool }).executables | ForEach-Object { @{ ExecName = $_ - ExecDir = $ExecDir + ExecDir = $execDir } } diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index 84841df8ca84..6c4bd61b2ed9 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -181,6 +181,7 @@ "mingw": [ { "arch": "mingw-w64-x86_64", + "exec_dir": "mingw64", "runtime_packages": [ { "name": "clang", @@ -214,6 +215,7 @@ }, { "arch": "mingw-w64-i686", + "exec_dir": "mingw32", "runtime_packages": [ { "name": "clang", @@ -243,6 +245,40 @@ "llvm", "toolchain" ] + }, + { + "arch": "mingw-w64-ucrt-x86_64", + "exec_dir": "ucrt64", + "runtime_packages": [ + { + "name": "clang", + "executables": [ + "clang", + "g++", + "gcc" + ] + }, + { + "name": "cmake", + "executables": [ + "cmake", + "cpack", + "ctest" + ] + }, + { + "name": "ragel", + "executables": [ + "ragel" + ] + } + ], + "additional_packages": [ + "clang-tools-extra", + "libxml2", + "llvm", + "toolchain" + ] } ] }, From 109d83a83fb50c7d2aa7f9962050e424e08235c6 Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Wed, 23 Jun 2021 18:52:24 +0300 Subject: [PATCH 2/9] win16 added --- images/win/toolsets/toolset-2016.json | 34 +++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/images/win/toolsets/toolset-2016.json b/images/win/toolsets/toolset-2016.json index 0cd62ff97574..7388627a05c2 100644 --- a/images/win/toolsets/toolset-2016.json +++ b/images/win/toolsets/toolset-2016.json @@ -243,6 +243,40 @@ "llvm", "toolchain" ] + }, + { + "arch": "mingw-w64-ucrt-x86_64", + "exec_dir": "ucrt64", + "runtime_packages": [ + { + "name": "clang", + "executables": [ + "clang", + "g++", + "gcc" + ] + }, + { + "name": "cmake", + "executables": [ + "cmake", + "cpack", + "ctest" + ] + }, + { + "name": "ragel", + "executables": [ + "ragel" + ] + } + ], + "additional_packages": [ + "clang-tools-extra", + "libxml2", + "llvm", + "toolchain" + ] } ] }, From 53af3df1644d5eb131e420862bd04eb0774df344 Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Thu, 24 Jun 2021 12:44:45 +0300 Subject: [PATCH 3/9] several improvments --- images/win/scripts/Installers/Install-Msys2.ps1 | 3 ++- images/win/scripts/Tests/MSYS2.Tests.ps1 | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 894653acc1a6..37ff348f043a 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -79,8 +79,9 @@ foreach ($arch in $archs) Write-Host "`n$dash Clean packages" pacman.exe -Scc --noconfirm +$pkgs = $(pacman.exe -Q) Write-Host "`n$dash Installed msys2 packages" -pacman.exe -Q | grep -v ^mingw-w64- +$pkgs | grep -v ^mingw-w64- foreach ($arch in $archs) { diff --git a/images/win/scripts/Tests/MSYS2.Tests.ps1 b/images/win/scripts/Tests/MSYS2.Tests.ps1 index 0a7fc53d4aaf..d71368a92638 100644 --- a/images/win/scripts/Tests/MSYS2.Tests.ps1 +++ b/images/win/scripts/Tests/MSYS2.Tests.ps1 @@ -34,15 +34,15 @@ Describe "MSYS2 packages" { } } -foreach ($arch in $archs) { - Describe "$arch arch packages" { - $archPackages = $toolsetContent.mingw | Where-Object { $_.arch -eq $arch } - $tools = $archPackages.runtime_packages.name - $execDir = "C:\msys64\" + $archPackages.exec_dir + "\bin" +$mingwTypes = (Get-ToolsetContent).MsysPackages.mingw +foreach ($type in $mingwTypes) { + Describe "$($type.arch) packages" { + $tools = $type.runtime_packages + $execDir = "C:\msys64\" + $type.exec_dir + "\bin" foreach ($tool in $tools) { - Context "$tool package"{ - $executables = ($archPackages.runtime_packages | Where-Object { $_.name -eq $tool }).executables | ForEach-Object { + Context "$($tool.name) package"{ + $executables = $tool.executables | ForEach-Object { @{ ExecName = $_ ExecDir = $execDir From dd7dcdea39d87f3b8030a00b0aa2dd4cba1495f8 Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Thu, 24 Jun 2021 13:32:54 +0300 Subject: [PATCH 4/9] missing change --- images/win/scripts/Installers/Install-Msys2.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 37ff348f043a..51a8bfe2c500 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -86,7 +86,7 @@ $pkgs | grep -v ^mingw-w64- foreach ($arch in $archs) { Write-Host "`n$dash Installed $arch packages" - pacman.exe -Q | grep ^${arch}- + $pkgs | grep ^${arch}- } $env:PATH = $origPath From db62a345d943da047f521a02f02ff8ad6c128e64 Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Thu, 24 Jun 2021 13:42:29 +0300 Subject: [PATCH 5/9] remove unused variables, changed var name --- images/win/scripts/Tests/MSYS2.Tests.ps1 | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/images/win/scripts/Tests/MSYS2.Tests.ps1 b/images/win/scripts/Tests/MSYS2.Tests.ps1 index d71368a92638..b03fa1e6a515 100644 --- a/images/win/scripts/Tests/MSYS2.Tests.ps1 +++ b/images/win/scripts/Tests/MSYS2.Tests.ps1 @@ -1,6 +1,3 @@ -$toolsetContent = (Get-ToolsetContent).MsysPackages -$archs = $toolsetContent.mingw.arch - BeforeAll { $msys2Dir = "C:\msys64\usr\bin" $originalPath = $env:PATH @@ -35,10 +32,10 @@ Describe "MSYS2 packages" { } $mingwTypes = (Get-ToolsetContent).MsysPackages.mingw -foreach ($type in $mingwTypes) { - Describe "$($type.arch) packages" { - $tools = $type.runtime_packages - $execDir = "C:\msys64\" + $type.exec_dir + "\bin" +foreach ($mingwType in $mingwTypes) { + Describe "$($mingwType.arch) packages" { + $tools = $mingwType.runtime_packages + $execDir = "C:\msys64\" + $mingwType.exec_dir + "\bin" foreach ($tool in $tools) { Context "$($tool.name) package"{ From 988ddffc792cde6e69d187b807a86820bf14451c Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Thu, 24 Jun 2021 18:16:57 +0300 Subject: [PATCH 6/9] fixed 2016 json --- images/win/toolsets/toolset-2016.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/images/win/toolsets/toolset-2016.json b/images/win/toolsets/toolset-2016.json index 7388627a05c2..ee0a84bf9251 100644 --- a/images/win/toolsets/toolset-2016.json +++ b/images/win/toolsets/toolset-2016.json @@ -181,6 +181,7 @@ "mingw": [ { "arch": "mingw-w64-x86_64", + "exec_dir": "mingw64", "runtime_packages": [ { "name": "clang", @@ -214,6 +215,7 @@ }, { "arch": "mingw-w64-i686", + "exec_dir": "mingw32", "runtime_packages": [ { "name": "clang", From b4f12a199dccd76838b7bb428f41268db6c995ad Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Fri, 25 Jun 2021 11:17:35 +0300 Subject: [PATCH 7/9] several improvements --- images/win/scripts/Installers/Install-Msys2.ps1 | 4 +--- images/win/scripts/Tests/MSYS2.Tests.ps1 | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 51a8bfe2c500..1a7f2a9a3418 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -79,9 +79,7 @@ foreach ($arch in $archs) Write-Host "`n$dash Clean packages" pacman.exe -Scc --noconfirm -$pkgs = $(pacman.exe -Q) -Write-Host "`n$dash Installed msys2 packages" -$pkgs | grep -v ^mingw-w64- +$pkgs = pacman.exe -Q foreach ($arch in $archs) { diff --git a/images/win/scripts/Tests/MSYS2.Tests.ps1 b/images/win/scripts/Tests/MSYS2.Tests.ps1 index b03fa1e6a515..9316730b17c9 100644 --- a/images/win/scripts/Tests/MSYS2.Tests.ps1 +++ b/images/win/scripts/Tests/MSYS2.Tests.ps1 @@ -35,7 +35,7 @@ $mingwTypes = (Get-ToolsetContent).MsysPackages.mingw foreach ($mingwType in $mingwTypes) { Describe "$($mingwType.arch) packages" { $tools = $mingwType.runtime_packages - $execDir = "C:\msys64\" + $mingwType.exec_dir + "\bin" + $execDir = Join-Path "C:\msys64" $mingwType.exec_dir | Join-Path -ChildPath "bin" foreach ($tool in $tools) { Context "$($tool.name) package"{ @@ -47,7 +47,7 @@ foreach ($mingwType in $mingwTypes) { } BeforeEach { - $env:PATH = "$ExecDir;$env:PATH" + $env:PATH = "$execDir;$env:PATH" } It " is installed in " -TestCases $executables { From 444d4f69349436872878a5381776dd2ac1fda6ff Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Fri, 25 Jun 2021 11:28:31 +0300 Subject: [PATCH 8/9] removed additional ucrt packages --- images/win/toolsets/toolset-2019.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index 6c4bd61b2ed9..cb2c62441263 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -272,12 +272,6 @@ "ragel" ] } - ], - "additional_packages": [ - "clang-tools-extra", - "libxml2", - "llvm", - "toolchain" ] } ] From d6adda01d0b0608b81e15867db1f9edac949db3f Mon Sep 17 00:00:00 2001 From: Leonid Lapshin Date: Mon, 28 Jun 2021 09:34:25 +0300 Subject: [PATCH 9/9] removed ucrt --- images/win/toolsets/toolset-2016.json | 34 --------------------------- images/win/toolsets/toolset-2019.json | 28 ---------------------- 2 files changed, 62 deletions(-) diff --git a/images/win/toolsets/toolset-2016.json b/images/win/toolsets/toolset-2016.json index ee0a84bf9251..4c36f261de4c 100644 --- a/images/win/toolsets/toolset-2016.json +++ b/images/win/toolsets/toolset-2016.json @@ -245,40 +245,6 @@ "llvm", "toolchain" ] - }, - { - "arch": "mingw-w64-ucrt-x86_64", - "exec_dir": "ucrt64", - "runtime_packages": [ - { - "name": "clang", - "executables": [ - "clang", - "g++", - "gcc" - ] - }, - { - "name": "cmake", - "executables": [ - "cmake", - "cpack", - "ctest" - ] - }, - { - "name": "ragel", - "executables": [ - "ragel" - ] - } - ], - "additional_packages": [ - "clang-tools-extra", - "libxml2", - "llvm", - "toolchain" - ] } ] }, diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index cb2c62441263..5a43d7259dbe 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -245,34 +245,6 @@ "llvm", "toolchain" ] - }, - { - "arch": "mingw-w64-ucrt-x86_64", - "exec_dir": "ucrt64", - "runtime_packages": [ - { - "name": "clang", - "executables": [ - "clang", - "g++", - "gcc" - ] - }, - { - "name": "cmake", - "executables": [ - "cmake", - "cpack", - "ctest" - ] - }, - { - "name": "ragel", - "executables": [ - "ragel" - ] - } - ] } ] },