From c04980084aa961d9620e62e5a0f2965e51a53cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Thu, 19 Jan 2023 14:04:31 +0100 Subject: [PATCH] Fix line endings at LF and make windows proto generation work again. needs cygwin64 in path --- .gitattributes | 3 +++ bin/regen-protos.bat | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..5dc46e6b3 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +* text=auto eol=lf +*.{cmd,[cC][mM][dD]} text eol=crlf +*.{bat,[bB][aA][tT]} text eol=crlf \ No newline at end of file diff --git a/bin/regen-protos.bat b/bin/regen-protos.bat index 29f35d0ae..8edebcf7c 100644 --- a/bin/regen-protos.bat +++ b/bin/regen-protos.bat @@ -1 +1,5 @@ -cd protobufs && ..\nanopb-0.4.7\generator-bin\protoc.exe --nanopb_out=-v:..\src\mesh\generated\meshtastic -I=..\protobufs meshtastic\*.proto +cd protobufs && ..\nanopb-0.4.7\generator-bin\protoc.exe --nanopb_out=-v:..\src\mesh\generated -I=..\protobufs ..\protobufs\meshtastic\*.proto + +cd ../src/mesh/generated/meshtastic +sed -i 's/#include "meshtastic/#include "./g' * +sed -i 's/meshtastic_//g' *