aboutsummaryrefslogtreecommitdiff
path: root/buildscripts/make_dependencies.bat
blob: e4447cc304078250a65b59b2d2f2542da5d207bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
REM installer http://www.7-zip.org/a/7z1507-x64.exe
REM 7za is in http://www.7-zip.org/a/7z1507-extra.7z

REM Prerequisite:
REM   7za.exe in current directory or PATH

set PROTOBUF_VER=3.4.0
set CMAKE_NAME=cmake-3.3.2-win32-x86

if not exist "protobuf-%PROTOBUF_VER%\cmake\build\Release\" (
  call :installProto
)

echo Compile gRPC-Java with something like:
echo -PtargetArch=x86_32 -PvcProtobufLibs=%cd%\protobuf-%PROTOBUF_VER%\cmake\build\Release -PvcProtobufInclude=%cd%\protobuf-%PROTOBUF_VER%\cmake\build\include
goto :eof


:installProto

if not exist "%CMAKE_NAME%" (
  call :installCmake
)
set PATH=%PATH%;%cd%\%CMAKE_NAME%\bin
powershell -command "& { iwr https://github.com/google/protobuf/archive/v%PROTOBUF_VER%.zip -OutFile protobuf.zip }"
7za X protobuf.zip
del protobuf.zip
pushd protobuf-%PROTOBUF_VER%\cmake
mkdir build
cd build
cmake -Dprotobuf_BUILD_TESTS=OFF -G "Visual Studio %VisualStudioVersion:~0,2%" ..
msbuild /maxcpucount /p:Configuration=Release libprotoc.vcxproj
call extract_includes.bat
popd
goto :eof


:installCmake

powershell -command "& { iwr https://cmake.org/files/v3.3/%CMAKE_NAME%.zip -OutFile cmake.zip }"
7za X cmake.zip
del cmake.zip
goto :eof