-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild-windows-binaries.sh
executable file
·51 lines (40 loc) · 1.21 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
51
#!/bin/sh
set -ev
# This is how the Windows binaries for release are built, so I don't forget!
# Any existing windows-build{32,64} and teckit-windows-bin directories will be deleted.
PATH=/usr/local/mingw/bin:$PATH
. ./build-windows-common
rm -rf $WINDOWS
file /usr/bin/i686-w64-mingw32-ld /usr/bin/x86_64-w64-mingw32-ld
for bit in 32 64
do
WINDOWS_BUILD=windows-build${bit}
WINDOWS_BIN=$WINDOWS/${bit}-bit
rm -rf $WINDOWS_BUILD
mkdir $WINDOWS_BUILD
cd $WINDOWS_BUILD
BUILD=$(../config.guess)
set_compiler $bit
echo "BUILD=${BUILD} HOST=${HOST} bit=${bit}"
../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 -p $WINDOWS_BIN
cp $WINDOWS_BUILD/inst/usr/local/bin/*.exe $WINDOWS_BIN
cp $WINDOWS_BUILD/inst/usr/local/lib/*.dll $WINDOWS_BIN
done
cd docs
for manpage in *.1
do
groff -k -mandoc -Tpdf $manpage > ../${WINDOWS}/${manpage}.pdf
done
cd ..
echo '###'
echo '### Built products:'
echo '###'
ls -l -R $WINDOWS