grpc/vsprojects
Jan Tattermusch 90224ba893 Merge pull request #11113 from jtattermusch/python_artifact_polling_trace
Try fixing python artifact build on Windows
2017-05-17 09:05:57 +02:00
..
coapp Update link to CoApp installer 2017-01-04 16:03:42 +01:00
grpc++_unsecure BoringSSL: vsproject changes 2015-12-22 12:51:27 -08:00
grpc_csharp_plugin BoringSSL: vsproject changes 2015-12-22 12:51:27 -08:00
grpc_objective_c_plugin BoringSSL: vsproject changes 2015-12-22 12:51:27 -08:00
grpc_python_plugin BoringSSL: vsproject changes 2015-12-22 12:51:27 -08:00
grpc_ruby_plugin BoringSSL: vsproject changes 2015-12-22 12:51:27 -08:00
vcxproj Merge pull request #11113 from jtattermusch/python_artifact_polling_trace 2017-05-17 09:05:57 +02:00
.gitignore make intermediate dir path shorter 2015-12-18 08:53:59 -08:00
README.md fix markdown 2017-04-18 12:31:49 +02:00
build_plugins.bat make protobuf building consistent 2016-12-09 11:09:34 +01:00
build_vs2013.bat add missing copyrights to .bat files 2016-05-13 10:50:29 -07:00
build_vs2015.bat add missing copyrights to .bat files 2016-05-13 10:50:29 -07:00
buildtests_c.sln Revert "Revert "Implement Server Backward Compatibility"" 2017-05-15 10:27:55 -07:00
cpptest.props Rollback gpr deletion 2016-02-09 12:01:53 -08:00
dummy.c Fix newline at end of file 2016-01-04 16:24:39 -08:00
global.props ignore warning LNK4217 2015-12-18 06:58:11 -08:00
grpc.sln Allow EPOLLEXCLUSIVE tests to be omitted outside of CI 2017-04-25 13:18:22 -07:00
grpc_csharp_ext.sln Fixed build.yaml and ran generate_projects.sh. 2016-11-29 15:17:31 -08:00
grpc_protoc_plugins.sln PHP Proto3: run generate_projects.sh 2016-09-29 17:26:29 -07:00
openssl.props regenerate project files 2015-12-01 18:23:07 -08:00
protobuf.props make protobuf building consistent 2016-12-09 11:09:34 +01:00
protoc.props fix protoc x86 windows artifact build 2017-05-12 07:54:41 +02:00
winsock.props Generated changes 2015-08-31 15:54:05 -07:00
zlib-dll.props regenerate project files 2015-12-01 18:23:07 -08:00
zlib.props regenerate project files 2015-12-01 18:23:07 -08:00

README.md

Pre-generated MS Visual Studio project & solution files

Versions 2013 and 2015 are both supported. You can use their respective community editions.

Building

We are using NuGet to pull zlib and openssl dependencies. If you don't have Visual Studio NuGet plugin installed, you'll need to download nuget.exe from the web and manually restore the NuGet packages.

> REM Run from this directory.
> REM No need to do this if you have NuGet visual studio extension.
> nuget restore grpc.sln

After that, you can build the solution using one of these options:

  1. open grpc.sln with Visual Studio and hit "Build".
  2. build from commandline using msbuild grpc.sln /p:Configuration=Debug

C/C++ Test Dependencies

  • gtest isn't available as a git repo like the other dependencies. download it and add it to /third_party/gtest/ (the folder will end up with /build-aux/, /cmake/, /codegear/, etc. folders in it).
    * if using vs2013: open/import the gtest solution in /msvc/, and save over the first solution (you will have to change it from read-only). change all projects to use /MDd (Property Pages - C/C++ - Code Generation - Runtime Library) and build. This is a "multithreaded debug" setting and it needs to match grpc. * build all
  • open protobuf solution in /third_party/protobuf/vsprojects * if using vs2013: on import the gtest stuff will probably fail, I think the paths are interpreted wrong. it's ok. * tests and test_plugin will fail when built. also ok * build all
  • gflags is automatically imported as a git submodule but it needs to have CMake run on it to be ready for a specific platform * download CMake windows installer; install * open visual studio developer command prompt (not sure if dev command prompt is necessary) * run cmake <path to gtest directory> * this will build a .sln and fill up the /third_party/gflags/include/gflags/ directory with headers * build all
  • install NuGet * nuget should automatically bring in built versions of zlib and openssl when building grpc.sln (the versions in /third_party/ are not used). If it doesn't work use tools->nuget...->manage.... The packages are put in /vsprojects/packages/

Building protoc plugins

For generating service stub code, gRPC relies on plugins for protoc (the protocol buffer compiler). The solution grpc_protoc_plugins.sln allows you to build Windows .exe binaries of gRPC protoc plugins.

  • Follow instructions in third_party\protobuf\cmake\README.md to create Visual Studio 2013 projects for protobuf.

    $ cd third_party/protobuf/cmake
    $ mkdir build & cd build
    $ mkdir solution & cd solution
    $ cmake -G "Visual Studio 12 2013" -Dprotobuf_BUILD_TESTS=OFF ../..
    
  • Open solution third_party\protobuf\cmake\build\solution\protobuf.sln and build it in Release mode. That will build libraries libprotobuf.lib and libprotoc.lib needed for the next step.

  • Open solution vsprojects\grpc_protoc_plugins.sln and build it in Release mode. As a result, you should obtain a set of gRPC protoc plugin binaries (grpc_cpp_plugin.exe, grpc_csharp_plugin.exe, ...)