本来以为在mac上导出protobuf会很麻烦,查了一下资料,发现都是几分钟的事。
相关的工具都可以在protogen找到。
加上一个批处理shell脚本
#!/bin/sh
filelist=`ls /Users/x/Documents/Proto/protogen-master/test/*.proto`
for file in $filelist
do
echo $file
mono /Users/x/Documents/Proto/protogen-master/bin/protogen.exe -i:$file -o:${file%.*}.cs
done