forked from sikuli/sikuli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-mac.txt
78 lines (58 loc) · 2.37 KB
/
build-mac.txt
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
= How To Build Sikuli on Mac OS X =
Prerequisite:
XCode
CMake 2.8+
OpenCV 2.1+
Tesseract-OCR 2.04 + English language data (3.0 won't work),
SWIG 1.3+
The path to these dependent libraries can be set in cmake_modules/common.cmake.
You may need to add appropriate paths on your machine if cmake can not find
the libraries automatically.
CMake, SWIG and Tesseract-OCR can be installed with MacPorts.
(http://www.macports.org/) However, if you would like to build a universal
binary (x86_64 + i386) of Sikuli, you need the patch included in the end
of this file to fix the tesseract-ocr in MacPorts.
In addition, we strongly recommend to download and compile OpenCV from its
official source instead of using the MacPorts version.
Assume you are in the top directory of Sikuli's source tree. You can
build Sikuli IDE and Sikuli Script with the following steps.
0. Open the Terminal.app
1. make a "build" directory in sikuli-script/
mkdir sikuli-script/build
2. generate makefiles with CMake
cd sikuli-script/build
cmake ..
3. build sikuli-script
make
4. make a "build" directory in sikuli-ide/
cd ../.. # go back to the top directory
mkdir sikuli-ide/build
5. generate makefiles of Sikuli-IDE with CMake
cd sikuli-ide/build
cmake ..
6. generate a release package of sikuli-ide.
make package
= Tesseract's patch for building a universal binary (i386+x86_64) =
When "port install tesseract +universal" fails, patch the following file and
then do port install again:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org
_release_ports_textproc_tesseract/work/tesseract-2.04/ccmain/Makefile
718c718
< ld -r -o libtesseract_full.o tesseractfull.o \
---
> ld -arch i386 -r -o libtesseract_full_i386.o tesseractfull.o \
729a730,742
> ld -arch x86_64 -r -o libtesseract_full_x86_64.o tesseractfull.o \
> libtesseract_main.a \
> ../textord/libtesseract_textord.a \
> ../pageseg/libtesseract_pageseg.a \
> ../wordrec/libtesseract_wordrec.a \
> ../classify/libtesseract_classify.a \
> ../dict/libtesseract_dict.a \
> ../viewer/libtesseract_viewer.a \
> ../image/libtesseract_image.a \
> ../cutil/libtesseract_cutil.a \
> ../ccstruct/libtesseract_ccstruct.a \
> ../ccutil/libtesseract_ccutil.a
> lipo -create -output libtesseract_full.o libtesseract_full_i386.o libtes
seract_full_x86_64.o