From 1410e7c1f19d3acfb7e1d5414218fdf0974351b4 Mon Sep 17 00:00:00 2001 From: ilia-shipitsin <125650415+ilia-shipitsin@users.noreply.github.com> Date: Mon, 11 Sep 2023 13:39:00 +0200 Subject: [PATCH] [macos] introduce additional runtimes for XCode (#8254) --- images/macos/helpers/Xcode.Installer.psm1 | 2 +- images/macos/provision/core/xcode.ps1 | 6 ++++++ images/macos/toolsets/toolset-13.json | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/images/macos/helpers/Xcode.Installer.psm1 b/images/macos/helpers/Xcode.Installer.psm1 index 36aef42df..66f525219 100644 --- a/images/macos/helpers/Xcode.Installer.psm1 +++ b/images/macos/helpers/Xcode.Installer.psm1 @@ -176,7 +176,7 @@ function Install-AdditionalSimulatorRuntimes { Write-Host "Installing Simulator Runtimes for Xcode $Version ..." $xcodebuildPath = Get-XcodeToolPath -Version $Version -ToolName "xcodebuild" - Invoke-ValidateCommand "$xcodebuildPath -downloadAllPlatforms | xcpretty" + Invoke-ValidateCommand "$xcodebuildPath -downloadAllPlatforms" } function Build-XcodeSymlinks { diff --git a/images/macos/provision/core/xcode.ps1 b/images/macos/provision/core/xcode.ps1 index 3eb25d922..e7c56759f 100644 --- a/images/macos/provision/core/xcode.ps1 +++ b/images/macos/provision/core/xcode.ps1 @@ -38,6 +38,12 @@ $xcodeVersions | ForEach-Object { Install-AdditionalSimulatorRuntimes -Version $_.link } + ForEach($runtime in $_.runtimes) { + Write-Host "Installing Additional runtimes for Xcode '$runtime' ..." + $xcodebuildPath = Get-XcodeToolPath -Version $_.link -ToolName 'xcodebuild' + Invoke-ValidateCommand "sudo $xcodebuildPath -downloadPlatform $runtime" + } + } Invoke-XcodeRunFirstLaunch -Version $defaultXcode diff --git a/images/macos/toolsets/toolset-13.json b/images/macos/toolsets/toolset-13.json index 23f32f295..9f67c0b50 100644 --- a/images/macos/toolsets/toolset-13.json +++ b/images/macos/toolsets/toolset-13.json @@ -3,7 +3,7 @@ "default": "14.3.1", "x64": { "versions": [ - { "link": "15.0", "version": "15.0.0-Beta.8+15A5229m" }, + { "link": "15.0", "version": "15.0.0-Beta.8+15A5229m", "runtimes": [ "visionOS" ] }, { "link": "14.3.1", "version": "14.3.1+14E300c","symlinks": ["14.3"] }, { "link": "14.2", "version": "14.2.0+14C18" }, { "link": "14.1", "version": "14.1.0+14B47b" } @@ -11,7 +11,7 @@ }, "arm64":{ "versions": [ - { "link": "15.0", "version": "15.0.0-Beta.8+15A5229m" }, + { "link": "15.0", "version": "15.0.0-Beta.8+15A5229m", "runtimes": [ "visionOS" ] }, { "link": "14.3.1", "version": "14.3.1+14E300c","symlinks": ["14.3"] }, { "link": "14.2", "version": "14.2.0+14C18" }, { "link": "14.1", "version": "14.1.0+14B47b" }