summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2019-04-09 06:50:25 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2019-04-09 06:50:25 +0100
commitd6746379a1d63b9c588d9642cd1d0d6608629e20 (patch)
treebeed7df764d46ea951c00f1b5ab024874538d4c8 /Tools
parentbe8061c7f58bb574450725aeba3151b6c9c9ae56 (diff)
downloadswig-d6746379a1d63b9c588d9642cd1d0d6608629e20.tar.gz
Use wine on Linux to test executable when building windows zip file
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/mkwindows.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/Tools/mkwindows.sh b/Tools/mkwindows.sh
index 0651bbd60..e6ae84350 100755
--- a/Tools/mkwindows.sh
+++ b/Tools/mkwindows.sh
@@ -9,6 +9,8 @@
# path to zip program
zip=
+wine=
+
# options for configure
extraconfigureoptions=
compileflags="-O2 -Wall -Wextra"
@@ -41,6 +43,11 @@ else
echo "Building native Windows executable on Linux"
if test x$zip = x; then
zip=zip
+ wine=$(which wine)
+ fi
+ if test x$wine = x; then
+ echo "Could not detect wine - please install wine-stable package."
+ exit 1;
fi
echo "Checking that mingw 32-bit gcc is installed/available"
if test -n "`which i686-w64-mingw32-gcc`" ; then
@@ -109,9 +116,9 @@ if test -f "$tarball"; then
echo "Compiling (quietly)..."
make > build.log
echo "Simple check to see if swig.exe runs..."
- env LD_LIBRARY_PATH= PATH= ./swig.exe -version || exit 1
+ env LD_LIBRARY_PATH= PATH= $wine ./swig.exe -version || exit 1
echo "Simple check to see if ccache-swig.exe runs..."
- env LD_LIBRARY_PATH= PATH= ./CCache/ccache-swig.exe -V || exit 1
+ env LD_LIBRARY_PATH= PATH= $wine ./CCache/ccache-swig.exe -V || exit 1
echo "Creating $swigwinbasename.zip..."
cd ..
cp $swigbasename/swig.exe $swigwinbasename