mirror of
https://github.com/msvc-win/get.msvc.win.git
synced 2025-12-16 13:17:26 +00:00
Add ARM64 support
This commit is contained in:
parent
2bf0a92ded
commit
9e128e7a5c
4 changed files with 38 additions and 2 deletions
6
32
6
32
|
|
@ -6,6 +6,12 @@ function Main {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$procArch = $Env:PROCESSOR_ARCHITECTURE
|
||||||
|
if ($procArch -eq 'ARM') {
|
||||||
|
Write-Warning "This script does not support Windows RT. Exiting..."
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
$flagPath = "$env:TEMP\elevation_success.flag"
|
$flagPath = "$env:TEMP\elevation_success.flag"
|
||||||
if (Test-Path $flagPath) { Remove-Item $flagPath -ErrorAction SilentlyContinue }
|
if (Test-Path $flagPath) { Remove-Item $flagPath -ErrorAction SilentlyContinue }
|
||||||
|
|
||||||
|
|
|
||||||
15
64
15
64
|
|
@ -7,10 +7,18 @@ function Main {
|
||||||
}
|
}
|
||||||
|
|
||||||
$procArch = $Env:PROCESSOR_ARCHITECTURE
|
$procArch = $Env:PROCESSOR_ARCHITECTURE
|
||||||
|
$buildVersion = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').CurrentBuild
|
||||||
if ($procArch -eq 'x86') {
|
if ($procArch -eq 'x86') {
|
||||||
Write-Warning "This script does not support 32-bit Windows. Exiting..."
|
Write-Warning "This script does not support 32-bit Windows. Exiting..."
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
elseif ($procArch -eq 'ARM64' -and $buildVersion -lt 22000) {
|
||||||
|
Write-Warning "X64 emulation is not supported in this version of ARM64 Windows. Only x86 and ARM64 Runtime will be installed."
|
||||||
|
}
|
||||||
|
elseif ($procArch -eq 'ARM') {
|
||||||
|
Write-Warning "This script does not support Windows RT. Exiting..."
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
$flagPath = "$env:TEMP\elevation_success.flag"
|
$flagPath = "$env:TEMP\elevation_success.flag"
|
||||||
if (Test-Path $flagPath) { Remove-Item $flagPath -ErrorAction SilentlyContinue }
|
if (Test-Path $flagPath) { Remove-Item $flagPath -ErrorAction SilentlyContinue }
|
||||||
|
|
@ -99,8 +107,15 @@ function Main {
|
||||||
@{ Name = "vcredist_2015-2022_x64.exe"; Url = "https://aka.ms/vs/17/release/vc_redist.x64.exe"; Year = "2012-2022" }
|
@{ Name = "vcredist_2015-2022_x64.exe"; Url = "https://aka.ms/vs/17/release/vc_redist.x64.exe"; Year = "2012-2022" }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if ($procArch -eq "ARM64") {
|
||||||
|
$downloads += @{ Name = "vcredist_2015-2022_arm64.exe"; Url = "https://aka.ms/vs/17/release/vc_redist.arm64.exe"; Year = "2012-2022" }
|
||||||
|
}
|
||||||
|
|
||||||
# --- Download everything up front ---
|
# --- Download everything up front ---
|
||||||
foreach ($item in $downloads) {
|
foreach ($item in $downloads) {
|
||||||
|
if ($item.Name -Match "x64" -and $procArch -eq 'ARM64' -and $buildVersion -lt 22000) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
$outFile = Join-Path $tempDir $item.Name
|
$outFile = Join-Path $tempDir $item.Name
|
||||||
Write-Host "Downloading $($item.Name)..."
|
Write-Host "Downloading $($item.Name)..."
|
||||||
$argumentList = @(
|
$argumentList = @(
|
||||||
|
|
|
||||||
6
dx
6
dx
|
|
@ -6,6 +6,12 @@ function Main {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$procArch = $Env:PROCESSOR_ARCHITECTURE
|
||||||
|
if ($procArch -eq 'ARM') {
|
||||||
|
Write-Warning "This script does not support Windows RT. Exiting..."
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
$flagPath = "$env:TEMP\elevation_success.flag"
|
$flagPath = "$env:TEMP\elevation_success.flag"
|
||||||
if (Test-Path $flagPath) { Remove-Item $flagPath -ErrorAction SilentlyContinue }
|
if (Test-Path $flagPath) { Remove-Item $flagPath -ErrorAction SilentlyContinue }
|
||||||
|
|
||||||
|
|
|
||||||
13
index.html
13
index.html
|
|
@ -10,6 +10,11 @@ function Main {
|
||||||
}
|
}
|
||||||
|
|
||||||
$procArch = $Env:PROCESSOR_ARCHITECTURE
|
$procArch = $Env:PROCESSOR_ARCHITECTURE
|
||||||
|
$buildVersion = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').CurrentBuild
|
||||||
|
if ($procArch -eq 'ARM') {
|
||||||
|
Write-Warning "This script does not support Windows RT. Exiting..."
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
$flagPath = "$env:TEMP\elevation_success.flag"
|
$flagPath = "$env:TEMP\elevation_success.flag"
|
||||||
if (Test-Path $flagPath) { Remove-Item $flagPath -ErrorAction SilentlyContinue }
|
if (Test-Path $flagPath) { Remove-Item $flagPath -ErrorAction SilentlyContinue }
|
||||||
|
|
@ -101,9 +106,13 @@ function Main {
|
||||||
@{ Name = "vcredist_2015-2022_x64.exe"; Url = "https://aka.ms/vs/17/release/vc_redist.x64.exe"; Year = "2012-2022" }
|
@{ Name = "vcredist_2015-2022_x64.exe"; Url = "https://aka.ms/vs/17/release/vc_redist.x64.exe"; Year = "2012-2022" }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if ($procArch -eq "ARM64") {
|
||||||
|
$downloads += @{ Name = "vcredist_2015-2022_arm64.exe"; Url = "https://aka.ms/vs/17/release/vc_redist.arm64.exe"; Year = "2012-2022" }
|
||||||
|
}
|
||||||
|
|
||||||
# --- Download everything up front ---
|
# --- Download everything up front ---
|
||||||
foreach ($item in $downloads) {
|
foreach ($item in $downloads) {
|
||||||
if ($item.Name -Match "x64" -and $procArch -ne "AMD64") {
|
if ($item.Name -Match "x64" -and $procArch -ne "AMD64" -and $buildVersion -lt 22000) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
$outFile = Join-Path $tempDir $item.Name
|
$outFile = Join-Path $tempDir $item.Name
|
||||||
|
|
@ -154,7 +163,7 @@ function Main {
|
||||||
|
|
||||||
# --- Install VC++ Redistributables ---
|
# --- Install VC++ Redistributables ---
|
||||||
foreach ($item in $downloads | Where-Object { $_.Name -like "vcredist*" }) {
|
foreach ($item in $downloads | Where-Object { $_.Name -like "vcredist*" }) {
|
||||||
if ($item.Name -Match "x64" -and $procArch -ne "AMD64") {
|
if ($item.Name -Match "x64" -and $procArch -ne "AMD64" -and $buildVersion -lt 22000) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
$exePath = Join-Path $tempDir $item.Name
|
$exePath = Join-Path $tempDir $item.Name
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue