mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-19 06:53:36 +08:00
Merge branch 'master' of https://github.com/tesseract-ocr/tesseract
This commit is contained in:
commit
af3dd1af06
@ -67,11 +67,11 @@ your question has been asked (and has been answered) many times before...
|
||||
|
||||
## For Developers: Creating a Pull Request
|
||||
|
||||
You should always make sure your changes build and run successfully.
|
||||
You should always make sure your changes build and run successfully.
|
||||
|
||||
For that, your clone needs to have all submodules (`abseil`, `googletest`, `test`) included. To do so, either specify `--recurse-submodules` during the initial clone, or run `git submodule update --init --recursive NAME` for each `NAME` later. If `configure` already created those directories (blocking the clone), remove them first (or `make distclean`), then clone and reconfigure.
|
||||
For that, your clone needs to have all submodules (`abseil`, `googletest`, `test`) included. To do so, either specify `--recurse-submodules` during the initial clone, or run `git submodule update --init --recursive NAME` for each `NAME` later. If `configure` already created those directories (blocking the clone), remove them first (or `make distclean`), then clone and reconfigure.
|
||||
|
||||
Have a look at [the README](./README.md) and [testing README](./test/testing/README.md) and the [wiki page](https://github.com/tesseract-ocr/tesseract/wiki/Compiling-%E2%80%93-GitInstallation#unit-test-builds) on installation.
|
||||
Have a look at [the README](./README.md) and [testing README](./test/testing/README.md) and the [wiki page](https://github.com/tesseract-ocr/tesseract/wiki/Compiling-%E2%80%93-GitInstallation#unit-test-builds) on installation.
|
||||
|
||||
In short, after running `configure` from the build directory of your choice, to build the library and CLI, run `make`. To test it, run `make check`. To build the training tools, run `make training`.
|
||||
|
||||
|
100
sw.cpp
100
sw.cpp
@ -91,39 +91,39 @@ void build(Solution &s)
|
||||
//
|
||||
auto &tesseract = tess.addExecutable("tesseract");
|
||||
tesseract += "src/api/tesseractmain.cpp";
|
||||
tesseract += libtesseract;
|
||||
|
||||
//
|
||||
auto &tessopt = tess.addStaticLibrary("tessopt");
|
||||
tessopt += "src/training/tessopt.*"_rr;
|
||||
tessopt.Public += "training"_id;
|
||||
tessopt.Public += libtesseract;
|
||||
|
||||
//
|
||||
auto &common_training = tess.addStaticLibrary("common_training");
|
||||
common_training +=
|
||||
"src/training/commandlineflags.cpp",
|
||||
"src/training/commandlineflags.h",
|
||||
"src/training/commontraining.cpp",
|
||||
"src/training/commontraining.h";
|
||||
common_training.Public += "training"_id;
|
||||
common_training.Public += tessopt;
|
||||
|
||||
//
|
||||
auto &unicharset_training = tess.addStaticLibrary("unicharset_training");
|
||||
unicharset_training +=
|
||||
"src/training/fileio.*"_rr,
|
||||
"src/training/icuerrorcode.*"_rr,
|
||||
"src/training/icuerrorcode.h",
|
||||
"src/training/lang_model_helpers.*"_rr,
|
||||
"src/training/lstmtester.*"_rr,
|
||||
"src/training/normstrngs.*"_rr,
|
||||
"src/training/unicharset_training_utils.*"_rr,
|
||||
"src/training/validat.*"_rr;
|
||||
unicharset_training.Public += "training"_id;
|
||||
tesseract += libtesseract;
|
||||
|
||||
//
|
||||
auto &tessopt = tess.addStaticLibrary("tessopt");
|
||||
tessopt += "src/training/tessopt.*"_rr;
|
||||
tessopt.Public += "training"_id;
|
||||
tessopt.Public += libtesseract;
|
||||
|
||||
//
|
||||
auto &common_training = tess.addStaticLibrary("common_training");
|
||||
common_training +=
|
||||
"src/training/commandlineflags.cpp",
|
||||
"src/training/commandlineflags.h",
|
||||
"src/training/commontraining.cpp",
|
||||
"src/training/commontraining.h";
|
||||
common_training.Public += "training"_id;
|
||||
common_training.Public += tessopt;
|
||||
|
||||
//
|
||||
auto &unicharset_training = tess.addStaticLibrary("unicharset_training");
|
||||
unicharset_training +=
|
||||
"src/training/fileio.*"_rr,
|
||||
"src/training/icuerrorcode.*"_rr,
|
||||
"src/training/icuerrorcode.h",
|
||||
"src/training/lang_model_helpers.*"_rr,
|
||||
"src/training/lstmtester.*"_rr,
|
||||
"src/training/normstrngs.*"_rr,
|
||||
"src/training/unicharset_training_utils.*"_rr,
|
||||
"src/training/validat.*"_rr;
|
||||
unicharset_training.Public += "training"_id;
|
||||
unicharset_training.Public += common_training;
|
||||
unicharset_training.Public += "org.sw.demo.unicode.icu.i18n"_dep;
|
||||
|
||||
unicharset_training.Public += "org.sw.demo.unicode.icu.i18n"_dep;
|
||||
|
||||
//
|
||||
#define ADD_EXE(n, ...) \
|
||||
auto &n = tess.addExecutable(#n); \
|
||||
@ -145,24 +145,24 @@ void build(Solution &s)
|
||||
ADD_EXE(lstmtraining, unicharset_training);
|
||||
ADD_EXE(set_unicharset_properties, unicharset_training);
|
||||
|
||||
ADD_EXE(text2image, unicharset_training);
|
||||
text2image +=
|
||||
"src/training/boxchar.cpp",
|
||||
"src/training/boxchar.h",
|
||||
"src/training/degradeimage.cpp",
|
||||
"src/training/degradeimage.h",
|
||||
"src/training/icuerrorcode.h",
|
||||
"src/training/ligature_table.cpp",
|
||||
"src/training/ligature_table.h",
|
||||
"src/training/normstrngs.cpp",
|
||||
"src/training/normstrngs.h",
|
||||
"src/training/pango_font_info.cpp",
|
||||
"src/training/pango_font_info.h",
|
||||
"src/training/stringrenderer.cpp",
|
||||
"src/training/stringrenderer.h",
|
||||
"src/training/text2image.cpp",
|
||||
"src/training/tlog.cpp",
|
||||
"src/training/tlog.h",
|
||||
ADD_EXE(text2image, unicharset_training);
|
||||
text2image +=
|
||||
"src/training/boxchar.cpp",
|
||||
"src/training/boxchar.h",
|
||||
"src/training/degradeimage.cpp",
|
||||
"src/training/degradeimage.h",
|
||||
"src/training/icuerrorcode.h",
|
||||
"src/training/ligature_table.cpp",
|
||||
"src/training/ligature_table.h",
|
||||
"src/training/normstrngs.cpp",
|
||||
"src/training/normstrngs.h",
|
||||
"src/training/pango_font_info.cpp",
|
||||
"src/training/pango_font_info.h",
|
||||
"src/training/stringrenderer.cpp",
|
||||
"src/training/stringrenderer.h",
|
||||
"src/training/text2image.cpp",
|
||||
"src/training/tlog.cpp",
|
||||
"src/training/tlog.h",
|
||||
"src/training/util.h";
|
||||
text2image.Public += "org.sw.demo.gnome.pango.pangocairo-1"_dep;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user