ADD: added new version of protobuf

This commit is contained in:
Henry Winkel
2022-12-20 10:09:28 +01:00
parent 4a79559129
commit 1e2b3dda7b
1513 changed files with 123720 additions and 83381 deletions

View File

@@ -11,19 +11,17 @@ pushd $(dirname $0)/..
# Protocol buffer compiler to use. If the PROTOC variable is set,
# use that. Otherwise, probe for expected locations under both
# Windows and Unix.
PROTOC_LOCATIONS=(
"bazel-bin/protoc"
"solution/Debug/protoc.exe"
"cmake/build/Debug/protoc.exe"
"cmake/build/Release/protoc.exe"
)
if [ -z "$PROTOC" ]; then
for protoc in "${PROTOC_LOCATIONS[@]}"; do
if [ -x "$protoc" ]; then
PROTOC="$protoc"
fi
done
if [ -z "$PROTOC" ]; then
# TODO(jonskeet): Use an array and a for loop instead?
if [ -x solution/Debug/protoc.exe ]; then
PROTOC=solution/Debug/protoc.exe
elif [ -x cmake/build/Debug/protoc.exe ]; then
PROTOC=cmake/build/Debug/protoc.exe
elif [ -x cmake/build/Release/protoc.exe ]; then
PROTOC=cmake/build/Release/protoc.exe
elif [ -x src/protoc ]; then
PROTOC=src/protoc
else
echo "Unable to find protocol buffer compiler."
exit 1
fi
@@ -42,8 +40,7 @@ $PROTOC -Isrc --csharp_out=csharp/src/Google.Protobuf \
src/google/protobuf/struct.proto \
src/google/protobuf/timestamp.proto \
src/google/protobuf/type.proto \
src/google/protobuf/wrappers.proto \
src/google/protobuf/compiler/plugin.proto
src/google/protobuf/wrappers.proto
# Test protos
# Note that this deliberately does *not* include old_extensions1.proto
@@ -76,3 +73,17 @@ $PROTOC -Isrc -Icsharp/protos \
# AddressBook sample protos
$PROTOC -Iexamples -Isrc --csharp_out=csharp/src/AddressBook \
examples/addressbook.proto
$PROTOC -Iconformance -Isrc --csharp_out=csharp/src/Google.Protobuf.Conformance \
conformance/conformance.proto
# Benchmark protos
$PROTOC -Ibenchmarks \
benchmarks/datasets/google_message1/proto3/*.proto \
benchmarks/benchmarks.proto \
--csharp_out=csharp/src/Google.Protobuf.Benchmarks
# C# only benchmark protos
$PROTOC -Isrc -Icsharp/src/Google.Protobuf.Benchmarks \
csharp/src/Google.Protobuf.Benchmarks/*.proto \
--csharp_out=csharp/src/Google.Protobuf.Benchmarks