Skip to content

Commit

Permalink
Update to support Tesseract v3.02.02 and NDK r8d. Fix formatting in T…
Browse files Browse the repository at this point in the history
…essBaseAPI.
  • Loading branch information
alanv committed Jan 29, 2013
1 parent 2ce8531 commit bde649c
Show file tree
Hide file tree
Showing 8 changed files with 1,064 additions and 26 deletions.
14 changes: 7 additions & 7 deletions tesseract-android-tools/README
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ To download the latest versions of these libraries and build this project, run
the following commands in the terminal:

cd <project-directory>
curl -O http://tesseract-ocr.googlecode.com/files/tesseract-3.01.tar.gz
curl -O https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.02.tar.gz
curl -O http://leptonica.googlecode.com/files/leptonica-1.69.tar.gz
tar -zxvf tesseract-3.01.tar.gz
tar -zxvf tesseract-ocr-3.02.02.tar.gz
tar -zxvf leptonica-1.69.tar.gz
rm -f tesseract-3.01.tar.gz
rm -f tesseract-ocr-3.02.02.tar.gz
rm -f leptonica-1.69.tar.gz
mv tesseract-3.01 jni/com_googlecode_tesseract_android/src
mv tesseract-3.02.02 jni/com_googlecode_tesseract_android/src
mv leptonica-1.69 jni/com_googlecode_leptonica_android/src
ndk-build -j8
android update project --path .
Expand All @@ -26,9 +26,9 @@ To download the English language files for Tesseract and copy them to your
device's external storage, run the following commands in the terminal:

cd <project-directory>
curl -O http://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.01.eng.tar.gz
tar -zxvf tesseract-ocr-3.01.eng.tar.gz
rm -f tesseract-ocr-3.01.eng.tar.gz
curl -O http://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.eng.tar.gz
tar -zxvf tesseract-ocr-3.02.eng.tar.gz
rm -f tesseract-ocr-3.02.eng.tar.gz
mkdir data
mv tesseract-ocr data/tesseract
adb push data/ /sdcard/
Expand Down
10 changes: 10 additions & 0 deletions tesseract-android-tools/dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
curl -O https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.02.tar.gz
curl -O http://leptonica.googlecode.com/files/leptonica-1.69.tar.gz
tar -zxvf tesseract-ocr-3.02.02.tar.gz
tar -zxvf leptonica-1.69.tar.gz
rm -f tesseract-ocr-3.02.02.tar.gz
rm -f leptonica-1.69.tar.gz
mv tesseract-ocr jni/com_googlecode_tesseract_android/src
mv leptonica-1.69 jni/com_googlecode_leptonica_android/src
echo You may now run ndk-build to generate shared libraries.
2 changes: 1 addition & 1 deletion tesseract-android-tools/jni/Application.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_STL := gnustl_static
APP_ABI := armeabi armeabi-v7a x86 # mips has problems with gnustl_static
APP_ABI := armeabi armeabi-v7a x86 mips
APP_OPTIM := release
APP_CPPFLAGS += -fexceptions -frtti
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ LOCAL_CFLAGS := \
-include ctype.h \
-include unistd.h \

# missing glibc functions

ifneq ($(TARGET_SIMULATOR),true)
LOCAL_SRC_FILES += \
glibc/glob.c
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/glibc
endif

# jni

LOCAL_SRC_FILES += \
Expand Down
Loading

0 comments on commit bde649c

Please sign in to comment.