2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-10 23:20:58 +00:00
qpdf/build-scripts/build-windows
Jay Berkenbilt 4e8d21d849 Build Windows releases with openssl; automate external libraries
External libraries for Windows are now built automatically in the
qpdf/external-libs repository and include openssl in addition to zlib
and jpeg. Use these, and update the Windows build to build with the
openssl crypto provider by default. We leave the native crypto
provider enabled in case there is a problem with openssl and also to
continue to exercise that code.
2020-10-25 18:06:16 -04:00

42 lines
1.0 KiB
Bash
Executable File

#!/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 [ -d /c/msys64 ]; then
PATH="/c/msys64/mingw$wordsize/bin:$PATH"
else
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"
fi
g++ -v
elif [[ $tool == msvc ]]; then
cl
fi
if [ -f distfiles/distfiles.zip ]; then
unzip distfiles/distfiles.zip
fi
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
make -j$(nproc) -k
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/*