@echo off
rem 脚本路径
set myPath=%~dp0
@echo %myPath%
set "OUT_PUT=%myPath%pb"
if "%computername%"=="DINGPENGFEI" (
set "OUT_PUT=E:\official\plaza\res\pb"
)
if "%computername%"=="FENGNING" (
set "OUT_PUT=D:\official\plaza\res\pb"
)
setlocal enabledelayedexpansion
for /d /r %myPath% %%i in (*) do (
set PROTO=%%i
for /f "delims=" %%a in ('dir /b/a-d/oN "!PROTO!\*.proto"') do (
set pbname=%%a
set pbname=!pbname:~0,-5!pb
@echo %%a "---->" !pbname!
%myPath%\protoc -I !PROTO! --descriptor_set_out %OUT_PUT%\!pbname! !PROTO!\%%a
)
)
打pb批处理脚本
最新推荐文章于 2021-05-27 11:25:15 发布