[macos] prepare repository for ARM64 arch (#7396)

This commit is contained in:
Alexey-Ayupov
2023-05-12 13:30:13 +02:00
committed by GitHub
parent b6c7afbb26
commit 8b099099d9
35 changed files with 571 additions and 188 deletions

View File

@@ -28,12 +28,14 @@ function Get-EnvironmentVariable($variable) {
function Get-OSVersion {
$osVersion = [Environment]::OSVersion
$osVersionMajorMinor = $osVersion.Version.ToString(2)
$processorArchitecture = arch
return [PSCustomObject]@{
Version = $osVersion.Version
Platform = $osVersion.Platform
IsBigSur = $osVersion.Version.Major -eq "11"
IsMonterey = $osVersion.Version.Major -eq "12"
IsVentura = $osVersion.Version.Major -eq "13"
IsVentura = $($osVersion.Version.Major -eq "13" -and $processorArchitecture -ne "arm64")
IsVenturaArm64 = $($osVersion.Version.Major -eq "13" -and $processorArchitecture -eq "arm64")
}
}
@@ -150,3 +152,7 @@ function Add-EnvironmentVariable {
$envVar = "export {0}={1}" -f $Name, $Value
Add-Content -Path $FilePath -Value $envVar
}
function isVeertu {
return (Test-Path -Path "/Library/Application Support/Veertu")
}