diff options
Diffstat (limited to 'INSTALL.md')
-rw-r--r-- | INSTALL.md | 74 |
1 files changed, 35 insertions, 39 deletions
diff --git a/INSTALL.md b/INSTALL.md index 686145566f..24f088ea49 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -61,49 +61,45 @@ gRPC C Core library. There are several ways to build under Windows, of varying complexity depending on experience with the tools involved. -<!-- -###Visual Studio +###Pre-generated Visual Studio solution -Versions 2013 and 2015 are both supported. You can use [their respective -community -editions](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx). - -Building the C Core: -- Open [grpc.sln](https://github.com/grpc/grpc/blob/master/vsprojects/grpc.sln). -- Select your build target. -- Build the `grpc` project. +The pre-generated VS projects & solution are checked into the repository under the [vsprojects](/vsprojects) directory. + +###Building using CMake (with BoringSSL) +- Install [CMake](https://cmake.org/download/). +- Install [Active State Perl](http://www.activestate.com/activeperl/) (`choco install activeperl`) +- Install [Ninja](https://ninja-build.org/) (`choco install ninja`) +- Install [Go](https://golang.org/dl/) (`choco install golang`) +- Install [yasm](http://yasm.tortall.net/) and add it to `PATH` (`choco install yasm`) +- Run these commands in the repo root directory +``` +> md .build +> cd .build +> call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x64 +> cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release +> cmake --build . +``` +NOTE: Currently you can only use Ninja to build using cmake on Windows (because of the boringssl dependency). -Building the C++ runtime: -- You need [CMake](https://cmake.org/) on your path to build protobuf (see below - for building using solely CMake). -- Run `vsprojects/build_protos.bat` (needs `cmake.exe` in your path). -- Open [buildtests_cxx.sln]() -- Select your build target. -- build the `grpc++` project. ---> +###msys2 (with mingw) -###msys2 +The Makefile (and source code) should support msys2's mingw32 and mingw64 +compilers. Building with msys2's native compiler is also possible, but +difficult. This approach requires having [msys2](https://msys2.github.io/) installed. + +``` +# Install prerequisites +MSYS2$ pacman -S autoconf automake gcc libtool mingw-w64-x86_64-toolchain perl pkg-config zlib +MSYS2$ pacman -S mingw-w64-x86_64-gflags +``` -- The Makefile (and source code) should support msys2's mingw32 and mingw64 - compilers. Building with msys2's native compiler is also possible, but - difficult. -- The Makefile is expecting the Windows versions of OpenSSL (see - https://slproweb.com/products/Win32OpenSSL.html). It's also possible to build - the Windows version of OpenSSL from scratch. The output should be `libeay32` - and `ssleay32`. -- If you are not installing the above files under msys2's path, you may specify - it, for instance, in the following way: - ```CPPFLAGS=”-I/c/OpenSSL-Win32/include” LDFLAGS=”-L/c/OpenSSL-Win32/lib” make static_c``` -- [protobuf3](https://github.com/google/protobuf/blob/master/src/README.md#c-installation---windows) - must be installed on the msys2 path. - -###Cmake (experimental) +``` +# From mingw shell +MINGW64$ export CPPFLAGS="-D_WIN32_WINNT=0x0600" +MINGW64$ make +``` -- Install [CMake](https://cmake.org/download/). -- Run it over [grpc's - CMakeLists.txt](https://github.com/grpc/grpc/blob/master/CMakeLists.txt) to - generate "projects" for your compiler. -- Build with your compiler of choice. The generated build files should have the - protobuf3 dependency baked in. +NOTE: While most of the make targets are buildable under Mingw, some haven't been ported to Windows yet +and may fail to build (mostly trying to include POSIX headers not available on Mingw). |