replace vs2008 directory with vs2010 directory (fixes cygwin build)

This commit is contained in:
Zdenko Podobný 2015-07-20 20:35:52 +02:00
parent 5cc948d28b
commit 301eaeca5f
5 changed files with 21 additions and 21 deletions

View File

@ -42,7 +42,7 @@ libtesseract_ccutil_la_SOURCES = \
params.cpp universalambigs.cpp params.cpp universalambigs.cpp
if T_WIN if T_WIN
AM_CPPFLAGS += -I$(top_srcdir)/vs2008/port -DWINDLLNAME=\"lib@GENERIC_LIBRARY_NAME@\" AM_CPPFLAGS += -I$(top_srcdir)/vs2010/port -DWINDLLNAME=\"lib@GENERIC_LIBRARY_NAME@\"
noinst_HEADERS += ../vs2010/port/strtok_r.h noinst_HEADERS += ../vs2010/port/strtok_r.h
libtesseract_ccutil_la_SOURCES += ../vs2010/port/strtok_r.cpp libtesseract_ccutil_la_SOURCES += ../vs2010/port/strtok_r.cpp
endif endif

View File

@ -82,7 +82,7 @@ host_triplet = @host@
@NO_TESSDATA_PREFIX_FALSE@am__append_1 = -DTESSDATA_PREFIX=@datadir@/ @NO_TESSDATA_PREFIX_FALSE@am__append_1 = -DTESSDATA_PREFIX=@datadir@/
@VISIBILITY_TRUE@am__append_2 = -fvisibility=hidden -fvisibility-inlines-hidden @VISIBILITY_TRUE@am__append_2 = -fvisibility=hidden -fvisibility-inlines-hidden
@VISIBILITY_TRUE@am__append_3 = -DTESS_EXPORTS @VISIBILITY_TRUE@am__append_3 = -DTESS_EXPORTS
@T_WIN_TRUE@am__append_4 = -I$(top_srcdir)/vs2008/port -DWINDLLNAME=\"lib@GENERIC_LIBRARY_NAME@\" @T_WIN_TRUE@am__append_4 = -I$(top_srcdir)/vs2010/port -DWINDLLNAME=\"lib@GENERIC_LIBRARY_NAME@\"
@T_WIN_TRUE@am__append_5 = ../vs2010/port/strtok_r.h @T_WIN_TRUE@am__append_5 = ../vs2010/port/strtok_r.h
@T_WIN_TRUE@am__append_6 = ../vs2010/port/strtok_r.cpp @T_WIN_TRUE@am__append_6 = ../vs2010/port/strtok_r.cpp
subdir = ccutil subdir = ccutil

View File

@ -28,7 +28,7 @@ import ctypes
lang = "eng" lang = "eng"
filename = "../phototest.tif" filename = "../phototest.tif"
libpath = "/usr/local/lib64/" libpath = "/usr/local/lib64/"
libpath_w = "../vs2008/DLL_Release/" libpath_w = "../vs2010/DLL_Release/"
TESSDATA_PREFIX = os.environ.get('TESSDATA_PREFIX') TESSDATA_PREFIX = os.environ.get('TESSDATA_PREFIX')
if not TESSDATA_PREFIX: if not TESSDATA_PREFIX:
TESSDATA_PREFIX = "../" TESSDATA_PREFIX = "../"

View File

@ -828,7 +828,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is # Note that relative paths are relative to the directory from which doxygen is
# run. # run.
EXCLUDE = vs2008 EXCLUDE = vs2010
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded # directories that are symbolic links (a Unix file system feature) are excluded

View File

