Status: New
Owner: liuj...@google.com
Labels: Type-Defect Priority-Medium

New issue 399 by cbsm...@gmail.com: Add support for using batch files to wrap plugins on Windows
http://code.google.com/p/protobuf/issues/detail?id=399

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.

Attachments:
        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 protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to