aboutsummaryrefslogtreecommitdiffstats
path: root/make_windows_releases
blob: 2cd7afd2378db41baf3a8eea600840a72a43567a (plain) (blame)
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
52
53
54
55
56
57
58
#!/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" = 32 ]; then
    if [ ! -f win.64 ]; then
        echo "Waiting for win.64 to appear"
        while [ ! -f win.64 ]; do
            sleep 5
        done
    fi
else
    rm -f win.32 win.64
    echo ''
    echo "You may now start $0 in a 32-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-mingw
make -j8
make check install
make distclean

./config-msvc
make -j8
make check install
make distclean

touch win.$wordsize

set +x

echo "Finished builds for $wordsize."

if [ "$wordsize" = 64 ]; then
  echo "If not done already, rerun this in a "`expr 96 - $wordsize`"-bit environment."
  echo ''
  echo 'Running "./make_windows_releases-finish".'
  echo ''
  ./make_windows_releases-finish
fi