Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
09e584b5
Commit
09e584b5
authored
May 15, 2015
by
Jie Luo
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #391 from jtattermusch/generate_protos_windows_friendly
Make generate_protos.sh Windows-friendly.
parents
e96b5b6b
734393d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
8 deletions
+23
-8
generate_protos.sh
csharp/generate_protos.sh
+20
-2
UnittestCustomOptions.cs
.../ProtocolBuffers.Test/TestProtos/UnittestCustomOptions.cs
+0
-6
addressbook.proto
examples/addressbook.proto
+3
-0
No files found.
csharp/generate_protos.sh
View file @
09e584b5
...
...
@@ -8,8 +8,22 @@ set -ex
# cd to repository root
cd
$(
dirname
$0
)
/..
# protocol buffer compiler to use
PROTOC
=
src/protoc
# Protocol buffer compiler to use. If the PROTOC variable is set,
# use that. Otherwise, probe for expected locations under both
# Windows and Unix.
if
[
-z
"
$PROTOC
"
]
;
then
# TODO(jonskeet): Use an array and a for loop instead?
if
[
-x
vsprojects/Debug/protoc.exe
]
;
then
PROTOC
=
vsprojects/Debug/protoc.exe
elif
[
-x
vsprojects/Release/protoc.exe
]
;
then
PROTOC
=
vsprojects/Release/protoc.exe
elif
[
-x
src/protoc
]
;
then
PROTOC
=
src/protoc
else
echo
"Unable to find protocol buffer compiler."
exit
1
fi
fi
# Descriptor proto
#TODO(jtattermusch): generate descriptor.proto
...
...
@@ -48,3 +62,7 @@ $PROTOC -Isrc --csharp_out=csharp/src/ProtocolBuffersLite.Test/TestProtos \
$PROTOC
-Icsharp
/protos/extest
--csharp_out
=
csharp/src/ProtocolBuffersLite.Test/TestProtos
\
csharp/protos/extest/unittest_extras_full.proto
\
csharp/protos/extest/unittest_extras_lite.proto
# AddressBook sample protos
$PROTOC
-Iexamples
--csharp_out
=
csharp/src/AddressBook
\
examples/addressbook.proto
csharp/src/ProtocolBuffers.Test/TestProtos/UnittestCustomOptions.cs
View file @
09e584b5
...
...
@@ -62,12 +62,10 @@ namespace Google.ProtocolBuffers.TestProtos {
#
endregion
#
region
Extensions
public
const
int
FileOpt1FieldNumber
=
7736974
;
[
global
::
System
.
CLSCompliant
(
false
)]
public
static
pb
::
GeneratedExtensionBase
<
ulong
>
FileOpt1
;
public
const
int
MessageOpt1FieldNumber
=
7739036
;
public
static
pb
::
GeneratedExtensionBase
<
int
>
MessageOpt1
;
public
const
int
FieldOpt1FieldNumber
=
7740936
;
[
global
::
System
.
CLSCompliant
(
false
)]
public
static
pb
::
GeneratedExtensionBase
<
ulong
>
FieldOpt1
;
public
const
int
FieldOpt2FieldNumber
=
7753913
;
public
static
pb
::
GeneratedExtensionBase
<
int
>
FieldOpt2
;
...
...
@@ -86,20 +84,16 @@ namespace Google.ProtocolBuffers.TestProtos {
public
const
int
Int64OptFieldNumber
=
7705542
;
public
static
pb
::
GeneratedExtensionBase
<
long
>
Int64Opt
;
public
const
int
Uint32OptFieldNumber
=
7704880
;
[
global
::
System
.
CLSCompliant
(
false
)]
public
static
pb
::
GeneratedExtensionBase
<
uint
>
Uint32Opt
;
public
const
int
Uint64OptFieldNumber
=
7702367
;
[
global
::
System
.
CLSCompliant
(
false
)]
public
static
pb
::
GeneratedExtensionBase
<
ulong
>
Uint64Opt
;
public
const
int
Sint32OptFieldNumber
=
7701568
;
public
static
pb
::
GeneratedExtensionBase
<
int
>
Sint32Opt
;
public
const
int
Sint64OptFieldNumber
=
7700863
;
public
static
pb
::
GeneratedExtensionBase
<
long
>
Sint64Opt
;
public
const
int
Fixed32OptFieldNumber
=
7700307
;
[
global
::
System
.
CLSCompliant
(
false
)]
public
static
pb
::
GeneratedExtensionBase
<
uint
>
Fixed32Opt
;
public
const
int
Fixed64OptFieldNumber
=
7700194
;
[
global
::
System
.
CLSCompliant
(
false
)]
public
static
pb
::
GeneratedExtensionBase
<
ulong
>
Fixed64Opt
;
public
const
int
Sfixed32OptFieldNumber
=
7698645
;
public
static
pb
::
GeneratedExtensionBase
<
int
>
Sfixed32Opt
;
...
...
examples/addressbook.proto
View file @
09e584b5
// See README.txt for information and build instructions.
syntax
=
"proto2"
;
package
tutorial
;
option
java_package
=
"com.example.tutorial"
;
option
java_outer_classname
=
"AddressBookProtos"
;
option
csharp_namespace
=
"Google.ProtocolBuffers.Examples.AddressBook"
;
message
Person
{
required
string
name
=
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment