2022-01-17 17:51:18 +08:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
2022-05-12 18:31:17 +08:00
|
|
|
path = os.path.abspath(os.path.join(os.getcwd(), '..', '..', '..', 'libs', 'hbb_common', 'protos'))
|
2022-01-17 17:51:18 +08:00
|
|
|
|
|
|
|
if os.name == 'nt':
|
2022-01-30 03:39:54 +08:00
|
|
|
cmd = r'protoc --ts_proto_opt=esModuleInterop=true --ts_proto_opt=snakeToCamel=false --plugin=protoc-gen-ts_proto=.\node_modules\.bin\protoc-gen-ts_proto.cmd -I "%s" --ts_proto_out=./src/ rendezvous.proto'%path
|
2022-01-17 17:51:18 +08:00
|
|
|
print(cmd)
|
|
|
|
os.system(cmd)
|
2022-01-30 03:39:54 +08:00
|
|
|
cmd = r'protoc --ts_proto_opt=esModuleInterop=true --ts_proto_opt=snakeToCamel=false --plugin=protoc-gen-ts_proto=.\node_modules\.bin\protoc-gen-ts_proto.cmd -I "%s" --ts_proto_out=./src/ message.proto'%path
|
2022-01-17 17:51:18 +08:00
|
|
|
print(cmd)
|
|
|
|
os.system(cmd)
|
|
|
|
else:
|
2022-01-30 03:39:54 +08:00
|
|
|
cmd = r'protoc --ts_proto_opt=esModuleInterop=true --ts_proto_opt=snakeToCamel=false --plugin=./node_modules/.bin/protoc-gen-ts_proto -I "%s" --ts_proto_out=./src/ rendezvous.proto'%path
|
2022-01-17 17:51:18 +08:00
|
|
|
print(cmd)
|
|
|
|
os.system(cmd)
|
2022-01-30 03:39:54 +08:00
|
|
|
cmd = r'protoc --ts_proto_opt=esModuleInterop=true --ts_proto_opt=snakeToCamel=false --plugin=./node_modules/.bin/protoc-gen-ts_proto -I "%s" --ts_proto_out=./src/ message.proto'%path
|
2022-01-17 17:51:18 +08:00
|
|
|
print(cmd)
|
2022-01-20 21:58:28 +08:00
|
|
|
os.system(cmd)
|