1@rem Copyright 2016 gRPC authors. 2@rem 3@rem Licensed under the Apache License, Version 2.0 (the "License"); 4@rem you may not use this file except in compliance with the License. 5@rem You may obtain a copy of the License at 6@rem 7@rem http://www.apache.org/licenses/LICENSE-2.0 8@rem 9@rem Unless required by applicable law or agreed to in writing, software 10@rem distributed under the License is distributed on an "AS IS" BASIS, 11@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12@rem See the License for the specific language governing permissions and 13@rem limitations under the License. 14 15@rem enter this directory 16cd /d %~dp0\..\..\.. 17 18@rem TODO(jtattermusch): Kokoro has pre-installed protoc.exe in C:\Program Files\ProtoC and that directory 19@rem is on PATH. To avoid picking up the older version protoc.exe, we change the path to something non-existent. 20set PATH=%PATH:ProtoC=DontPickupProtoC% 21 22@rem Download OpenSSL-Win32 originally installed from https://slproweb.com/products/Win32OpenSSL.html 23powershell -Command "(New-Object Net.WebClient).DownloadFile('https://storage.googleapis.com/grpc-testing.appspot.com/OpenSSL-Win32-1_1_0g.zip', 'OpenSSL-Win32.zip')" 24powershell -Command "Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::ExtractToDirectory('OpenSSL-Win32.zip', '.');" 25 26@rem set absolute path to OpenSSL with forward slashes 27set OPENSSL_DIR=%cd:\=/%/OpenSSL-Win32 28 29@rem Build helloworld example using cmake 30@rem Use non-standard build directory to avoid too long filenames 31mkdir example_build 32cd example_build 33cmake -DOPENSSL_ROOT_DIR=%OPENSSL_DIR% ../examples/cpp/helloworld/cmake_externalproject || goto :error 34cmake --build . --config Release || goto :error 35cd .. 36 37goto :EOF 38 39:error 40echo Failed! 41exit /b %errorlevel% 42