Hi,
So far, the standard way to use nanopb generator has been to first compile the .proto to .pb using Google's protoc, and then use nanopb_generator.py to convert that into .pb.c and .pb.h files. This works, and will remain supported for the foreseeable future, but it unnecessarily complicated.
Instead, it would be more reasonable to do the generation in one step. Either:
1) Make protoc use nanopb_generator.py as a plugin. This would be invoked as:
protoc --nanopb_out=. myproto.proto
2) Make nanopb_generator.py call protoc automatically when file name ends in .proto:
python nanopb_generator.py myproto.proto
I'm having difficulties deciding between these two options, and would appreciate any feedback from nanopb users.
The 1) way is already implemented in git master, but you have to rename nanopb_generator.py to protoc-gen-nanopb and put it in your path first.
--
Petteri