Status: New
Labels: Type-Defect Priority-Medium

New issue 399 by Add support for using batch files to wrap plugins on Windows

Windows has this annoying requirement that plugins be .exe's, which discourages the use of scripting. As a work around, I propose that should the plugin's executable name end with ".cmd" or ".bat", that cmd.exe /c be invoked. This would allow a simple .cmd or .bat file to do the work that Unix's #! usually provides a script. There are definitely more sophisticated ways to solve this problem, but this seems simple and predictable.

Usage is something like:

protoc --plugin=protoc-gen-foo=protoc-gen-foo.cmd --foo_out=. my.proto

With protoc-gen-foo.cmd looking like:
@C:\Path\To\Interpreter.exe protoc-gen-foo

The patch only requires changes to google::protobuf::compiler::subprocess. I've attached a patch describing the change.

        protobuf-patch.txt  2.9 KB

You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to