2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 19:08:59 +00:00
qpdf/make_windows_releases
2018-02-25 16:00:11 -05:00

62 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
if [ ! -d external-libs ]; then
echo "Please extract qpdf-external-libs-bin.zip and try again"
exit 2
fi
if echo $PATH | grep -q /mingw64; then
wordsize=64
else
wordsize=32
fi
if [ "$wordsize" = 64 ]; then
if [ ! -f win.32 ]; then
echo "Waiting for win.32 to appear"
while [ ! -f win.32 ]; do
sleep 5
done
fi
else
rm -f win.32 win.64
echo ''
echo "You may now start $0 in a 64-bit window."
echo ''
sleep 5
fi
set -e
set -x
cwd=`pwd`
PATH=$cwd/libqpdf/build:$PATH
rm -rf install-mingw$wordsize install-msvc$wordsize
./config-msvc
make -j8
make -k check || test $wordsize = 32
make install
make distclean
./config-mingw
make -j8
make -k check || test $wordsize = 32
make install
make distclean
touch win.$wordsize
set +x
echo "Finished builds for $wordsize."
if [ "$wordsize" = 32 ]; then
echo "If not done already, rerun this in a "`expr 96 - $wordsize`"-bit environment."
echo ''
else
echo 'Running "./make_windows_releases-finish".'
echo ''
./make_windows_releases-finish
fi