2018-10-11 17:35:07 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
wordsize=$1
|
|
|
|
tool=$2
|
|
|
|
|
|
|
|
if [[ $tool == mingw ]]; then
|
|
|
|
pacman -Sy --noconfirm make base-devel tar zip unzip
|
2020-10-16 15:29:48 +00:00
|
|
|
if [ -d /c/msys64 ]; then
|
|
|
|
PATH="/c/msys64/mingw$wordsize/bin:$PATH"
|
2018-10-11 17:35:07 +00:00
|
|
|
else
|
2020-10-16 15:29:48 +00:00
|
|
|
if [[ $wordsize == 64 ]]; then
|
|
|
|
pacman -Sy --noconfirm mingw-w64-x86_64-toolchain
|
|
|
|
else
|
|
|
|
pacman -Sy --noconfirm mingw-w64-i686-toolchain
|
|
|
|
fi
|
|
|
|
PATH="/c/tools/msys64/mingw$wordsize/bin:$PATH"
|
2018-10-11 17:35:07 +00:00
|
|
|
fi
|
|
|
|
g++ -v
|
|
|
|
elif [[ $tool == msvc ]]; then
|
|
|
|
cl
|
|
|
|
fi
|
2021-12-18 16:19:20 +00:00
|
|
|
unzip doc.zip
|
2018-10-11 17:35:07 +00:00
|
|
|
unzip qpdf-external-libs-bin.zip
|
|
|
|
cwd=`pwd`
|
|
|
|
PATH=$cwd/libqpdf/build:$PATH
|
|
|
|
|
|
|
|
installdir=install-$tool$wordsize
|
|
|
|
rm -rf $installdir
|
2020-10-24 23:31:09 +00:00
|
|
|
./config-$tool --enable-show-failed-test-output
|
2018-12-21 22:25:23 +00:00
|
|
|
make -j$(nproc) -k
|
2018-10-16 15:10:33 +00:00
|
|
|
make -k check
|
2018-10-11 17:35:07 +00:00
|
|
|
make install
|
|
|
|
|
|
|
|
v=`(cd $installdir; ls -d qpdf-*)`
|
|
|
|
cp -p README-windows-install.txt $installdir/$v/README.txt
|
2018-10-12 12:10:08 +00:00
|
|
|
mkdir distribution
|
|
|
|
(cd $installdir; zip -r ../distribution/$v-bin-$tool$wordsize-ci.zip $v)
|
|
|
|
sha256sum distribution/*
|