@ -3,7 +3,7 @@ from __future__ import print_function
from builtins import input from builtins import input
""" """
tesshelper.py -- Utility operations to compare, report stats, and copy tesshelper.py -- Utility operations to compare, report stats, and copy
public headers for tesseract 3.0x VS2008 Project public headers for tesseract 3.0x VS2010 Project
$RCSfile: tesshelper.py,v $ $Revision: 7ca575b377aa $ $Date: 2012/03/07 17:26:31 $ $RCSfile: tesshelper.py,v $ $Revision: 7ca575b377aa $ $Date: 2012/03/07 17:26:31 $
""" """
@ -31,14 +31,14 @@ Format for a .vcproj file entry:
epilogStr = r""" epilogStr = r"""
Examples: Examples:
Assume that tesshelper.py is in c:\buildfolder\tesseract-3.02\vs2008, Assume that tesshelper.py is in c:\buildfolder\tesseract-3.02\vs2010,
which is also the current directory. Then, which is also the current directory. Then,
python tesshelper .. compare python tesshelper .. compare
will compare c:\buildfolder\tesseract-3.02 "library" directories to the will compare c:\buildfolder\tesseract-3.02 "library" directories to the
libtesseract Project libtesseract Project
(c:\buildfolder\tesseract-3.02\vs2008\libtesseract\libtesseract.vcproj). (c:\buildfolder\tesseract-3.02\vs2010\libtesseract\libtesseract.vcproj).
python tesshelper .. report python tesshelper .. report
@ -52,7 +52,7 @@ c:\buildfolder\include.
python tesshelper .. clean python tesshelper .. clean
will clean the vs2008 folder of all build directories, and .user, .suo, will clean the vs2010 folder of all build directories, and .user, .suo,
.ncb, and other temp files. .ncb, and other temp files.
""" """
@ -70,7 +70,7 @@ import sys
# ==================================================================== # ====================================================================
VERSION = "1.0 %s" % "$Date: 2012/03/07 17:26:31 $".split()[1] VERSION = "1.0 %s" % "$Date: 2012/03/07 17:26:31 $".split()[1]
PROJ_SUBDIR = r"vs2008\libtesseract" PROJ_SUBDIR = r"vs2010\libtesseract"
PROJFILE = "libtesseract.vcproj" PROJFILE = "libtesseract.vcproj"
NEWHEADERS_FILENAME = "newheaders.txt" NEWHEADERS_FILENAME = "newheaders.txt"
@ -209,7 +209,7 @@ def tessCompare(tessDir):
def tessReport(tessDir): def tessReport(tessDir):
"""Report summary stats on "sub-library" files and libtesseract Project file.""" """Report summary stats on "sub-library" files and libtesseract Project file."""
vs2010Dir = os.path.join(tessDir, "vs2008") vs2010Dir = os.path.join(tessDir, "vs2010")
libTessDir = os.path.join(vs2010Dir, "libtesseract") libTessDir = os.path.join(vs2010Dir, "libtesseract")
libProjectFile = os.path.join(libTessDir,"libtesseract.vcproj") libProjectFile = os.path.join(libTessDir,"libtesseract.vcproj")
tessAbsDir = os.path.abspath(tessDir) tessAbsDir = os.path.abspath(tessDir)
@ -253,7 +253,7 @@ def tessReport(tessDir):
print(" %5d %3d %3d" % (totalFiles, totalH, totalCPP)) print(" %5d %3d %3d" % (totalFiles, totalH, totalCPP))
print() print()
print('Summary stats for VS2008 Project "%s"' % libProjectFile) print('Summary stats for VS2010 Project "%s"' % libProjectFile)
print(" %5d %s" %(len(projectHFiles), "Header files")) print(" %5d %s" %(len(projectHFiles), "Header files"))
print(" %5d %s" % (len(projectCFiles), "Source files")) print(" %5d %s" % (len(projectCFiles), "Source files"))
print(" %5d %s" % (len(projectRFiles), "Resource files")) print(" %5d %s" % (len(projectRFiles), "Resource files"))
@ -359,9 +359,9 @@ def tessCopy(tessDir, includeDir):
} }
extraFilesSet = { extraFilesSet = {
#r"vs2008\include\stdint.h", #r"vs2010\include\stdint.h",
r"vs2008\include\leptonica_versionnumbers.vsprops", r"vs2010\include\leptonica_versionnumbers.vsprops",
r"vs2008\include\tesseract_versionnumbers.vsprops", r"vs2010\include\tesseract_versionnumbers.vsprops",
} }
tessIncludeDir = os.path.join(includeDir, "tesseract") tessIncludeDir = os.path.join(includeDir, "tesseract")
@ -380,21 +380,21 @@ def tessCopy(tessDir, includeDir):
# ==================================================================== # ====================================================================
def tessClean(tessDir): def tessClean(tessDir):
'''Clean vs2008 folder of all build directories and certain temp files.''' '''Clean vs2010 folder of all build directories and certain temp files.'''
vs2010Dir = os.path.join(tessDir, "vs2008") vs2010Dir = os.path.join(tessDir, "vs2010")
vs2008AbsDir = os.path.abspath(vs2010Dir) vs2010AbsDir = os.path.abspath(vs2010Dir)
answer = eval(input( answer = eval(input(
'Are you sure you want to clean the\n "%s" folder (Yes/No) [No]? ' % 'Are you sure you want to clean the\n "%s" folder (Yes/No) [No]? ' %
vs2008AbsDir)) vs2010AbsDir))
if answer.lower() not in ("yes",): if answer.lower() not in ("yes",):
return return
answer = eval(input('Only list the items to be deleted (Yes/No) [Yes]? ')) answer = eval(input('Only list the items to be deleted (Yes/No) [Yes]? '))
answer = answer.strip() answer = answer.strip()
listOnly = answer.lower() not in ("no",) listOnly = answer.lower() not in ("no",)
for rootDir, dirs, files in os.walk(vs2008AbsDir): for rootDir, dirs, files in os.walk(vs2010AbsDir):
for buildDir in ("LIB_Release", "LIB_Debug", "DLL_Release", "DLL_Debug"): for buildDir in ("LIB_Release", "LIB_Debug", "DLL_Release", "DLL_Debug"):
if buildDir in dirs: if buildDir in dirs:
dirs.remove(buildDir) dirs.remove(buildDir)
@ -405,7 +405,7 @@ def tessClean(tessDir):
print("Removing: %s" % absBuildDir) print("Removing: %s" % absBuildDir)
shutil.rmtree(absBuildDir) shutil.rmtree(absBuildDir)
if rootDir == vs2008AbsDir: if rootDir == vs2010AbsDir:
for file in files: for file in files:
if file.lower() not in ("tesseract.sln", if file.lower() not in ("tesseract.sln",
"tesshelper.py", "tesshelper.py",
@ -484,7 +484,7 @@ def main ():
parser_copy.set_defaults(func=tessCopy) parser_copy.set_defaults(func=tessCopy)
parser_clean = subparsers.add_parser('clean', parser_clean = subparsers.add_parser('clean',
help="clean vs2008 folder of build folders and .user files") help="clean vs2010 folder of build folders and .user files")
parser_clean.set_defaults(func=tessClean) parser_clean.set_defaults(func=tessClean)
#kludge because argparse has no ability to set default subparser #kludge because argparse has no ability to set default subparser