3 # Run this script in the top nanopb directory to create a binary package
4 # for Windows users. This script is designed to run under MingW/MSYS bash
9 VERSION=`git describe --always`
15 # Export the files from newest commit
16 git archive HEAD | tar x -C $DEST
18 # Rebuild the Python .proto files
19 make -BC $DEST/generator/proto
21 # Make the nanopb generator available as a protoc plugin
22 cp $DEST/generator/nanopb_generator.py $DEST/generator/protoc-gen-nanopb.py
24 # Package the Python libraries
25 ( cd $DEST/generator; bbfreeze nanopb_generator.py protoc-gen-nanopb.py )
26 mv $DEST/generator/dist $DEST/generator-bin
29 rm $DEST/generator/protoc-gen-nanopb.py
31 # Package the protoc compiler
32 cp `which protoc`.exe $DEST/generator-bin/