2022-01-07 02:29:58 -08:00
|
|
|
#!/usr/bin/env bash
|
2020-03-03 08:23:58 -08:00
|
|
|
|
2020-12-04 18:54:00 +08:00
|
|
|
set -e
|
|
|
|
|
|
2022-12-21 13:36:38 +01:00
|
|
|
echo "This script requires https://jpa.kapsi.fi/nanopb/download/ version 0.4.7 to be located in the"
|
2022-10-31 17:32:38 +10:00
|
|
|
echo "firmware root directory if the following step fails, you should download the correct"
|
2022-12-21 13:36:38 +01:00
|
|
|
echo "prebuilt binaries for your computer into nanopb-0.4.7"
|
2020-12-11 08:31:41 +08:00
|
|
|
|
2020-03-03 08:23:58 -08:00
|
|
|
# the nanopb tool seems to require that the .options file be in the current directory!
|
2022-05-12 20:45:30 +10:00
|
|
|
cd protobufs
|
2024-03-21 09:06:37 -05:00
|
|
|
../nanopb-0.4.7/generator-bin/protoc "--nanopb_out=-S.cpp -v:../src/mesh/generated/" -I=../protobufs meshtastic/*.proto --experimental_allow_proto3_optional
|
2023-01-18 08:56:47 -06:00
|
|
|
|
2023-01-21 18:22:19 +01:00
|
|
|
# sed -i 's/#include "meshtastic/#include "./g' -- *
|
2023-01-18 08:56:47 -06:00
|
|
|
|
2023-01-21 18:22:19 +01:00
|
|
|
# sed -i 's/meshtastic_//g' -- *
|
2020-12-04 18:54:00 +08:00
|
|
|
|
2021-05-01 11:26:36 +08:00
|
|
|
#echo "Regenerating protobuf documentation - if you see an error message"
|
|
|
|
|
#echo "you can ignore it unless doing a new protobuf release to github."
|
2022-01-07 02:29:58 -08:00
|
|
|
#bin/regen-docs.sh
|