Skip to content

Commit 5006620

Browse files
kevinconKirill Makankov
authored andcommitted
Removed viewer from upstream tesseract lib.
I also added the "-all_load" flag to the Template Framework Project target as well as the TestsProject target and I can confirm that both build successfully and all the tests run okay. But I didn't add it to the TestsProjectTests target because I wasn't sure it belongs there. Feel free to add it there as well if you think it's needed.
1 parent 5befac2 commit 5006620

File tree

8 files changed

+8
-4
lines changed

8 files changed

+8
-4
lines changed

Template Framework Project/Template Framework Project.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@
311311
OTHER_LDFLAGS = (
312312
"-lstdc++",
313313
"-ObjC",
314+
"-all_load",
314315
);
315316
PRODUCT_NAME = "$(TARGET_NAME)";
316317
WRAPPER_EXTENSION = app;
@@ -335,6 +336,7 @@
335336
OTHER_LDFLAGS = (
336337
"-lstdc++",
337338
"-ObjC",
339+
"-all_load",
338340
);
339341
PRODUCT_NAME = "$(TARGET_NAME)";
340342
WRAPPER_EXTENSION = app;

TesseractOCR/build_dependencies.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ make clean 2> /dev/null
162162
make distclean 2> /dev/null
163163
eval "setenv_${archs[$n]}"
164164
bash autogen.sh
165-
LIBLEPT_HEADERSDIR=$GLOBAL_OUTDIR/include ./configure --host="${arch_names[$n]}" --enable-shared=no
165+
LIBLEPT_HEADERSDIR=$GLOBAL_OUTDIR/include ./configure --host="${arch_names[$n]}" --enable-shared=no --disable-graphics
166166
make -j12
167167
for i in `find . -name "lib*.a" | grep -v $LOCAL_OUTDIR`; do cp -rvf $i "$LOCAL_OUTDIR/${archs[$n]}"; done
168168
merge_libfiles "$LOCAL_OUTDIR/${archs[$n]}" libtesseract_all.a

TesseractOCR/include/tesseract/config_auto.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/* #undef AC_APPLE_UNIVERSAL_BUILD */
1212

1313
/* Disable graphics */
14-
/* #undef GRAPHICS_DISABLED */
14+
#define GRAPHICS_DISABLED /**/
1515

1616
/* Define to 1 if you have the <cairo/cairo-version.h> header file. */
1717
/* #undef HAVE_CAIRO_CAIRO_VERSION_H */

TesseractOCR/include/tesseract/genericvector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ inline bool LoadDataFromFile(const STRING& filename,
335335
size_t size = ftell(fp);
336336
fseek(fp, 0, SEEK_SET);
337337
// Pad with a 0, just in case we treat the result as a string.
338-
data->init_to_size((int) size + 1, 0);
338+
data->init_to_size(size + 1, 0);
339339
bool result = fread(&(*data)[0], 1, size, fp) == size;
340340
fclose(fp);
341341
return result;

TesseractOCR/include/tesseract/helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
// Remove newline (if any) at the end of the string.
3232
inline void chomp_string(char *str) {
33-
int last_index = (int) strlen(str) - 1;
33+
int last_index = strlen(str) - 1;
3434
while (last_index >= 0 &&
3535
(str[last_index] == '\n' || str[last_index] == '\r')) {
3636
str[last_index--] = '\0';

TesseractOCR/lib/liblept.a

0 Bytes
Binary file not shown.
-1.2 MB
Binary file not shown.

TestsProject/TestsProject.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@
488488
OTHER_LDFLAGS = (
489489
"-lstdc++",
490490
"-ObjC",
491+
"-all_load",
491492
);
492493
PRODUCT_NAME = "$(TARGET_NAME)";
493494
};
@@ -508,6 +509,7 @@
508509
OTHER_LDFLAGS = (
509510
"-lstdc++",
510511
"-ObjC",
512+
"-all_load",
511513
);
512514
PRODUCT_NAME = "$(TARGET_NAME)";
513515
};

0 commit comments

Comments
 (0)