Skip to content

Commit d674637

Browse files
committed
Use wine on Linux to test executable when building windows zip file
1 parent be8061c commit d674637

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Tools/mkwindows.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
# path to zip program
1010
zip=
1111

12+
wine=
13+
1214
# options for configure
1315
extraconfigureoptions=
1416
compileflags="-O2 -Wall -Wextra"
@@ -41,6 +43,11 @@ else
4143
echo "Building native Windows executable on Linux"
4244
if test x$zip = x; then
4345
zip=zip
46+
wine=$(which wine)
47+
fi
48+
if test x$wine = x; then
49+
echo "Could not detect wine - please install wine-stable package."
50+
exit 1;
4451
fi
4552
echo "Checking that mingw 32-bit gcc is installed/available"
4653
if test -n "`which i686-w64-mingw32-gcc`" ; then
@@ -109,9 +116,9 @@ if test -f "$tarball"; then
109116
echo "Compiling (quietly)..."
110117
make > build.log
111118
echo "Simple check to see if swig.exe runs..."
112-
env LD_LIBRARY_PATH= PATH= ./swig.exe -version || exit 1
119+
env LD_LIBRARY_PATH= PATH= $wine ./swig.exe -version || exit 1
113120
echo "Simple check to see if ccache-swig.exe runs..."
114-
env LD_LIBRARY_PATH= PATH= ./CCache/ccache-swig.exe -V || exit 1
121+
env LD_LIBRARY_PATH= PATH= $wine ./CCache/ccache-swig.exe -V || exit 1
115122
echo "Creating $swigwinbasename.zip..."
116123
cd ..
117124
cp $swigbasename/swig.exe $swigwinbasename

0 commit comments

Comments
 (0)