2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 10:58:58 +00:00
qpdf/build-scripts/build-windows

38 lines
944 B
Plaintext
Raw Normal View History

#!/bin/bash
set -ex
cd $(dirname $0)/..
wordsize=$1
tool=$2
if [[ $tool == mingw ]]; then
pacman -Sy --noconfirm make base-devel tar zip unzip
if [ ! -x /c/msys64/mingw$wordsize/bin/g++.exe ]; then
if [[ $wordsize == 64 ]]; then
pacman -Sy --noconfirm mingw-w64-x86_64-toolchain
else
pacman -Sy --noconfirm mingw-w64-i686-toolchain
fi
fi
PATH="/c/msys64/mingw$wordsize/bin:$PATH"
g++ -v
elif [[ $tool == msvc ]]; then
cl
fi
unzip doc.zip
unzip qpdf-external-libs-bin.zip
cwd=`pwd`
PATH=$cwd/libqpdf/build:$PATH
installdir=install-$tool$wordsize
rm -rf $installdir
./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
make install
v=`(cd $installdir; ls -d qpdf-*)`
cp -p README-windows-install.txt $installdir/$v/README.txt
mkdir distribution
(cd $installdir; zip -r ../distribution/$v-bin-$tool$wordsize-ci.zip $v)
sha256sum distribution/*