mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-02 22:45:23 +08:00
Provisioning: Add Get-CpuArchitecture helper function
For the addition of ARM64 to our checked packages, this helper function
will come in handy as it is more fine grained than Is64BitHost.
Change-Id: I8956c1ca6e445c0b783a39e4d42069199496f053
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
(cherry picked from commit 8fae627f8b)
This commit is contained in:
committed by
Tero Heikkinen
parent
d0a6a16338
commit
0ef7ffd4ac
@@ -196,6 +196,28 @@ function Is64BitWinHost
|
||||
return [environment]::Is64BitOperatingSystem
|
||||
}
|
||||
|
||||
enum CpuArch {
|
||||
x64
|
||||
x86
|
||||
arm64
|
||||
unknown
|
||||
}
|
||||
|
||||
function Get-CpuArchitecture
|
||||
{
|
||||
# Possible values are "AMD64", "IA64", "ARM64", and "x86"
|
||||
$arch = [System.Environment]::GetEnvironmentVariable('PROCESSOR_ARCHITECTURE', 'Machine')
|
||||
if ($arch -eq "AMD64") {
|
||||
return [CpuArch]::x64
|
||||
} elseif ($arch -eq "x86") {
|
||||
return [CpuArch]::x86
|
||||
} elseif ($arch -eq "ARM64") {
|
||||
return [CpuArch]::arm64
|
||||
}
|
||||
|
||||
return [CpuArch]::unknown
|
||||
}
|
||||
|
||||
function IsProxyEnabled {
|
||||
return (Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings').proxyEnable
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user