| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 | @rem Copyright 2016 gRPC authors.@rem@rem Licensed under the Apache License, Version 2.0 (the "License");@rem you may not use this file except in compliance with the License.@rem You may obtain a copy of the License at@rem@rem     http://www.apache.org/licenses/LICENSE-2.0@rem@rem Unless required by applicable law or agreed to in writing, software@rem distributed under the License is distributed on an "AS IS" BASIS,@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.@rem See the License for the specific language governing permissions and@rem limitations under the License.@rem enter this directorycd /d %~dp0\..\..\..@rem TODO(jtattermusch): Kokoro has pre-installed protoc.exe in C:\Program Files\ProtoC and that directory@rem is on PATH. To avoid picking up the older version protoc.exe, we change the path to something non-existent.set PATH=%PATH:ProtoC=DontPickupProtoC%@rem Install into ./testinstall, but use absolute path and foward slashesset INSTALL_DIR=%cd:\=/%/testinstall@rem Download OpenSSL-Win32 originally installed from https://slproweb.com/products/Win32OpenSSL.htmlpowershell -Command "(New-Object Net.WebClient).DownloadFile('https://storage.googleapis.com/grpc-testing.appspot.com/OpenSSL-Win32-1_1_0g.zip', 'OpenSSL-Win32.zip')"powershell -Command "Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::ExtractToDirectory('OpenSSL-Win32.zip', '.');"@rem set absolute path to OpenSSL with forward slashesset OPENSSL_DIR=%cd:\=/%/OpenSSL-Win32@rem Install abslmkdir third_party\abseil-cpp\cmake\buildpushd third_party\abseil-cpp\cmake\buildcmake -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% ..\..cmake --build . --config Release --target install || goto :errorpopd@rem Install c-aresmkdir third_party\cares\cares\cmake\buildpushd third_party\cares\cares\cmake\buildcmake -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% ..\..cmake --build . --config Release --target install || goto :errorpopd@rem Install protobufmkdir third_party\protobuf\cmake\buildpushd third_party\protobuf\cmake\buildcmake -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DZLIB_ROOT=%INSTALL_DIR% -Dprotobuf_MSVC_STATIC_RUNTIME=OFF -Dprotobuf_BUILD_TESTS=OFF ..cmake --build . --config Release --target install || goto :errorpopd@rem Install re2mkdir third_party\re2\cmake\buildpushd third_party\re2\cmake\buildcmake -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% ..\..cmake --build . --config Release --target install || goto :errorpopd@rem Install zlibmkdir third_party\zlib\cmake\buildpushd third_party\zlib\cmake\buildcmake -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% ..\..cmake --build . --config Release --target install || goto :errorpopd@rem Just before installing gRPC, wipe out contents of all the submodules to simulate@rem a standalone build from an archivegit submodule deinit --all --force@rem Install gRPCmkdir cmake\buildpushd cmake\buildcmake ^  -DCMAKE_BUILD_TYPE=Release ^  -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% ^  -DOPENSSL_ROOT_DIR=%OPENSSL_DIR% ^  -DZLIB_ROOT=%INSTALL_DIR% ^  -DgRPC_INSTALL=ON ^  -DgRPC_BUILD_TESTS=OFF ^  -DgRPC_ABSL_PROVIDER=package ^  -DgRPC_CARES_PROVIDER=package ^  -DgRPC_PROTOBUF_PROVIDER=package ^  -DgRPC_RE2_PROVIDER=package ^  -DgRPC_SSL_PROVIDER=package ^  -DgRPC_ZLIB_PROVIDER=package ^  ../.. || goto :errorcmake --build . --config Release --target install || goto :errorpopd@rem Build helloworld example using cmakemkdir examples\cpp\helloworld\cmake\buildpushd examples\cpp\helloworld\cmake\buildcmake -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DOPENSSL_ROOT_DIR=%OPENSSL_DIR% -DZLIB_ROOT=%INSTALL_DIR% ../.. || goto :errorcmake --build . --config Release || goto :errorpopdgoto :EOF:errorecho Failed!exit /b %errorlevel%
 |