diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 773442105131..b1ffe1f750d8 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -429,10 +429,6 @@ function Build-PackageManagementEnvironmentTable { @{ "Name" = "VCPKG_INSTALLATION_ROOT" "Value" = $env:VCPKG_INSTALLATION_ROOT - }, - @{ - "Name" = "VCPKG_ROOT" - "Value" = $env:VCPKG_ROOT } ) | ForEach-Object { [PSCustomObject] @{ diff --git a/images/linux/scripts/installers/vcpkg.sh b/images/linux/scripts/installers/vcpkg.sh index 39823e42f850..731de8b1b432 100644 --- a/images/linux/scripts/installers/vcpkg.sh +++ b/images/linux/scripts/installers/vcpkg.sh @@ -4,17 +4,16 @@ ## Desc: Installs vcpkg ################################################################################ -# Set env variables for vcpkg -VCPKG_ROOT=/usr/local/share/vcpkg -echo "VCPKG_INSTALLATION_ROOT=${VCPKG_ROOT}" | tee -a /etc/environment -echo "VCPKG_ROOT=${VCPKG_ROOT}" | tee -a /etc/environment +# Set env variable for vcpkg +VCPKG_INSTALLATION_ROOT=/usr/local/share/vcpkg +echo "VCPKG_INSTALLATION_ROOT=${VCPKG_INSTALLATION_ROOT}" | tee -a /etc/environment # Install vcpkg -git clone https://github.com/Microsoft/vcpkg $VCPKG_ROOT +git clone https://github.com/Microsoft/vcpkg $VCPKG_INSTALLATION_ROOT -$VCPKG_ROOT/bootstrap-vcpkg.sh -$VCPKG_ROOT/vcpkg integrate install -chmod 0777 -R $VCPKG_ROOT -ln -sf $VCPKG_ROOT/vcpkg /usr/local/bin +$VCPKG_INSTALLATION_ROOT/bootstrap-vcpkg.sh +$VCPKG_INSTALLATION_ROOT/vcpkg integrate install +chmod 0777 -R $VCPKG_INSTALLATION_ROOT +ln -sf $VCPKG_INSTALLATION_ROOT/vcpkg /usr/local/bin invoke_tests "Tools" "Vcpkg" \ No newline at end of file diff --git a/images/macos/provision/core/vcpkg.sh b/images/macos/provision/core/vcpkg.sh index 70e3371fa721..a1ac7c254969 100644 --- a/images/macos/provision/core/vcpkg.sh +++ b/images/macos/provision/core/vcpkg.sh @@ -1,16 +1,15 @@ #!/bin/bash -e -o pipefail source ~/utils/utils.sh -# Set env variables for vcpkg -VCPKG_ROOT=/usr/local/share/vcpkg -echo "export VCPKG_INSTALLATION_ROOT=${VCPKG_ROOT}" | tee -a ~/.bashrc -echo "export VCPKG_ROOT=${VCPKG_ROOT}" | tee -a ~/.bashrc +# Set env variable for vcpkg +VCPKG_INSTALLATION_ROOT=/usr/local/share/vcpkg +echo "export VCPKG_INSTALLATION_ROOT=${VCPKG_INSTALLATION_ROOT}" | tee -a ~/.bashrc # Install vcpkg -git clone https://github.com/Microsoft/vcpkg $VCPKG_ROOT -$VCPKG_ROOT/bootstrap-vcpkg.sh -$VCPKG_ROOT/vcpkg integrate install -chmod -R 0777 $VCPKG_ROOT -ln -sf $VCPKG_ROOT/vcpkg /usr/local/bin +git clone https://github.com/Microsoft/vcpkg $VCPKG_INSTALLATION_ROOT +$VCPKG_INSTALLATION_ROOT/bootstrap-vcpkg.sh +$VCPKG_INSTALLATION_ROOT/vcpkg integrate install +chmod -R 0777 $VCPKG_INSTALLATION_ROOT +ln -sf $VCPKG_INSTALLATION_ROOT/vcpkg /usr/local/bin invoke_tests "Common" "vcpkg" diff --git a/images/macos/software-report/SoftwareReport.Common.psm1 b/images/macos/software-report/SoftwareReport.Common.psm1 index 01955e019ec0..b18206f6dd9b 100644 --- a/images/macos/software-report/SoftwareReport.Common.psm1 +++ b/images/macos/software-report/SoftwareReport.Common.psm1 @@ -562,10 +562,6 @@ function Build-PackageManagementEnvironmentTable { @{ "Name" = "VCPKG_INSTALLATION_ROOT" "Value" = $env:VCPKG_INSTALLATION_ROOT - }, - @{ - "Name" = "VCPKG_ROOT" - "Value" = $env:VCPKG_ROOT } ) | ForEach-Object { [PSCustomObject] @{ diff --git a/images/win/scripts/Installers/Install-Vcpkg.ps1 b/images/win/scripts/Installers/Install-Vcpkg.ps1 index a2e440dd105f..76e7d24f577c 100644 --- a/images/win/scripts/Installers/Install-Vcpkg.ps1 +++ b/images/win/scripts/Installers/Install-Vcpkg.ps1 @@ -17,6 +17,5 @@ Invoke-Expression "$InstallDir\$VcpkgExecPath integrate install" Add-MachinePathItem $InstallDir $env:Path = Get-MachinePath setx VCPKG_INSTALLATION_ROOT $InstallDir /M -setx VCPKG_ROOT $InstallDir /M Invoke-PesterTests -TestFile "Tools" -TestName "Vcpkg" diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 25aa98471d5e..1c36a9844e19 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -347,10 +347,6 @@ function Build-PackageManagementEnvironmentTable { @{ "Name" = "VCPKG_INSTALLATION_ROOT" "Value" = $env:VCPKG_INSTALLATION_ROOT - }, - @{ - "Name" = "VCPKG_ROOT" - "Value" = $env:VCPKG_ROOT } ) if (Test-IsWin19) { diff --git a/images/win/scripts/Tests/Tools.Tests.ps1 b/images/win/scripts/Tests/Tools.Tests.ps1 index a05f79249b68..0f4a368460cd 100644 --- a/images/win/scripts/Tests/Tools.Tests.ps1 +++ b/images/win/scripts/Tests/Tools.Tests.ps1 @@ -153,13 +153,9 @@ Describe "Vcpkg" { It "env variable VCPKG_INSTALLATION_ROOT is set" { $env:VCPKG_INSTALLATION_ROOT | Should -Not -BeNullOrEmpty } - - It "env variable VCPKG_ROOT is set" { - $env:VCPKG_ROOT | Should -Not -BeNullOrEmpty - } - It "VCPKG_ROOT directory" { - $env:VCPKG_ROOT | Should -Exist + It "VCPKG_INSTALLATION_ROOT directory" { + $env:VCPKG_INSTALLATION_ROOT | Should -Exist } }