| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 | REM Copyright The OpenTelemetry AuthorsREM SPDX-License-Identifier: Apache-2.0@echo offsetlocal enableextensionssetlocal enabledelayedexpansionset "PATH=%ProgramFiles%\CMake\bin;%~dp0;%ProgramData%\chocolatey\bin;%PATH%"if defined VCPKG_ROOT (  set "PATH=%VCPKG_ROOT%;%PATH%") else (  set "PATH=%~dp0vcpkg;%PATH%"  set "VCPKG_ROOT=%~dp0vcpkg")pushd %~dp0net session >nul 2>&1if %errorLevel% == 0 (  echo Running with Administrative privilege...  REM Fail if chocolatey is not installed  where /Q choco  if %ERRORLEVEL% == 1 (    echo This script requires chocolatey. Installation instructions: https://chocolatey.org/docs/installation    exit -1  )  REM Install tools needed for building, but only if not installed yet  where /Q vswhere || choco install -y vswhere  where /Q cmake || choco install -y cmake  where /Q git || choco install -y git) else (  echo Running without Administrative privilege...)if not defined BUILDTOOLS_VERSION (  REM Print current Visual Studio installations detected  where /Q vswhere  if %ERRORLEVEL% == 0 (    echo Visual Studio installations detected:    vswhere -property installationPath  ))REM This script allows to pass architecture in ARCH env varif not defined ARCH (  set ARCH=x64)REM Try to autodetect Visual Studiocall "%~dp0vcvars.cmd"if "%TOOLS_VS_NOTFOUND%" == "1" (  echo WARNING: cannot autodetect Visual Studio installation!)where /Q vcpkg.exeif %ERRORLEVEL% == 1 (  REM Build our own vcpkg from source  REM Prefer building in VCPKG_ROOT  pushd "!VCPKG_ROOT!"  call bootstrap-vcpkg.bat  popd) else (  echo Using existing vcpkg installation...)REM Install dependenciesvcpkg "--vcpkg-root=%VCPKG_ROOT%" install gtest:%ARCH%-windowsvcpkg "--vcpkg-root=%VCPKG_ROOT%" install --overlay-ports=%~dp0ports benchmark:%ARCH%-windowsvcpkg "--vcpkg-root=%VCPKG_ROOT%" install --overlay-ports=%~dp0ports protobuf:%ARCH%-windowsvcpkg "--vcpkg-root=%VCPKG_ROOT%" install ms-gsl:%ARCH%-windowsvcpkg "--vcpkg-root=%VCPKG_ROOT%" install nlohmann-json:%ARCH%-windowsvcpkg "--vcpkg-root=%VCPKG_ROOT%" install abseil:%ARCH%-windowsvcpkg "--vcpkg-root=%VCPKG_ROOT%" install gRPC:%ARCH%-windowsvcpkg "--vcpkg-root=%VCPKG_ROOT%" install prometheus-cpp:%ARCH%-windowsvcpkg "--vcpkg-root=%VCPKG_ROOT%" install curl:%ARCH%-windowsvcpkg "--vcpkg-root=%VCPKG_ROOT%" install thrift:%ARCH%-windowspopdexit /b 0
 |