1#!/bin/sh 2# TESS_DATA should refer to the directory in which Tesseract data files are placed. 3#TESS_DATA=~/tesseract 4#TESS_DATA=/usr/local/tesseract 5TESS_DATA=. 6 7# TESS_BIN should refer to the directory in which Tesseract executable files are placed. 8TESS_BIN=${TESS_DATA}/bin_unix 9 10# TESS_OPTIONS contains any command line options you would like to start Tesseract with. 11#TESS_OPTIONS="" 12TESS_OPTIONS="-u${HOME}/.tesseract" 13 14# SYSTEM_NAME should be set to the name of your operating system. 15#SYSTEM_NAME=Linux 16SYSTEM_NAME=`uname -s` 17 18# MACHINE_NAME should be set to the name of your processor. 19#MACHINE_NAME=i686 20MACHINE_NAME=`uname -m` 21 22case ${SYSTEM_NAME} in 23Linux) 24 SYSTEM_NAME=linux_ 25 ;; 26*) 27 SYSTEM_NAME=unknown_ 28 ;; 29esac 30 31case ${MACHINE_NAME} in 32i486|i586|i686) 33 MACHINE_NAME= 34 ;; 35x86_64|amd64) 36 MACHINE_NAME=64_ 37 ;; 38*) 39 if [ ${SYSTEM_NAME} != native_ ] 40 then 41 SYSTEM_NAME=native_ 42 fi 43 MACHINE_NAME= 44 ;; 45esac 46 47if [ -x ${TESS_BIN}/native_client ] 48then 49 SYSTEM_NAME=native_ 50 MACHINE_NAME= 51fi 52 53if [ -x ${TESS_BIN}/${SYSTEM_NAME}${MACHINE_NAME}client ] 54then 55 cd ${TESS_DATA} 56 exec ${TESS_BIN}/${SYSTEM_NAME}${MACHINE_NAME}client ${TESS_OPTIONS} "$@" 57else 58 echo "Your platform does not have a pre-compiled Tesseract client." 59 echo "Please follow the following steps to build a native client:" 60 echo "1) Ensure you have the SDL2, SDL2-image, SDL2-mixer, and OpenGL libraries installed." 61 echo "2) Type \"make -C src install\"." 62 echo "3) If the build succeeds, run this script again." 63 exit 1 64fi 65 66