pseudomuto / protoc-gen-doc

Documentation generator plugin for Google Protocol Buffers
MIT License
2.64k stars 464 forks source link

How to use * under windows (path ./*.proto) #352

Open makefriend8 opened 6 years ago

makefriend8 commented 6 years ago

for example (under windows CMD) protoc --doc_out=./doc --doc_opt=html,index.html ./mytest1.proto correct but
protoc --doc_out=./doc --doc_opt=html,index.html ./*.proto just return ./*.proto No such file or directory.

why ?what should I do?

jeffreytang commented 6 years ago

This looks a bug of protoc 3.5, it could not recognize wildcard * properly. if using protoc 3.4 the problem is gone.

AminLA commented 6 years ago

you can try this

setlocal enabledelayedexpansion enableextensions
set PROTO_FILES=
for /f %%x in ('dir /b/s %PROTO_ROOT%\*.proto') do set PROTO_FILES=!PROTO_FILES! %%x

protoc --doc_out=./doc --doc_opt=html,index.html %PROTO_FILES%