Skip to content

Commit

Permalink
Merge pull request #71 from kevincon/master
Browse files Browse the repository at this point in the history
Fixed x86_64 support and updated leptonica to 1.71.
  • Loading branch information
Kevin Conley committed Dec 3, 2014
2 parents 02a9a4a + e960ef7 commit 612bb25
Show file tree
Hide file tree
Showing 17 changed files with 761 additions and 455 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ profile
*.moved-aside
DerivedData
.idea/
leptonica-*
tesseract-*
20 changes: 20 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2014 Daniele Galiotto

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Binary file modified Products/TesseractOCR.framework/Versions/A/Resources/Info.plist
Binary file not shown.
Binary file modified Products/TesseractOCR.framework/Versions/A/TesseractOCR
Binary file not shown.
287 changes: 163 additions & 124 deletions README.md

Large diffs are not rendered by default.

25 changes: 10 additions & 15 deletions TesseractOCR/README_howto_compile_libaries.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,28 @@
# Compiling the .a files your self
# Compiling the .a library files your self


### Step 1 - Prerequisits
In order to compile you need these tools:
- Xcode 5.0.2 (5A3005)
### Step 1 - Prerequisites
First you need to install these tools:

- Xcode 6.1 (6A1052d) with command line tools
- M4
- Autoconf
- Automake
- Libtool


### Step 2 - Download and unzip
Download the source code for `leptonica-1.69` from the internet.
Download the source code for `leptonica-1.71` from the Internet here: http://leptonica.org/source/leptonica-1.71.tar.gz.
Unzip it in this folder.


Download the source code for `tesseract-3.02.02` from the internet.
Download the source code for `tesseract-3.03` from the Internet here: https://tesseract-ocr.googlecode.com/archive/3.03-rc1.tar.gz.
Unzip it in this folder.


### Step 3 - Compile
Run `build_dependencies.sh` from terminal, this compiles first leptonica and then tesseract.

This creates, after few minutes, a folder named `dependencies`.

Run `build_dependencies.sh` from the terminal. This first compiles leptonica and then tesseract for every architecture iOS/simulator uses (arm7 arm7s arm64 i386 x86_64), and then combines the resulting libs into one library file. It does this for both leptonica and tesseract, so the final results of the script are "libtesseract_all.a", "liblept.a", and "include" directories for both leptonica and tesseract. Finally, the script copies these results into the "lib" and "include" directories inside this directory.

### Step 4 - Done
Copy the file `dependencies/lib/liblept.a` and replace `lib/liblept.a`.
Copy the file `dependencies/lib/libtesseract_all.a` and replace `lib/libtesseract_all.a`.
Copy the folder `dependencies/include/leptonica` and replace `include/leptonica`.
Copy the folder `dependencies/include/tesseract` and replace `include/tesseract`.

### Step 4 - Build
Finally, with `Tesseract OCR iOS.xcodeproj` open in Xcode, build the target "TesseractOCRAggregate". This will use the "lib" and "include" directories to create the Tesseract OCR iOS framework.
Loading

0 comments on commit 612bb25

Please sign in to comment.