Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[all OSs] Revert VCPKG_ROOT variable #6449

Merged
merged 1 commit into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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] @{
Expand Down
17 changes: 8 additions & 9 deletions images/linux/scripts/installers/vcpkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
17 changes: 8 additions & 9 deletions images/macos/provision/core/vcpkg.sh
Original file line number Diff line number Diff line change
@@ -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"
4 changes: 0 additions & 4 deletions images/macos/software-report/SoftwareReport.Common.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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] @{
Expand Down
1 change: 0 additions & 1 deletion images/win/scripts/Installers/Install-Vcpkg.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 0 additions & 4 deletions images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
8 changes: 2 additions & 6 deletions images/win/scripts/Tests/Tools.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down