|
|
10 лет назад | |
|---|---|---|
| .. | ||
| gpr | 10 лет назад | |
| gpr_test_util | 10 лет назад | |
| grpc | 10 лет назад | |
| grpc++ | 10 лет назад | |
| grpc++_unsecure | 10 лет назад | |
| grpc_cpp_plugin | 10 лет назад | |
| grpc_csharp_ext | 10 лет назад | |
| grpc_csharp_plugin | 10 лет назад | |
| grpc_objective_c_plugin | 10 лет назад | |
| grpc_plugin_support | 10 лет назад | |
| grpc_python_plugin | 10 лет назад | |
| grpc_ruby_plugin | 10 лет назад | |
| grpc_test_util | 10 лет назад | |
| grpc_test_util_unsecure | 10 лет назад | |
| grpc_unsecure | 10 лет назад | |
| nuget_package | 10 лет назад | |
| .gitignore | 10 лет назад | |
| Grpc.mak | 10 лет назад | |
| README.md | 10 лет назад | |
| cpptest.props | 10 лет назад | |
| dummy.c | 10 лет назад | |
| global.props | 10 лет назад | |
| grpc.sln | 10 лет назад | |
| grpc_protoc_plugins.sln | 10 лет назад | |
| make.bat | 10 лет назад | |
| openssl.props | 10 лет назад | |
| protobuf.props | 10 лет назад | |
| protoc.props | 10 лет назад | |
| winsock.props | 10 лет назад | |
| zlib.props | 10 лет назад | |
This directory contains MS Visual Studio project & solution files.
#Supported Visual Studio versions
Currently supported versions are Visual Studio 2013 (our primary focus) and 2010.
#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:
grpc.sln with Visual Studio and hit "Build".msbuild grpc.sln /p:Configuration=Debug#C/C++ Test Dependencies
/third_party/gtest/ (the folder will end up with /build-aux/, /cmake/, /codegear/, etc. folders in it)./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./third_party/protobuf/vsprojects
cmake <path to gtest directory>.sln and fill up the /third_party/gflags/include/gflags/ directory with headers/third_party/ are not used). If it doesn't work use tools->nuget...->manage.... The packages are put in /vsprojects/packages/#C/C++ Test Build Steps
"debug": true, to the top of build.json. This is the base file for all build tracking, see templates for more information
"debug": true, gets picked up by /tools/buildgen/plugins/generate_vsprojects.py. It tells the script to add visual studio GUIDs to all projects. Otherwise only the projects that already have GUIDs in build.json will be built/templates/vsprojects/generate_debug_projects.sh to make debug templates/projects. This runs a regular visual studio buildgen process, which creates the .sln file with all of the new debug projects, then uses git diff to find the new project names from the .sln that need templates added. It builds the new templates based on the diff, then re-runs the visual studio buildgen, which builds the vs projects for each of the new debug targets
/vsprojects/ folder to your windows build setup (assuming this was built on linux in order to have easy access to python/mako and shell scripts)/templates/vsprojects/build_test_protos.sh
.proto files in /test/ in-place. there might be a better place to put them that mirrors what happens in the linux build process (todo).proto file gets built into a .grpc.pb.cc, .grpc.pb.h, .pb.cc, and .pb.h. These are included in each test project in lieu of the .proto includes specified in build.json. This substitution is done by /templates/vsprojects/vcxproj_defs.include/test/ folder in order to get the new files (assuming this was built on linux in order to have an easy protobuf+grpc plugin installation)#Testing
This is incomplete (only runs some tests for now), todo. The above .sln-based buildgen makes more tets but isn't tied in to automatic test running yet.
Use run_tests.py, that also supports Windows (with a bit limited experience).
> REM Run from repository root.
> python tools\run_tests\run_tests.py -l c
Also, you can make.bat directly to build and run gRPC tests.
> REM Run from this directory.
> make.bat alarm_test
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.
third_party\protobuf\vsprojects\protobuf.slnvsprojects\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, ...)