Add tools/make-windows-releases

This commit is contained in:
Eric Biggers 2016-04-11 23:09:55 -05:00
parent aa38ead6c4
commit f73db15203

20
tools/make-windows-releases Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
set -eu
for arch in 'i686' 'x86_64'; do
make clean
make -j CC=${arch}-w64-mingw32-gcc BUILD_PROGRAMS=yes BUILD_SHARED_LIBRARY=yes
dir=libdeflate-$(git describe --tags | tr -d v)-windows-${arch}-bin
rm -rf $dir ${dir}.zip
mkdir $dir
cp libdeflate.dll libdeflate.lib libdeflate.h *.exe $dir
${arch}-w64-mingw32-strip ${dir}/libdeflate.dll ${dir}/*.exe
for file in COPYING; do
sed < $file > ${dir}/${file}.txt -e 's/$/\r/g'
done
for file in README.md; do
sed < $file > ${dir}/${file} -e 's/$/\r/g'
done
zip -r ${dir}.zip ${dir}
done