-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-windows-binaries.sh
executable file
·50 lines (38 loc) · 1.06 KB
/
build-windows-binaries.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
# This is how the Windows binaries for release are built, so I don't forget!
# Any existing windows-build and teckit-windows-bin directories will be deleted.
PATH=/usr/local/mingw/bin:$PATH
rm -rf windows-build teckit-windows-bin
mkdir windows-build
cd windows-build
BUILD=$(../config.guess)
HOST=
# Check the various names used for mingw
for PREFIX in mingw32 i586-mingw32msvc i386-mingw32 i686-w64-mingw32
do
if which $PREFIX-gcc >/dev/null
then
HOST=$PREFIX
break
fi
done
if [ -z "$HOST" ]
then
echo "Could not find mingw. Please install it!" >&2
exit 1
fi
../configure --build=$BUILD --host=$HOST --with-old-lib-names --without-system-zlib --enable-final --disable-dependency-tracking
make
make install-strip DESTDIR=`pwd`/inst
if which $HOST-strip >/dev/null
then
$HOST-strip --strip-unneeded inst/usr/local/lib/*.dll
fi
cd ..
mkdir teckit-windows-bin
cp windows-build/inst/usr/local/bin/*.exe teckit-windows-bin
cp windows-build/inst/usr/local/lib/*.dll teckit-windows-bin
echo '###'
echo '### Built products:'
echo '###'
ls -l teckit-windows-bin