mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2024-12-25 12:23:59 +00:00
parent
943bb576a9
commit
5bbf27de9c
31
linux/build
31
linux/build
@ -13,4 +13,33 @@ BLD_SOURCES="../src/ccextractor.c $SRC_CCX $SRC_GPAC $SRC_ZLIB $SRC_ZVBI $SRC_LI
|
|||||||
BLD_LINKER="-lm -zmuldefs -l tesseract -l lept -lcurl"
|
BLD_LINKER="-lm -zmuldefs -l tesseract -l lept -lcurl"
|
||||||
|
|
||||||
./pre-build.sh
|
./pre-build.sh
|
||||||
gcc $BLD_FLAGS $BLD_INCLUDE -o ccextractor $BLD_SOURCES $BLD_LINKER
|
|
||||||
|
out=$((LC_ALL=C gcc $BLD_FLAGS $BLD_INCLUDE -o ccextractor $BLD_SOURCES $BLD_LINKER) 2>&1)
|
||||||
|
res=$?
|
||||||
|
if [[ $out == *"gcc: command not found"* ]]
|
||||||
|
then
|
||||||
|
echo "Error: please install gcc";
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ $out == *"curl.h: No such file or directory"* ]]
|
||||||
|
then
|
||||||
|
echo "Error: please install curl development library (libcurl4-gnutls-dev for Debian/Ubuntu)";
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
if [[ $out == *"capi.h: No such file or directory"* ]]
|
||||||
|
then
|
||||||
|
echo "Error: please install tesseract development library (tesseract-ocr-dev for Debian/Ubuntu)";
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
if [[ $out == *"allheaders.h: No such file or directory"* ]]
|
||||||
|
then
|
||||||
|
echo "Error: please install leptonica development library (libleptonica-dev for Debian/Ubuntu)";
|
||||||
|
exit 4
|
||||||
|
fi
|
||||||
|
if [[ $res -ne 0 ]] # Unknown error
|
||||||
|
then
|
||||||
|
echo "Compiled with errors"
|
||||||
|
>&2 echo "$out"
|
||||||
|
exit 5
|
||||||
|
fi
|
||||||
|
echo "Compiled successful";
|
||||||
|
Loading…
Reference in New Issue
Block a user