[Windows] Fix mingw related lines in software report (#8389)

This commit is contained in:
Vasilii Polikarpov
2023-09-28 09:56:05 +02:00
committed by GitHub
parent 5e9e8cd16d
commit 62e9da75e7
2 changed files with 17 additions and 3 deletions

View File

@@ -107,8 +107,20 @@ function Get-KindVersion {
return $kindVersion
}
function Get-MinGWVersion {
(gcc --version | Select-String -Pattern "MinGW-W64") -match "(?<version>\d+\.\d+\.\d+)" | Out-Null
function Get-GCCVersion {
(gcc --version | Select-String -Pattern "gcc.exe") -match "(?<version>\d+\.\d+\.\d+)" | Out-Null
$mingwVersion = $Matches.Version
return $mingwVersion
}
function Get-GDBVersion {
(gdb --version | Select-String -Pattern "GNU gdb") -match "(?<version>\d+\.\d+)" | Out-Null
$mingwVersion = $Matches.Version
return $mingwVersion
}
function Get-GNUBinutilsVersion {
(ld --version | Select-String -Pattern "GNU Binutils") -match "(?<version>\d+\.\d+)" | Out-Null
$mingwVersion = $Matches.Version
return $mingwVersion
}