提交 369fabb7 编写于 作者: Z Zdenko Podobný

fix filemode;

update autotools and distribution script to repository changes;
ignore doxygen generated files and langauge data files;
上级 3c21c149
......@@ -23,6 +23,7 @@ libtool
stamp-h1
tesseract.pc
config_auto.h
doc/html/*
api/tesseract
training/ambiguous_words
training/classifier_tester
......@@ -46,3 +47,7 @@ training/wordlist2dawg
*.Plo
*.a
# tessdata
*.cube.*
*.tesseract_cube.*
*.traineddata
\ No newline at end of file
autotools (LINUX/UNIX...)
======================
If you have checked out Tesseract from Subversion, you must generate the
configure script.
If you have checked out Tesseract from Subversion, you must generate
the configure script.
If you have tesseract 3.0x installation in your system, please remove it
before new build.
Known depencies for training tools (excluding leptonica):
* compiler with c++ support
* pango-devel
* cairo-devel
* icu-devel
So, the steps for making Tesseract are:
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
$ sudo make install-langs
$ make training
$ sudo make training-install
'sudo make install-langs' or 'sudo make install LANGS=' will install all
available language data files in tessdata directory.
If you want to install just few of them than run:
$ sudo make install-langs LANGS="eng ara deu"
It will install only English, Arabic and German language datafiles (if
they are present in tessdata directory)
$ sudo make install LANGS="eng ara deu"
will install tesseract library, tesseract programs and English, Arabic
and German language datafiles.
You need to install at least English langugage data file to TESSDATA_PREFIX
directory. All langugage data files can be retrieved from git repository:
$ git clone https://code.google.com/p/tesseract-ocr.tessdata/ tessdata
To compile ScrollView.jar you need to download piccolo2d-core-3.0.jar
and piccolo2d-extras-3.0.jar[1] and place them to tesseract/java.
......
......@@ -18,7 +18,7 @@ endif
SUBDIRS = ccutil viewer cutil opencl ccstruct dict classify wordrec neural_networks/runtime textord cube ccmain api . tessdata doc
EXTRA_DIST = eurotext.tif phototest.tif ReleaseNotes \
EXTRA_DIST = ReleaseNotes \
aclocal.m4 config configure.ac autogen.sh contrib \
tesseract.pc.in $(TRAINING_SUBDIR) java doc testing
......@@ -34,31 +34,12 @@ dist-hook:
rm -rf `find $(distdir) -name .svn`
rm -rf `find $(distdir) -name .git`
rm -rf `find $(distdir) -name .deps`
# 'make install' will install only libraries and programs (no language
# data files)
# 'make install LANGS=' will install libraries, programs and all
# language datafiles in tessdata/
# 'make install LANGS="eng ara deu"' will install libraries, programs
# English, Arabic and German language datafiles if they are present
# in tessdata/
# 'make install-langs LANGS="eng ara deu"' will install only English,
# Arabic and German language datafiles if they are present
# in tessdata/
install-data-hook:
@if test $${LANGS+defined}; then \
if test "$${LANGS}" == ""; then \
echo ____All language files will be installed; \
else \
echo ___Folowing language files will be installed: "$$LANGS"; \
fi; \
cd "$(top_builddir)/tessdata" && $(MAKE) install-langs LANG="${LANGS}"; \
else \
echo No language file is installed.; \
fi;
install-langs:
@cd "$(top_builddir)/tessdata" && $(MAKE) $@
rm -rf `find $(distdir) -name .libs`
rm -rf `find $(distdir) -name *.o`
rm -rf `find $(distdir) -name *.lo`
rm -rf `find $(distdir) -name *.la`
rm -rf `find $(distdir)/training -executable -type f`
rm -rf $(distdir)/doc/html/*
ScrollView.jar:
@cd "$(top_builddir)/java" && $(MAKE) $@
......
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
#!/bin/bash
# Requirement: tesseract directory name should be "tesseract-ocr"
source_dir=${PWD##*/}
tess_ver=3.02
src_min_ver=.02
ver=$source_dir-$tess_ver
excld="exclude.txt"
cd ..
echo Output for $source_dir is in `pwd` ...
# create language files packages
if [ -f $excld ]
then
echo Removing $excld...
rm -f $excld
fi
for l in $source_dir/tessdata/*.traineddata
do
filename=`basename "$l"`
lang=${filename%.*}
echo Creating language package for `basename "$l"`...
chmod 644 $source_dir/tessdata/*$lang*
tar --group root --owner root -chozf $ver.`basename "$l" .traineddata`.tar.gz $source_dir/tessdata/*$lang*
echo $source_dir/tessdata/*$lang* | tr " " "\n" >>$excld
done
# Windows build relevant files
name=$ver-win_vs2008
# Let's be nice and use common windows packager ;-)
zip -9 -r --exclude=*.svn* --exclude=*strtok_r* $name.zip $source_dir/vs2008/
# create linux source package
echo Creating linux source package $ver$src_min_ver.tar.gz ...
tar -chof $ver$src_min_ver.tar --exclude=.svn --exclude=debian --exclude=autom4te.cache --exclude=doc/html --exclude=po/ --exclude=m4/ --exclude=makemoredists --exclude=vs2008 -exclude=INSTALL.SVN -X $excld $source_dir/*
#workaround to include strtok_r from vs2008 for mingw
tar -rof $ver$src_min_ver.tar $source_dir/vs2008/port/strtok_r.*
gzip $ver$src_min_ver.tar
# create doc and package doc
cd $source_dir
doxygen doc/Doxyfile
cd ..
tar --group root --owner root -chozf $ver-doc-html.tar.gz $source_dir/doc/html/*
rm -f $excld
cd $source_dir
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
文件模式从 100755 更改为 100644
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册