From 99cc3869d2042cb47a40b2c5106d524b7bb1211e Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Mon, 1 Aug 2022 23:37:07 +0200 Subject: [PATCH] devops: be compatible with multiple MSVS installations (#16121) --- browser_patches/firefox-beta/build.sh | 2 +- browser_patches/firefox/build.sh | 2 +- browser_patches/utils.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/browser_patches/firefox-beta/build.sh b/browser_patches/firefox-beta/build.sh index c00a1f5c84..8b7b175c1b 100755 --- a/browser_patches/firefox-beta/build.sh +++ b/browser_patches/firefox-beta/build.sh @@ -75,7 +75,7 @@ elif is_win; then echo "ac_add_options --target=x86_64-pc-mingw32" >> .mozconfig echo "ac_add_options --host=x86_64-pc-mingw32" >> .mozconfig DLL_FILE=$("C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find '**\Redist\MSVC\*\x64\**\vcruntime140.dll') - WIN32_REDIST_DIR=$(dirname "$DLL_FILE") + WIN32_REDIST_DIR=$(dirname "$DLL_FILE" | tail -n 1) if ! [[ -d $WIN32_REDIST_DIR ]]; then echo "ERROR: cannot find MS VS C++ redistributable $WIN32_REDIST_DIR" exit 1; diff --git a/browser_patches/firefox/build.sh b/browser_patches/firefox/build.sh index 6efa28a9d7..4f2e8c1b54 100755 --- a/browser_patches/firefox/build.sh +++ b/browser_patches/firefox/build.sh @@ -68,7 +68,7 @@ elif is_win; then echo "ac_add_options --target=x86_64-pc-mingw32" >> .mozconfig echo "ac_add_options --host=x86_64-pc-mingw32" >> .mozconfig DLL_FILE=$("C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find '**\Redist\MSVC\*\x64\**\vcruntime140.dll') - WIN32_REDIST_DIR=$(dirname "$DLL_FILE") + WIN32_REDIST_DIR=$(dirname "$DLL_FILE" | tail -n 1) if ! [[ -d $WIN32_REDIST_DIR ]]; then echo "ERROR: cannot find MS VS C++ redistributable $WIN32_REDIST_DIR" exit 1; diff --git a/browser_patches/utils.sh b/browser_patches/utils.sh index 28a731769f..03268c19d2 100644 --- a/browser_patches/utils.sh +++ b/browser_patches/utils.sh @@ -35,7 +35,7 @@ function selectXcodeVersionOrDie() { # see https://docs.microsoft.com/en-us/visualstudio/install/tools-for-managing-visual-studio-instances?view=vs-2019 function printMSVCRedistDir() { local dll_file=$("C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -find '**\Redist\MSVC\*\x64\**\vcruntime140.dll') - local redist_dir=$(dirname "$dll_file") + local redist_dir=$(dirname "$dll_file" | tail -n 1) if ! [[ -d $redist_dir ]]; then echo "ERROR: cannot find MS VS C++ redistributable $redist_dir" exit 1;