[PATCH 2/2] Windows packaging script: check mingw bin directory

Alberto Corona albcoron at gmail.com
Tue Mar 25 10:54:38 PDT 2014


Windows packaging script now checks whether the mingw bin directory is
in either /usr/i686-w64-mingw32/bin or
/usr/i686-w64-mingw32/sys-root/mingw/bin

Signed-off-by: Alberto Corona <albcoron at gmail.com>
---
 packaging/windows/mingw-make.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/packaging/windows/mingw-make.sh b/packaging/windows/mingw-make.sh
index 7ca88ea..c8f97e1 100755
--- a/packaging/windows/mingw-make.sh
+++ b/packaging/windows/mingw-make.sh
@@ -10,6 +10,12 @@
 # number
 rm packaging/windows/subsurface.nsi > /dev/null 2>&1
 
-export PATH=/usr/i686-w64-mingw32/sys-root/mingw/bin:$PATH
-mingw32-qmake-qt4 CROSS_PATH=/usr/i686-w64-mingw32/sys-root/mingw LIBGIT2DEVEL=../libgit2 CONFIG+=libgit21-api
-mingw32-make $@
+if [ -d "/usr/i686-w64-mingw32/bin" ] ; then
+	export path=/usr/i686-w64-mingw32/bin:$PATH
+	i686-w64-mingw32-qmake CROSS_PATH=/usr/i686-w64-mingw32/ LIBGIT2DEVEL=../libgit2 CONFIG+=libgit21-api
+	make $@
+else
+	export PATH=/usr/i686-w64-mingw32/sys-root/mingw/bin:$PATH
+	mingw32-qmake-qt4 CROSS_PATH=/usr/i686-w64-mingw32/sys-root/mingw LIBGIT2DEVEL=../libgit2 CONFIG+=libgit21-api
+	mingw32-make $@
+fi
-- 
1.9.1



More information about the subsurface mailing list