aboutsummaryrefslogtreecommitdiffhomepage
path: root/vsprojects
diff options
context:
space:
mode:
authorGravatar Michael Lumish <mlumish@google.com>2015-08-27 11:37:30 -0700
committerGravatar Michael Lumish <mlumish@google.com>2015-08-27 11:37:30 -0700
commit9a97a096ceff70c4dda7b0a5fb4c8f4ca0afafd1 (patch)
tree38413a67e898fa41b934d13d926abf193a678b0e /vsprojects
parent41d2b291eb86bec036b2a9a55e4369c55d5f1177 (diff)
parent939ccbe0ffb1ece37eca300fe218830000b847b5 (diff)
Merge pull request #2863 from jtattermusch/csharp_upgrade_to_proto3
Upgrade C# to proto3
Diffstat (limited to 'vsprojects')
-rw-r--r--vsprojects/README.md13
-rw-r--r--vsprojects/build_plugins.bat23
-rw-r--r--vsprojects/grpc_cpp_plugin/grpc_cpp_plugin.vcxproj1
-rw-r--r--vsprojects/grpc_csharp_plugin/grpc_csharp_plugin.vcxproj1
-rw-r--r--vsprojects/grpc_objective_c_plugin/grpc_objective_c_plugin.vcxproj1
-rw-r--r--vsprojects/grpc_python_plugin/grpc_python_plugin.vcxproj1
-rw-r--r--vsprojects/grpc_ruby_plugin/grpc_ruby_plugin.vcxproj1
-rw-r--r--vsprojects/protobuf.props2
-rw-r--r--vsprojects/protoc.props2
9 files changed, 39 insertions, 6 deletions
diff --git a/vsprojects/README.md b/vsprojects/README.md
index e6cbf83359..b95b468465 100644
--- a/vsprojects/README.md
+++ b/vsprojects/README.md
@@ -80,7 +80,12 @@ Individual tests can be run by directly running the executable in `/vsprojects/r
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.
-1. Open solution `third_party\protobuf\vsprojects\protobuf.sln`
-2. Accept the conversion to newer Visual Studio version and ignore errors about gtest.
-3. Build libprotoc in Release mode.
-4. 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`, ...)
+1. Follow instructions in `third_party\protobuf\cmake\README.md` to create Visual Studio 2013 projects for protobuf.
+```
+$ cd third_party/protobuf/cmake
+$ cmake -G "Visual Studio 12 2013"
+```
+
+2. Open solution `third_party\protobuf\cmake\protobuf.sln` and build it in Release mode. That will build libraries `libprotobuf.lib` and `libprotoc.lib` needed for the next step.
+
+3. 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`, ...)
diff --git a/vsprojects/build_plugins.bat b/vsprojects/build_plugins.bat
new file mode 100644
index 0000000000..4c33a584ad
--- /dev/null
+++ b/vsprojects/build_plugins.bat
@@ -0,0 +1,23 @@
+@rem Convenience script to build gRPC protoc plugins from command line. protoc plugins are used to generate service stub code from .proto service defintions.
+
+setlocal
+
+@rem enter this directory
+cd /d %~dp0
+
+@rem Set VS variables (uses Visual Studio 2013)
+@call "%VS120COMNTOOLS%\..\..\vc\vcvarsall.bat" x86
+
+@rem Build third_party/protobuf
+msbuild ..\third_party\protobuf\cmake\protobuf.sln /p:Configuration=Release || goto :error
+
+@rem Build the C# protoc plugins
+msbuild grpc_protoc_plugins.sln /p:Configuration=Release || goto :error
+
+endlocal
+
+goto :EOF
+
+:error
+echo Failed!
+exit /b %errorlevel%
diff --git a/vsprojects/grpc_cpp_plugin/grpc_cpp_plugin.vcxproj b/vsprojects/grpc_cpp_plugin/grpc_cpp_plugin.vcxproj
index 1693a48438..1fd03e185d 100644
--- a/vsprojects/grpc_cpp_plugin/grpc_cpp_plugin.vcxproj
+++ b/vsprojects/grpc_cpp_plugin/grpc_cpp_plugin.vcxproj
@@ -48,6 +48,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\protoc.props" />
+ <Import Project="..\protobuf.props" />
<Import Project="..\global.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
diff --git a/vsprojects/grpc_csharp_plugin/grpc_csharp_plugin.vcxproj b/vsprojects/grpc_csharp_plugin/grpc_csharp_plugin.vcxproj
index aae82723e4..2d63a8496b 100644
--- a/vsprojects/grpc_csharp_plugin/grpc_csharp_plugin.vcxproj
+++ b/vsprojects/grpc_csharp_plugin/grpc_csharp_plugin.vcxproj
@@ -48,6 +48,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\protoc.props" />
+ <Import Project="..\protobuf.props" />
<Import Project="..\global.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
diff --git a/vsprojects/grpc_objective_c_plugin/grpc_objective_c_plugin.vcxproj b/vsprojects/grpc_objective_c_plugin/grpc_objective_c_plugin.vcxproj
index 07a837a804..46e064f3e3 100644
--- a/vsprojects/grpc_objective_c_plugin/grpc_objective_c_plugin.vcxproj
+++ b/vsprojects/grpc_objective_c_plugin/grpc_objective_c_plugin.vcxproj
@@ -48,6 +48,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\protoc.props" />
+ <Import Project="..\protobuf.props" />
<Import Project="..\global.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
diff --git a/vsprojects/grpc_python_plugin/grpc_python_plugin.vcxproj b/vsprojects/grpc_python_plugin/grpc_python_plugin.vcxproj
index 02bab1c61b..a1e3a4aa6c 100644
--- a/vsprojects/grpc_python_plugin/grpc_python_plugin.vcxproj
+++ b/vsprojects/grpc_python_plugin/grpc_python_plugin.vcxproj
@@ -48,6 +48,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\protoc.props" />
+ <Import Project="..\protobuf.props" />
<Import Project="..\global.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
diff --git a/vsprojects/grpc_ruby_plugin/grpc_ruby_plugin.vcxproj b/vsprojects/grpc_ruby_plugin/grpc_ruby_plugin.vcxproj
index 4763d14858..7f31678530 100644
--- a/vsprojects/grpc_ruby_plugin/grpc_ruby_plugin.vcxproj
+++ b/vsprojects/grpc_ruby_plugin/grpc_ruby_plugin.vcxproj
@@ -48,6 +48,7 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\protoc.props" />
+ <Import Project="..\protobuf.props" />
<Import Project="..\global.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
diff --git a/vsprojects/protobuf.props b/vsprojects/protobuf.props
index d2685f7762..4a3c49266f 100644
--- a/vsprojects/protobuf.props
+++ b/vsprojects/protobuf.props
@@ -6,7 +6,7 @@
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>libprotobuf.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(ProjectDir)\..\..\third_party\protobuf\vsprojects\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(ProjectDir)\..\..\third_party\protobuf\cmake\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
diff --git a/vsprojects/protoc.props b/vsprojects/protoc.props
index 6024022690..fc89694633 100644
--- a/vsprojects/protoc.props
+++ b/vsprojects/protoc.props
@@ -6,7 +6,7 @@
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>libprotoc.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(ProjectDir)\..\..\third_party\protobuf\vsprojects\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(ProjectDir)\..\..\third_party\protobuf\cmake\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup />