From cf96585d260281e8c04e97e7c592983374483baf Mon Sep 17 00:00:00 2001 From: archita105 Date: Fri, 11 Apr 2025 16:40:06 +0530 Subject: [PATCH] [macOS] VCpkg update for macOS-14 and macOS-15 images (#11738) * Vcpkg Update * vcpkg update * VCPKG update * Updated permission issue * Updated path for arm * Installation path change * Installation path update * Installation Path change * VCpkg update in software report * permission changed * permission updated * permission * Added sudo in chmod * Added sudo for Symlink * Removed sudo for Symlink --- images/macos/scripts/build/install-vcpkg.sh | 6 +++--- images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 | 2 +- images/macos/scripts/tests/Common.Tests.ps1 | 2 +- images/macos/templates/macOS-14.anka.pkr.hcl | 1 + images/macos/templates/macOS-14.arm64.anka.pkr.hcl | 1 + images/macos/templates/macOS-15.anka.pkr.hcl | 1 + images/macos/templates/macOS-15.arm64.anka.pkr.hcl | 1 + 7 files changed, 9 insertions(+), 5 deletions(-) diff --git a/images/macos/scripts/build/install-vcpkg.sh b/images/macos/scripts/build/install-vcpkg.sh index 13acc0f16..f8d17b37e 100644 --- a/images/macos/scripts/build/install-vcpkg.sh +++ b/images/macos/scripts/build/install-vcpkg.sh @@ -16,10 +16,10 @@ mkdir -p /Users/runner/.vcpkg touch /Users/runner/.vcpkg/vcpkg.path.txt # Install vcpkg -git clone https://github.com/Microsoft/vcpkg $VCPKG_INSTALLATION_ROOT -$VCPKG_INSTALLATION_ROOT/bootstrap-vcpkg.sh +sudo git clone https://github.com/Microsoft/vcpkg $VCPKG_INSTALLATION_ROOT +sudo $VCPKG_INSTALLATION_ROOT/bootstrap-vcpkg.sh $VCPKG_INSTALLATION_ROOT/vcpkg integrate install -chmod -R 0777 $VCPKG_INSTALLATION_ROOT +sudo chmod -R 0777 $VCPKG_INSTALLATION_ROOT ln -sf $VCPKG_INSTALLATION_ROOT/vcpkg /usr/local/bin rm -rf /Users/runner/.vcpkg diff --git a/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 b/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 index edeae3fea..054b7a128 100644 --- a/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 +++ b/images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1 @@ -64,7 +64,7 @@ if ((-not $os.IsSequoia)) { $packageManagement.AddToolVersion("Pip3", $(Get-Pip3Version)) $packageManagement.AddToolVersion("Pipx", $(Get-PipxVersion)) $packageManagement.AddToolVersion("RubyGems", $(Get-RubyGemsVersion)) -if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonoma) -and (-not $os.IsSequoia)) { +if (-not $os.IsVenturaArm64) { $packageManagement.AddToolVersion("Vcpkg", $(Get-VcpkgVersion)) } $packageManagement.AddToolVersion("Yarn", $(Get-YarnVersion)) diff --git a/images/macos/scripts/tests/Common.Tests.ps1 b/images/macos/scripts/tests/Common.Tests.ps1 index 353815d04..0373cb166 100644 --- a/images/macos/scripts/tests/Common.Tests.ps1 +++ b/images/macos/scripts/tests/Common.Tests.ps1 @@ -33,7 +33,7 @@ Describe "GCC" { } } -Describe "vcpkg" -Skip:($os.IsVenturaArm64 -or $os.IsSonoma -or $os.IsSequoia) { +Describe "vcpkg" -Skip:($os.IsVenturaArm64) { It "vcpkg" { "vcpkg version" | Should -ReturnZeroExitCode } diff --git a/images/macos/templates/macOS-14.anka.pkr.hcl b/images/macos/templates/macOS-14.anka.pkr.hcl index a9c2f48a9..0558594b9 100644 --- a/images/macos/templates/macOS-14.anka.pkr.hcl +++ b/images/macos/templates/macOS-14.anka.pkr.hcl @@ -245,6 +245,7 @@ build { "${path.root}/../scripts/build/install-gcc.sh", "${path.root}/../scripts/build/install-cocoapods.sh", "${path.root}/../scripts/build/install-android-sdk.sh", + "${path.root}/../scripts/build/install-vcpkg.sh", "${path.root}/../scripts/build/install-safari.sh", "${path.root}/../scripts/build/install-chrome.sh", "${path.root}/../scripts/build/install-edge.sh", diff --git a/images/macos/templates/macOS-14.arm64.anka.pkr.hcl b/images/macos/templates/macOS-14.arm64.anka.pkr.hcl index 68d34f920..f0b2112a4 100644 --- a/images/macos/templates/macOS-14.arm64.anka.pkr.hcl +++ b/images/macos/templates/macOS-14.arm64.anka.pkr.hcl @@ -244,6 +244,7 @@ build { "${path.root}/../scripts/build/install-gcc.sh", "${path.root}/../scripts/build/install-cocoapods.sh", "${path.root}/../scripts/build/install-android-sdk.sh", + "${path.root}/../scripts/build/install-vcpkg.sh", "${path.root}/../scripts/build/install-safari.sh", "${path.root}/../scripts/build/install-chrome.sh", "${path.root}/../scripts/build/install-bicep.sh", diff --git a/images/macos/templates/macOS-15.anka.pkr.hcl b/images/macos/templates/macOS-15.anka.pkr.hcl index 4d78f10b9..de40a7c4d 100644 --- a/images/macos/templates/macOS-15.anka.pkr.hcl +++ b/images/macos/templates/macOS-15.anka.pkr.hcl @@ -244,6 +244,7 @@ build { "${path.root}/../scripts/build/install-gcc.sh", "${path.root}/../scripts/build/install-cocoapods.sh", "${path.root}/../scripts/build/install-android-sdk.sh", + "${path.root}/../scripts/build/install-vcpkg.sh", "${path.root}/../scripts/build/install-safari.sh", "${path.root}/../scripts/build/install-chrome.sh", "${path.root}/../scripts/build/install-edge.sh", diff --git a/images/macos/templates/macOS-15.arm64.anka.pkr.hcl b/images/macos/templates/macOS-15.arm64.anka.pkr.hcl index 8ec6e0b9a..0ded3362d 100644 --- a/images/macos/templates/macOS-15.arm64.anka.pkr.hcl +++ b/images/macos/templates/macOS-15.arm64.anka.pkr.hcl @@ -243,6 +243,7 @@ build { "${path.root}/../scripts/build/install-gcc.sh", "${path.root}/../scripts/build/install-cocoapods.sh", "${path.root}/../scripts/build/install-android-sdk.sh", + "${path.root}/../scripts/build/install-vcpkg.sh", "${path.root}/../scripts/build/install-safari.sh", "${path.root}/../scripts/build/install-chrome.sh", "${path.root}/../scripts/build/install-bicep.sh",