build_win32.sh: update script to create zip file
authorPaul Brossier <piem@piem.org>
Mon, 13 Feb 2017 21:17:19 +0000 (22:17 +0100)
committerPaul Brossier <piem@piem.org>
Mon, 13 Feb 2017 21:17:19 +0000 (22:17 +0100)
build_win32.sh

index 7426348..63b06b3 100755 (executable)
@@ -1,16 +1,33 @@
-#! /bin/sh
+#! /bin/bash
 
 # instructions to build vamp-aubio-plugins for mac os x
 
+set -x
+set -e
+
+. $PWD/VERSION
+VAMP_AUBIO_VERSION=$VAMP_AUBIO_MAJOR_VERSION.$VAMP_AUBIO_MINOR_VERSION.$VAMP_AUBIO_PATCH_VERSION$VAMP_AUBIO_VERSION_STATUS
+
+if [ "$1" = 'dist' ]
+then
+  rm -rf contrib/
+fi
+
 # get waf
 sh scripts/get_waf.sh
 
 # fetch Vamp SDK
 sh scripts/get_deps_msvc.sh
 
+# stupid patch to get workaround quote escaping in git bash
+patch -p1 < scripts/aubio_waf_msvc.patch
+
 # fetch and build aubio
 sh scripts/get_aubio.sh
 
+# revert patch
+patch -R -p2 < scripts/aubio_waf_msvc.patch
+
 # configure and build plugin
 python waf configure
 
@@ -22,4 +39,16 @@ python waf build -v
 # system-wide installation
 # sudo ./waf install
 
-python waf install --destdir=dist
+#python waf install --destdir=dist
+
+if [ "$1" = 'dist' ]
+then
+  DESTDIR=vamp-aubio-plugins-$VAMP_AUBIO_VERSION-win32
+  rm -rf $DESTDIR $DESTDIR.zip
+  mkdir $DESTDIR
+  cp -prv contrib/aubio*/README.md $DESTDIR/README.aubio.md
+  cp -prv README.md $DESTDIR
+  cp -prv build/vamp-aubio.dll $DESTDIR
+  cp -prv vamp-aubio.cat vamp-aubio.n3 $DESTDIR
+  zip -r $DESTDIR.zip $DESTDIR
+fi