From d0e9e643f7e8ca159dcbbf9c9ef23ac87e4c4f93 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Sun, 17 Sep 2017 12:53:49 +0300 Subject: Use pyinstaller for linux binary packages instead of old bbfreeze --- tools/make_linux_package.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'tools') diff --git a/tools/make_linux_package.sh b/tools/make_linux_package.sh index aea1c56..0bcba7d 100755 --- a/tools/make_linux_package.sh +++ b/tools/make_linux_package.sh @@ -3,6 +3,8 @@ # Run this script in the top nanopb directory to create a binary package # for Linux users. +# Requires: protobuf, python-protobuf, pyinstaller + set -e set -x @@ -18,15 +20,15 @@ git archive HEAD | tar x -C $DEST # Rebuild the Python .proto files make -BC $DEST/generator/proto -# Make the nanopb generator available as a protoc plugin -cp $DEST/generator/nanopb_generator.py $DEST/generator/protoc-gen-nanopb.py - # Package the Python libraries -( cd $DEST/generator; bbfreeze nanopb_generator.py protoc-gen-nanopb.py ) -mv $DEST/generator/dist $DEST/generator-bin +( cd $DEST/generator; pyinstaller nanopb_generator.py ) +mv $DEST/generator/dist/nanopb_generator $DEST/generator-bin -# Remove temp file -rm $DEST/generator/protoc-gen-nanopb.py +# Remove temp files +rm -rf $DEST/generator/dist $DEST/generator/build $DEST/generator/nanopb_generator.spec + +# Make the nanopb generator available as a protoc plugin +cp $DEST/generator-bin/nanopb_generator $DEST/generator-bin/protoc-gen-nanopb # Package the protoc compiler cp `which protoc` $DEST/generator-bin/protoc.bin -- cgit v1.2.3