install.ps1: name a discrete graphics card before the built-in one in the line it prints
This commit is contained in:
1 parent
2ca90e48ec
commit
19d5cd87fa
1 file changed
+2
-1
@@ -33,7 +33,8 @@ $arch = $env:PROCESSOR_ARCHITEW6432; if (-not $arch) { $arch = $env:PROCESSOR_AR
|
||||
if ($arch -ne 'AMD64') { Die "this computer ($arch) has no Strata Terminal yet. Supported: Windows on x64." }
|
||||
$platform = 'windows-x86_64'
|
||||
$gpu = ''
|
||||
try { $gpu = (Get-CimInstance Win32_VideoController | Where-Object { $_.Name -notmatch 'Basic|Remote' } | Select-Object -First 1 -ExpandProperty Name) } catch { }
|
||||
# a discrete card is named before a built-in one (a Ryzen's "AMD Radeon(TM) Graphics" is listed first on many PCs); this line is only for the person to read
|
||||
try { $cards = @(Get-CimInstance Win32_VideoController | Where-Object { $_.Name -notmatch 'Basic|Remote' }); $gpu = ($cards | Sort-Object @{ Expression = { if ($_.Name -match 'NVIDIA|GeForce|RTX|GTX|Quadro|Radeon (RX|PRO|AI)|Arc|Instinct') { 0 } else { 1 } } } | Select-Object -First 1 -ExpandProperty Name) } catch { }
|
||||
Write-Host 'Strata Terminal installer'
|
||||
Write-Host " This computer: Windows $arch ($platform)$(if ($gpu) { ", graphics: $gpu" })"
|
||||
Write-Host " Release folder: $feed"
|
||||
|
||||
Reference in new issue
Block a user