firmware/generate_pb.py

11 lines
671 B
Python
Raw Permalink Normal View History

2019-10-13 00:37:11 +02:00
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\ ",
2019-10-16 22:48:08 +02:00
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\ "
2019-10-13 00:37:11 +02:00
]))
#print(env.Dump())