Skip to content

Commit

Permalink
replace vs2008 directory with vs2010 directory (fixes cygwin build)
Browse files Browse the repository at this point in the history
  • Loading branch information
zdenop committed Jul 20, 2015
1 parent 5cc948d commit 301eaec
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion ccutil/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ libtesseract_ccutil_la_SOURCES = \
params.cpp universalambigs.cpp

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
libtesseract_ccutil_la_SOURCES += ../vs2010/port/strtok_r.cpp
endif
2 changes: 1 addition & 1 deletion ccutil/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ host_triplet = @host@
@NO_TESSDATA_PREFIX_FALSE@am__append_1 = -DTESSDATA_PREFIX=@datadir@/
@VISIBILITY_TRUE@am__append_2 = -fvisibility=hidden -fvisibility-inlines-hidden
@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_6 = ../vs2010/port/strtok_r.cpp
subdir = ccutil
Expand Down
2 changes: 1 addition & 1 deletion contrib/tesseract-c_api-demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
lang = "eng"
filename = "../phototest.tif"
libpath = "/usr/local/lib64/"
libpath_w = "../vs2008/DLL_Release/"
libpath_w = "../vs2010/DLL_Release/"
TESSDATA_PREFIX = os.environ.get('TESSDATA_PREFIX')
if not TESSDATA_PREFIX:
TESSDATA_PREFIX = "../"
Expand Down
2 changes: 1 addition & 1 deletion doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.

EXCLUDE = vs2008
EXCLUDE = vs2010

# 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
Expand Down
34 changes: 17 additions & 17 deletions vs2010/tesshelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from builtins import input
"""
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 $
"""
Expand Down Expand Up @@ -31,14 +31,14 @@
epilogStr = r"""
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,
python tesshelper .. compare
will compare c:\buildfolder\tesseract-3.02 "library" directories to the
libtesseract Project
(c:\buildfolder\tesseract-3.02\vs2008\libtesseract\libtesseract.vcproj).
(c:\buildfolder\tesseract-3.02\vs2010\libtesseract\libtesseract.vcproj).
python tesshelper .. report
Expand All @@ -52,7 +52,7 @@
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.
"""
Expand All @@ -70,7 +70,7 @@
# ====================================================================

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"

NEWHEADERS_FILENAME = "newheaders.txt"
Expand Down Expand Up @@ -209,7 +209,7 @@ def tessCompare(tessDir):
def tessReport(tessDir):
"""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")
libProjectFile = os.path.join(libTessDir,"libtesseract.vcproj")
tessAbsDir = os.path.abspath(tessDir)
Expand Down Expand Up @@ -253,7 +253,7 @@ def tessReport(tessDir):
print(" %5d %3d %3d" % (totalFiles, totalH, totalCPP))

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(projectCFiles), "Source files"))
print(" %5d %s" % (len(projectRFiles), "Resource files"))
Expand Down Expand Up @@ -359,9 +359,9 @@ def tessCopy(tessDir, includeDir):
}

extraFilesSet = {
#r"vs2008\include\stdint.h",
r"vs2008\include\leptonica_versionnumbers.vsprops",
r"vs2008\include\tesseract_versionnumbers.vsprops",
#r"vs2010\include\stdint.h",
r"vs2010\include\leptonica_versionnumbers.vsprops",
r"vs2010\include\tesseract_versionnumbers.vsprops",
}

tessIncludeDir = os.path.join(includeDir, "tesseract")
Expand All @@ -380,21 +380,21 @@ def tessCopy(tessDir, includeDir):
# ====================================================================

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")
vs2008AbsDir = os.path.abspath(vs2010Dir)
vs2010Dir = os.path.join(tessDir, "vs2010")
vs2010AbsDir = os.path.abspath(vs2010Dir)

answer = eval(input(
'Are you sure you want to clean the\n "%s" folder (Yes/No) [No]? ' %
vs2008AbsDir))
vs2010AbsDir))
if answer.lower() not in ("yes",):
return
answer = eval(input('Only list the items to be deleted (Yes/No) [Yes]? '))
answer = answer.strip()
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"):
if buildDir in dirs:
dirs.remove(buildDir)
Expand All @@ -405,7 +405,7 @@ def tessClean(tessDir):
print("Removing: %s" % absBuildDir)
shutil.rmtree(absBuildDir)

if rootDir == vs2008AbsDir:
if rootDir == vs2010AbsDir:
for file in files:
if file.lower() not in ("tesseract.sln",
"tesshelper.py",
Expand Down Expand Up @@ -484,7 +484,7 @@ def main ():
parser_copy.set_defaults(func=tessCopy)

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)

#kludge because argparse has no ability to set default subparser
Expand Down

0 comments on commit 301eaec

Please sign in to comment.