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
|
#!/bin/bash
if ! [ -x "$(command -v qmake)" ]; then
if ! [ -x "$(command -v qmake5)" ]; then
echo 'Error: qmake or qmake5 is not installed.' >&2
exit 1
else
QMAKE_EXE=qmake5
fi
else
QMAKE_EXE=qmake
fi
if ! [ -x "$(command -v make)" ]; then
echo 'Error: make is not installed.' >&2
exit 1
fi
RELATIVE_PATH=`dirname "$BASH_SOURCE"`
cd "$RELATIVE_PATH"
cd ext
if ! ./build_local_libaom_libavif.sh; then
echo 'Failed to build static local dependencies!' >&2
exit 1
fi
cd ..
$QMAKE_EXE qt-avif-image-plugin_local-libavif.pro
if ! [ -f Makefile ]; then
echo 'qmake failed to produce Makefile' >&2
exit 1
fi
make
if [ $? -eq 0 ]; then
echo "SUCCESS! in order to install libqavif.so type as root:"
echo "make install"
exit 0
else
echo 'Failed to build libqavif.so' >&2
exit 1
fi
|