protobuf auto generate file and header tools.
[
-protoexe
] : proto executable file path (defualt is ./proto)<
-indir
> : base *.proto files directory. The tool will recursive walks through the folder and finds all the*.proto
files<
-outdir
> : output directory. will automatic generat*.pb.h
and*.pb.cc
files to this path[
-fullheader
] : generate one file include all*.pb.h
files. this command often used in projects with precompiled headers.[
-fullbody
] : generate one or more file include all*.pb.cc
files. use this command if you don't want to change the project when add new.proto
files.[
-fullbodysplit
] : Eachfullbody
file contains a specified number of files that are split into multiplefullbody
files.[
-outext
] : change output file extensions.[
-outtype
] : change compile type. example :cpp_out
descriptor_set_out
and etc..
auto generate all *.proto files from "./Protobuf" directory into "./Define/protobuf/" path:
ProtobufAutoGenerator -protoexe ./tools/protoc.exe -indir ./Protobuf/ -outdir ./Define/protobuf/
full example:
ProtobufAutoGenerator -protoexe ./tools/protoc.exe -indir ./Protobuf/ -outdir ./Define/protobuf/ -fullheader proto_all.h -fullbody proto_all.cc -fullbodysplit 100