firmware/generate_pb.py
2019-10-16 22:48:08 +02:00

11 lines
No EOL
671 B
Python

Import("env")
env.AlwaysBuild(
env.Alias("generate_pb", None, [
r"if not exist $PROJECT_DIR\lib\pb_gen mkdir $PROJECT_DIR\lib\pb_gen\ ",
r"$PROJECT_DIR\extra\nanopb\generator-bin\protoc.exe -I$PROJECT_DIR\extra\ -o$PROJECT_DIR\lib\pb_gen\fx.pb fx.proto",
r"$PROJECT_DIR\extra\nanopb\generator-bin\nanopb_generator.exe -D$PROJECT_DIR\lib\pb_gen\ $PROJECT_DIR\lib\pb_gen\fx.pb",
r"copy $PROJECT_DIR\extra\nanopb\pb.h $PROJECT_DIR\lib\pb_gen\ ",
r"copy $PROJECT_DIR\extra\nanopb\pb_decode.* $PROJECT_DIR\lib\pb_gen\ ",
r"copy $PROJECT_DIR\extra\nanopb\pb_common.* $PROJECT_DIR\lib\pb_gen\ "
]))
#print(env.Dump())