aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/README.md3
-rw-r--r--csharp/keys/Google.Protobuf.snkbin0 -> 596 bytes
-rw-r--r--csharp/keys/README.md6
-rw-r--r--csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj2
-rw-r--r--csharp/src/Google.Protobuf/Google.Protobuf.csproj2
-rw-r--r--csharp/src/Google.Protobuf/Google.Protobuf.nuspec10
-rw-r--r--ruby/Gemfile.lock6
-rw-r--r--ruby/Rakefile11
-rw-r--r--ruby/google-protobuf.gemspec11
-rw-r--r--ruby/lib/google/protobuf.rb6
-rw-r--r--src/google/protobuf/io/coded_stream.h6
-rw-r--r--src/google/protobuf/stubs/port.h2
12 files changed, 49 insertions, 16 deletions
diff --git a/cmake/README.md b/cmake/README.md
index 58aae8e9..1e7410d8 100644
--- a/cmake/README.md
+++ b/cmake/README.md
@@ -157,7 +157,8 @@ And wait for the compilation to finish.
Testing
=======
-To run unit-tests:
+To run unit-tests, first you must compile protobuf as described above.
+Then run:
C:\Path\to\protobuf\cmake\build\release>nmake check
diff --git a/csharp/keys/Google.Protobuf.snk b/csharp/keys/Google.Protobuf.snk
new file mode 100644
index 00000000..7515443c
--- /dev/null
+++ b/csharp/keys/Google.Protobuf.snk
Binary files differ
diff --git a/csharp/keys/README.md b/csharp/keys/README.md
index 1a014198..ede67357 100644
--- a/csharp/keys/README.md
+++ b/csharp/keys/README.md
@@ -2,4 +2,8 @@ Contents
--------
- Google.Protobuf.public.snk:
- Public key to verify strong name of Google.Protobuf assemblies. \ No newline at end of file
+ Public key to verify strong name of Google.Protobuf assemblies.
+- Google.Protobuf.snk:
+ Signing key to provide strong name of Google.Protobuf assemblies.
+ As per [Microsoft guidance](https://msdn.microsoft.com/en-us/library/wd40t7ad(v=vs.110).aspx)
+ signing key should be checked into the repository.
diff --git a/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj b/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj
index 20ae8e48..4f37c5e2 100644
--- a/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj
+++ b/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj
@@ -55,7 +55,7 @@
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<Prefer32Bit>false</Prefer32Bit>
<SignAssembly>True</SignAssembly>
- <AssemblyOriginatorKeyFile>C:\keys\Google.Protobuf.snk</AssemblyOriginatorKeyFile>
+ <AssemblyOriginatorKeyFile>..\..\keys\Google.Protobuf.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
diff --git a/csharp/src/Google.Protobuf/Google.Protobuf.csproj b/csharp/src/Google.Protobuf/Google.Protobuf.csproj
index 45ef8c63..ef524baf 100644
--- a/csharp/src/Google.Protobuf/Google.Protobuf.csproj
+++ b/csharp/src/Google.Protobuf/Google.Protobuf.csproj
@@ -64,7 +64,7 @@
<NoStdLib>true</NoStdLib>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<SignAssembly>True</SignAssembly>
- <AssemblyOriginatorKeyFile>C:\keys\Google.Protobuf.snk</AssemblyOriginatorKeyFile>
+ <AssemblyOriginatorKeyFile>..\..\keys\Google.Protobuf.snk</AssemblyOriginatorKeyFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
diff --git a/csharp/src/Google.Protobuf/Google.Protobuf.nuspec b/csharp/src/Google.Protobuf/Google.Protobuf.nuspec
index 2f691e3c..d5302544 100644
--- a/csharp/src/Google.Protobuf/Google.Protobuf.nuspec
+++ b/csharp/src/Google.Protobuf/Google.Protobuf.nuspec
@@ -15,6 +15,16 @@
<copyright>Copyright 2015, Google Inc.</copyright>
<tags>Protocol Buffers Binary Serialization Format Google proto proto3</tags>
<dependencies>
+ <!-- Dependencies for older, monolithic-assembly platforms -->
+ <group targetFramework="net45" />
+ <group targetFramework="wp8" />
+ <group targetFramework="win8" />
+ <group targetFramework="wpa81" />
+ <group targetFramework="xamarin.ios" />
+ <group targetFramework="monotouch" />
+ <group targetFramework="monoandroid" />
+
+ <!-- Dependencies for newer, more granular platforms (.NET Core etc) -->
<group targetFramework="dotnet">
<dependency id="System.Collections" version="4.0.0" />
<dependency id="System.Diagnostics.Debug" version="4.0.0" />
diff --git a/ruby/Gemfile.lock b/ruby/Gemfile.lock
index 8599da75..27e57506 100644
--- a/ruby/Gemfile.lock
+++ b/ruby/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- google-protobuf (3.0.0.alpha.4.0)
+ google-protobuf (3.0.0.alpha.5.0)
GEM
remote: https://rubygems.org/
@@ -10,6 +10,7 @@ GEM
rake (10.4.2)
rake-compiler (0.9.5)
rake
+ rake-compiler-dock (0.5.1)
rubygems-tasks (0.2.4)
test-unit (3.0.9)
power_assert
@@ -21,8 +22,9 @@ PLATFORMS
DEPENDENCIES
google-protobuf!
rake-compiler
+ rake-compiler-dock
rubygems-tasks
test-unit
BUNDLED WITH
- 1.10.6
+ 1.11.2
diff --git a/ruby/Rakefile b/ruby/Rakefile
index c25103d8..81c3119e 100644
--- a/ruby/Rakefile
+++ b/ruby/Rakefile
@@ -20,6 +20,17 @@ else
Rake::ExtensionTask.new("protobuf_c", spec) do |ext|
ext.ext_dir = "ext/google/protobuf_c"
ext.lib_dir = "lib/google"
+ ext.cross_compile = true
+ ext.cross_platform = [
+ 'x86-mingw32', 'x64-mingw32',
+ 'x86_64-linux', 'x86-linux',
+ 'universal-darwin'
+ ]
+ end
+
+ task 'gem:windows' do
+ require 'rake_compiler_dock'
+ RakeCompilerDock.sh "bundle && rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.6"
end
end
diff --git a/ruby/google-protobuf.gemspec b/ruby/google-protobuf.gemspec
index 312a0c8c..7b64ee77 100644
--- a/ruby/google-protobuf.gemspec
+++ b/ruby/google-protobuf.gemspec
@@ -8,12 +8,13 @@ Gem::Specification.new do |s|
s.authors = ["Protobuf Authors"]
s.email = "protobuf@googlegroups.com"
s.require_paths = ["lib"]
- s.files = `git ls-files -z`.split("\x0").find_all{|f| f =~ /lib\/.+\.rb/}
- unless RUBY_PLATFORM == "java"
- s.files += `git ls-files "*.c" "*.h" extconf.rb Makefile`.split
- s.extensions= ["ext/google/protobuf_c/extconf.rb"]
- else
+ s.files = Dir.glob('lib/**/*.rb')
+ if RUBY_PLATFORM == "java"
s.files += ["lib/google/protobuf_java.jar"]
+ else
+ s.files += Dir.glob('ext/**/*')
+ s.extensions= ["ext/google/protobuf_c/extconf.rb"]
+ s.add_development_dependency "rake-compiler-dock"
end
s.test_files = ["tests/basic.rb",
"tests/stress.rb",
diff --git a/ruby/lib/google/protobuf.rb b/ruby/lib/google/protobuf.rb
index f0eb6268..62bdd1bf 100644
--- a/ruby/lib/google/protobuf.rb
+++ b/ruby/lib/google/protobuf.rb
@@ -44,7 +44,11 @@ if RUBY_PLATFORM == "java"
require 'json'
require 'google/protobuf_java'
else
- require 'google/protobuf_c'
+ begin
+ require "google/#{RUBY_VERSION.sub(/\.\d$/, '')}/protobuf_c"
+ rescue LoadError
+ require 'google/protobuf_c'
+ end
end
require 'google/protobuf/repeated_field'
diff --git a/src/google/protobuf/io/coded_stream.h b/src/google/protobuf/io/coded_stream.h
index 020f20c7..e3771003 100644
--- a/src/google/protobuf/io/coded_stream.h
+++ b/src/google/protobuf/io/coded_stream.h
@@ -117,7 +117,7 @@
#if !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
#define PROTOBUF_LITTLE_ENDIAN 1
#endif
- #if _MSC_VER >= 1300
+ #if _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
// If MSVC has "/RTCc" set, it will complain about truncating casts at
// runtime. This file contains some intentional truncating casts.
#pragma runtime_checks("c", off)
@@ -1286,9 +1286,9 @@ inline bool CodedInputStream::IsFlat() const {
} // namespace protobuf
-#if defined(_MSC_VER) && _MSC_VER >= 1300
+#if _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
#pragma runtime_checks("c", restore)
-#endif // _MSC_VER
+#endif // _MSC_VER && !defined(__INTEL_COMPILER)
} // namespace google
#endif // GOOGLE_PROTOBUF_IO_CODED_STREAM_H__
diff --git a/src/google/protobuf/stubs/port.h b/src/google/protobuf/stubs/port.h
index b35a3afe..1036dff1 100644
--- a/src/google/protobuf/stubs/port.h
+++ b/src/google/protobuf/stubs/port.h
@@ -53,7 +53,7 @@
#if !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
#define PROTOBUF_LITTLE_ENDIAN 1
#endif
- #if defined(_MSC_VER) && _MSC_VER >= 1300
+ #if _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
// If MSVC has "/RTCc" set, it will complain about truncating casts at
// runtime. This file contains some intentional truncating casts.
#pragma runtime_checks("c", off)