summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-11-17 19:09:13 +0200
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-12-29 20:26:57 +0200
commit480b39cc0adc749ad81183fad2bfce6548c56604 (patch)
treec1a9895470d6ac1fa4de7339a5e7a5e7a744cde5 /tools
parentec517e2108f4e7cc31cffc4fdc2a11cebfabfc66 (diff)
Package as .zip, convert linebreaks
Diffstat (limited to 'tools')
-rw-r--r--tools/make_windows_package.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/make_windows_package.sh b/tools/make_windows_package.sh
index c3a050a9..3096003b 100644
--- a/tools/make_windows_package.sh
+++ b/tools/make_windows_package.sh
@@ -2,6 +2,7 @@
# Run this script in the top nanopb directory to create a binary package
# for Windows users. This script is designed to run under MingW/MSYS bash
+# and requires the following tools: git, make, zip, unix2dos
set -e
set -x
@@ -31,3 +32,10 @@ rm $DEST/generator/protoc-gen-nanopb.py
# Package the protoc compiler
cp `which protoc`.exe $DEST/generator-bin/
+# Convert line breaks for convenience
+find $DEST -name '*.c' -o -name '*.h' -o -name '*.txt' \
+ -o -name '*.proto' -o -name '*.py' -o -name '*.options' \
+ -exec unix2dos '{}' \;
+
+# Zip it all up
+( cd dist; zip -r $VERSION.zip $VERSION )