From 5b23f715634498834f502120417e6d0833a47b3e Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Fri, 16 Dec 2016 08:31:56 +0100 Subject: [PATCH] Remove support for VS2010 It is dropped because of missing C++11 support. CMake can be used instead. Signed-off-by: Stefan Weil --- vs2010/include/leptonica_versionnumbers.props | 42 - vs2010/include/tesseract_versionnumbers.props | 25 - vs2010/libtesseract/libtesseract.rc | 101 -- vs2010/libtesseract/libtesseract.vcxproj | 868 --------- .../libtesseract/libtesseract.vcxproj.filters | 1607 ----------------- vs2010/libtesseract/resource.h | 23 - vs2010/tesseract.sln | 46 - vs2010/tesseract/tesseract.vcxproj | 360 ---- vs2010/tesseract/tesseract.vcxproj.filters | 32 - vs2010/tesshelper.py | 511 ------ vs2010/version.bat | 2 - 11 files changed, 3617 deletions(-) delete mode 100644 vs2010/include/leptonica_versionnumbers.props delete mode 100644 vs2010/include/tesseract_versionnumbers.props delete mode 100644 vs2010/libtesseract/libtesseract.rc delete mode 100644 vs2010/libtesseract/libtesseract.vcxproj delete mode 100644 vs2010/libtesseract/libtesseract.vcxproj.filters delete mode 100644 vs2010/libtesseract/resource.h delete mode 100644 vs2010/tesseract.sln delete mode 100644 vs2010/tesseract/tesseract.vcxproj delete mode 100644 vs2010/tesseract/tesseract.vcxproj.filters delete mode 100644 vs2010/tesshelper.py delete mode 100644 vs2010/version.bat diff --git a/vs2010/include/leptonica_versionnumbers.props b/vs2010/include/leptonica_versionnumbers.props deleted file mode 100644 index f3b3f3f2..00000000 --- a/vs2010/include/leptonica_versionnumbers.props +++ /dev/null @@ -1,42 +0,0 @@ - - - - 416 - 8c - 171 - 1,71,0,0 - 1.71 - 143 - 394 - 125 - - - <_ProjectFileVersion>10.0.40219.1 - - - - $(GIFLIB_VERSION) - - - $(LIBJPEG_VERSION) - - - $(LIBLEPT_VERSION) - - - $(LIBLEPT_VERSION_R) - - - $(LIBLEPT_NUMBER) - - - $(LIBPNG_VERSION) - - - $(LIBTIFF_VERSION) - - - $(ZLIB_VERSION) - - - \ No newline at end of file diff --git a/vs2010/include/tesseract_versionnumbers.props b/vs2010/include/tesseract_versionnumbers.props deleted file mode 100644 index a81cf6a6..00000000 --- a/vs2010/include/tesseract_versionnumbers.props +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - 400 - 4,0,0,0 - 4.00 - - - <_ProjectFileVersion>10.0.40219.1 - - - - $(LIBTESS_VERSION) - - - $(LIBTESS_VERSION_R) - - - $(LIBTESS_NUMBER) - - - \ No newline at end of file diff --git a/vs2010/libtesseract/libtesseract.rc b/vs2010/libtesseract/libtesseract.rc deleted file mode 100644 index 278eb1aa..00000000 --- a/vs2010/libtesseract/libtesseract.rc +++ /dev/null @@ -1,101 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "windows.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 4,0,0,0 - PRODUCTVERSION 4,0,0,0 - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x7L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "FileDescription", "Tesseract OCR library" - VALUE "FileVersion", "3, 5, 0, 0" - VALUE "InternalName", "libtesseract" - VALUE "LegalCopyright", "Copyright (C) 2015 Google, Inc. Licensed under the Apache License, Version 2.0" - VALUE "OriginalFilename", "libtesseract" - VALUE "ProductName", "Tesseract OCR Library" - VALUE "ProductVersion", "3, 5, 0, 0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/vs2010/libtesseract/libtesseract.vcxproj b/vs2010/libtesseract/libtesseract.vcxproj deleted file mode 100644 index 9c05b976..00000000 --- a/vs2010/libtesseract/libtesseract.vcxproj +++ /dev/null @@ -1,868 +0,0 @@ - - - - - DLL_Debug - Win32 - - - DLL_Release - Win32 - - - LIB_Debug - Win32 - - - LIB_OpenCL_Debug - Win32 - - - LIB_OpenCL_Release - Win32 - - - LIB_Release - Win32 - - - - libtesseract304 - {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0} - libtesseract - - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - - - StaticLibrary - MultiByte - - - StaticLibrary - MultiByte - - - StaticLibrary - MultiByte - - - StaticLibrary - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - ..\$(Configuration)\ - ..\$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - false - false - ..\$(Configuration)\ - ..\$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - false - false - ..\$(Configuration)\ - $(Configuration)\ - false - ..\$(Configuration)\ - $(Configuration)\ - false - $(ProjectName)-static-debug - $(ProjectName)-opencl-static-debug - $(ProjectName)-static - $(ProjectName)-opencl-static - $(ProjectName)d - false - true - - - - - - - - %(Outputs) - - - Disabled - ..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;_DEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - OldStyle - Default - 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings) - false - - - $(OutDir)$(TargetName)$(TargetExt) - - - copy library to lib directory - if not exist ..\..\..\lib md ..\..\..\lib -copy "$(TargetPath)" ..\..\..\lib - - - - ..\version.bat - - - GIT_REV - - - - - - - - - %(Outputs) - - - Disabled - $(AMDAPPSDKROOT)\include;$(INTELOCLSDKROOT)\include;..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories) - USE_OPENCL;WIN32;_WINDOWS;_DEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - OldStyle - Default - 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings) - false - - - $(OutDir)$(TargetName)$(TargetExt) - - - copy library to lib directory - if not exist ..\..\..\lib md ..\..\..\lib -copy "$(TargetPath)" ..\..\..\lib - - - - - - - - - - %(Outputs) - - - MaxSpeed - ..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;NDEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - - - Default - 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings) - - - $(OutDir)$(TargetName)$(TargetExt) - - - - - copy library to lib directory - if not exist ..\..\..\lib md ..\..\..\lib -copy "$(TargetPath)" ..\..\..\lib - - - - - - - - - - %(Outputs) - - - MaxSpeed - $(AMDAPPSDKROOT)\include;$(INTELOCLSDKROOT)\include;..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories) - USE_OPENCL;WIN32;_WINDOWS;NDEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - - - Default - 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings) - - - $(OutDir)$(TargetName)$(TargetExt) - - - - - copy library to lib directory - if not exist ..\..\..\lib md ..\..\..\lib -copy "$(TargetPath)" ..\..\..\lib - - - - - - - - - - %(Outputs) - - - Full - ..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;NDEBUG;_USRDLL;_WINDLL;USE_STD_NAMESPACE;TESS_EXPORTS;LIBLEPT_IMPORTS;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - - - Default - 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings) - true - - - ws2_32.lib;user32.lib;liblept$(LIBLEPT_VERSION).lib;libtiff$(LIBTIFF_VERSION)-static-mtdll.lib - $(OutDir)$(TargetName)$(TargetExt) - $(LIBTESS_NUMBER) - ..\..\..\lib;%(AdditionalLibraryDirectories) - UseLinkTimeCodeGeneration - true - true - - - copy library to lib directory - if not exist ..\..\..\lib md ..\..\..\lib -copy "$(TargetPath)" ..\..\..\lib -copy "$(TargetDir)$(TargetName).lib" ..\..\..\lib - - - - - - - - - - %(Outputs) - - - Disabled - ..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;_DEBUG;_USRDLL;_WINDLL;USE_STD_NAMESPACE;TESS_EXPORTS;LIBLEPT_IMPORTS;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - OldStyle - Default - 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings) - false - - - ws2_32.lib;user32.lib;liblept$(LIBLEPT_VERSION)d.lib;libtiff$(LIBTIFF_VERSION)-static-mtdll-debug.lib - $(OutDir)$(TargetName)$(TargetExt) - $(LIBTESS_NUMBER) - ..\..\..\lib;%(AdditionalLibraryDirectories) - true - - - copy library to lib directory - if not exist ..\..\..\lib md ..\..\..\lib -copy "$(TargetPath)" ..\..\..\lib -copy "$(TargetDir)$(TargetName).lib" ..\..\..\lib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vs2010/libtesseract/libtesseract.vcxproj.filters b/vs2010/libtesseract/libtesseract.vcxproj.filters deleted file mode 100644 index aa18a673..00000000 --- a/vs2010/libtesseract/libtesseract.vcxproj.filters +++ /dev/null @@ -1,1607 +0,0 @@ - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - {df5a77a2-95e6-4c3d-a8ff-17c102dc47a3} - - - {81873181-2448-481b-8a31-daedb240e410} - - - {456a0027-7a61-4d9a-b150-841104208d04} - - - - - Resource Files - - - diff --git a/vs2010/libtesseract/resource.h b/vs2010/libtesseract/resource.h deleted file mode 100644 index bd49088e..00000000 --- a/vs2010/libtesseract/resource.h +++ /dev/null @@ -1,23 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by libtesseract.rc -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 101 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/vs2010/tesseract.sln b/vs2010/tesseract.sln deleted file mode 100644 index 32962b91..00000000 --- a/vs2010/tesseract.sln +++ /dev/null @@ -1,46 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual C++ Express 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtesseract304", "libtesseract\libtesseract.vcxproj", "{D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tesseract", "tesseract\tesseract.vcxproj", "{C76996CB-C4CB-4D89-9F67-F605DF129618}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - DLL_Debug|Win32 = DLL_Debug|Win32 - DLL_Release|Win32 = DLL_Release|Win32 - LIB_Debug|Win32 = LIB_Debug|Win32 - LIB_OpenCL_Debug|Win32 = LIB_OpenCL_Debug|Win32 - LIB_OpenCL_Release|Win32 = LIB_OpenCL_Release|Win32 - LIB_Release|Win32 = LIB_Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.DLL_Debug|Win32.ActiveCfg = DLL_Debug|Win32 - {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.DLL_Debug|Win32.Build.0 = DLL_Debug|Win32 - {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.DLL_Release|Win32.ActiveCfg = DLL_Release|Win32 - {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.DLL_Release|Win32.Build.0 = DLL_Release|Win32 - {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.LIB_Debug|Win32.ActiveCfg = LIB_Debug|Win32 - {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.LIB_Debug|Win32.Build.0 = LIB_Debug|Win32 - {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.LIB_OpenCL_Debug|Win32.ActiveCfg = LIB_OpenCL_Debug|Win32 - {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.LIB_OpenCL_Debug|Win32.Build.0 = LIB_OpenCL_Debug|Win32 - {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.LIB_OpenCL_Release|Win32.ActiveCfg = LIB_OpenCL_Release|Win32 - {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.LIB_OpenCL_Release|Win32.Build.0 = LIB_OpenCL_Release|Win32 - {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.LIB_Release|Win32.ActiveCfg = LIB_Release|Win32 - {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.LIB_Release|Win32.Build.0 = LIB_Release|Win32 - {C76996CB-C4CB-4D89-9F67-F605DF129618}.DLL_Debug|Win32.ActiveCfg = DLL_Debug|Win32 - {C76996CB-C4CB-4D89-9F67-F605DF129618}.DLL_Debug|Win32.Build.0 = DLL_Debug|Win32 - {C76996CB-C4CB-4D89-9F67-F605DF129618}.DLL_Release|Win32.ActiveCfg = DLL_Release|Win32 - {C76996CB-C4CB-4D89-9F67-F605DF129618}.DLL_Release|Win32.Build.0 = DLL_Release|Win32 - {C76996CB-C4CB-4D89-9F67-F605DF129618}.LIB_Debug|Win32.ActiveCfg = LIB_Debug|Win32 - {C76996CB-C4CB-4D89-9F67-F605DF129618}.LIB_Debug|Win32.Build.0 = LIB_Debug|Win32 - {C76996CB-C4CB-4D89-9F67-F605DF129618}.LIB_OpenCL_Debug|Win32.ActiveCfg = LIB_OpenCL_Debug|Win32 - {C76996CB-C4CB-4D89-9F67-F605DF129618}.LIB_OpenCL_Debug|Win32.Build.0 = LIB_OpenCL_Debug|Win32 - {C76996CB-C4CB-4D89-9F67-F605DF129618}.LIB_OpenCL_Release|Win32.ActiveCfg = LIB_OpenCL_Release|Win32 - {C76996CB-C4CB-4D89-9F67-F605DF129618}.LIB_OpenCL_Release|Win32.Build.0 = LIB_OpenCL_Release|Win32 - {C76996CB-C4CB-4D89-9F67-F605DF129618}.LIB_Release|Win32.ActiveCfg = LIB_Release|Win32 - {C76996CB-C4CB-4D89-9F67-F605DF129618}.LIB_Release|Win32.Build.0 = LIB_Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/vs2010/tesseract/tesseract.vcxproj b/vs2010/tesseract/tesseract.vcxproj deleted file mode 100644 index 246d69a0..00000000 --- a/vs2010/tesseract/tesseract.vcxproj +++ /dev/null @@ -1,360 +0,0 @@ - - - - - DLL_Debug - Win32 - - - DLL_Release - Win32 - - - LIB_Debug - Win32 - - - LIB_OpenCL_Debug - Win32 - - - LIB_OpenCL_Release - Win32 - - - LIB_Release - Win32 - - - - {C76996CB-C4CB-4D89-9F67-F605DF129618} - tesseract - - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - Application - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - ..\$(Configuration)\ - ..\$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - false - false - ..\$(Configuration)\ - ..\$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - false - false - ..\$(Configuration)\ - $(Configuration)\ - false - ..\$(Configuration)\ - $(Configuration)\ - false - $(ProjectName)d - $(ProjectName)d - $(ProjectName)-dll - $(ProjectName)-dlld - false - false - false - $(ProjectName)-opencl - - - - - - - - %(Outputs) - - - Disabled - ..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;_DEBUG;USE_STD_NAMESPACE;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - OldStyle - Default - 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings) - false - - - - - MYVERSION=$(LIBTESS_VERSION_R);%(PreprocessorDefinitions) - - - ws2_32.lib;user32.lib;zlib$(ZLIB_VERSION)-static-mtdll-debug.lib;libpng$(LIBPNG_VERSION)-static-mtdll-debug.lib;libjpeg$(LIBJPEG_VERSION)-static-mtdll-debug.lib;giflib$(GIFLIB_VERSION)-static-mtdll-debug.lib;libtiff$(LIBTIFF_VERSION)-static-mtdll-debug.lib;liblept$(LIBLEPT_VERSION)-static-mtdll-debug.lib - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\lib;%(AdditionalLibraryDirectories) - true - Console - - - - - - - - - - - - - - - %(Outputs) - - - Disabled - ..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;_DEBUG;USE_STD_NAMESPACE;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - OldStyle - Default - 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings) - false - - - - - MYVERSION=$(LIBTESS_VERSION_R);%(PreprocessorDefinitions) - - - ws2_32.lib;user32.lib;OpenCL.lib;zlib$(ZLIB_VERSION)-static-mtdll-debug.lib;libpng$(LIBPNG_VERSION)-static-mtdll-debug.lib;libjpeg$(LIBJPEG_VERSION)-static-mtdll-debug.lib;giflib$(GIFLIB_VERSION)-static-mtdll-debug.lib;libtiff$(LIBTIFF_VERSION)-static-mtdll-debug.lib;liblept$(LIBLEPT_VERSION)-static-mtdll-debug.lib - $(OutDir)$(TargetName)$(TargetExt) - $(AMDAPPSDKROOT)\lib\x86;$(INTELOCLSDKROOT)\lib\x86;..\..\..\lib;%(AdditionalLibraryDirectories) - true - Console - - - - - - - - - - - - - - - %(Outputs) - - - Full - ..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;NDEBUG;USE_STD_NAMESPACE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - - - Default - 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings) - true - - - MYVERSION=$(LIBTESS_VERSION_R);%(PreprocessorDefinitions) - - - ws2_32.lib;user32.lib;zlib$(ZLIB_VERSION)-static-mtdll.lib;libpng$(LIBPNG_VERSION)-static-mtdll.lib;libjpeg$(LIBJPEG_VERSION)-static-mtdll.lib;giflib$(GIFLIB_VERSION)-static-mtdll.lib;libtiff$(LIBTIFF_VERSION)-static-mtdll.lib;liblept$(LIBLEPT_VERSION)-static-mtdll.lib - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\lib;%(AdditionalLibraryDirectories) - Console - true - true - UseLinkTimeCodeGeneration - - - - - - - - - %(Outputs) - - - Full - $(AMDAPPSDKROOT)\include;$(INTELOCLSDKROOT)\include;..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories) - USE_OPENCL;WIN32;_WINDOWS;NDEBUG;USE_STD_NAMESPACE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - - - Default - 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings) - true - - - MYVERSION=$(LIBTESS_VERSION_R);%(PreprocessorDefinitions) - - - ws2_32.lib;user32.lib;OpenCL.lib;zlib$(ZLIB_VERSION)-static-mtdll.lib;libpng$(LIBPNG_VERSION)-static-mtdll.lib;libjpeg$(LIBJPEG_VERSION)-static-mtdll.lib;giflib$(GIFLIB_VERSION)-static-mtdll.lib;libtiff$(LIBTIFF_VERSION)-static-mtdll.lib;liblept$(LIBLEPT_VERSION)-static-mtdll.lib - $(OutDir)$(TargetName)$(TargetExt) - ..\..\..\lib;$(AMDAPPSDKROOT)\lib\x86;$(INTELOCLSDKROOT)\lib\x86;%(AdditionalLibraryDirectories) - Console - true - true - UseLinkTimeCodeGeneration - - - - - - - - - %(Outputs) - - - Full - ..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;NDEBUG;USE_STD_NAMESPACE;TESS_IMPORTS;LIBLEPT_IMPORTS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - - - Default - 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings) - true - - - MYVERSION=$(LIBTESS_VERSION_R);%(PreprocessorDefinitions) - - - ws2_32.lib;user32.lib;liblept$(LIBLEPT_VERSION).lib - $(OutDir)$(TargetName)$(TargetExt) - $(LIBTESS_NUMBER) - ..\..\..\lib;%(AdditionalLibraryDirectories) - Console - UseLinkTimeCodeGeneration - MachineX86 - true - true - - - - - - - - - %(Outputs) - - - Disabled - ..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;..\..\opencl;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;_DEBUG;USE_STD_NAMESPACE;TESS_IMPORTS;LIBLEPT_IMPORTS;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - OldStyle - Default - 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings) - false - - - MYVERSION=$(LIBTESS_VERSION_R);%(PreprocessorDefinitions) - - - ws2_32.lib;user32.lib;liblept$(LIBLEPT_VERSION)d.lib - $(OutDir)$(TargetName)$(TargetExt) - $(LIBLEPT_NUMBER) - ..\..\..\lib;%(AdditionalLibraryDirectories) - true - Console - MachineX86 - - - - - - - - - - - - - - {d14f28c7-0cae-4c37-b174-40fdefbd4fe0} - false - - - - - - \ No newline at end of file diff --git a/vs2010/tesseract/tesseract.vcxproj.filters b/vs2010/tesseract/tesseract.vcxproj.filters deleted file mode 100644 index 34be85d7..00000000 --- a/vs2010/tesseract/tesseract.vcxproj.filters +++ /dev/null @@ -1,32 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - - - Resource Files - - - - - Header Files - - - \ No newline at end of file diff --git a/vs2010/tesshelper.py b/vs2010/tesshelper.py deleted file mode 100644 index 83330e6e..00000000 --- a/vs2010/tesshelper.py +++ /dev/null @@ -1,511 +0,0 @@ -#!/usr/bin/env python -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -from __future__ import print_function -from builtins import input -""" -tesshelper.py -- Utility operations to compare, report stats, and copy - public headers for tesseract 3.0x VS2010 Project - -$RCSfile: tesshelper.py,v $ $Revision: 7ca575b377aa $ $Date: 2012/03/07 17:26:31 $ -""" - -r""" -Requires: - - python 2.7 or greater: activestate.com - http://www.activestate.com/activepython/downloads - -because using the new argparse module and new literal set syntax (s={1, 2}) . - -General Notes: --------------- - -Format for a .vcproj file entry: - - - - -""" - -epilogStr = r""" -Examples: - -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\vs2010\libtesseract\libtesseract.vcproj). - - python tesshelper .. report - -will display summary stats for c:\buildfolder\tesseract-3.02 "library" -directories and the libtesseract Project. - - python tesshelper .. copy ..\..\include - -will copy all "public" libtesseract header files to -c:\buildfolder\include. - - python tesshelper .. clean - -will clean the vs2010 folder of all build directories, and .user, .suo, -.ncb, and other temp files. - -""" - -# imports of python standard library modules -# See Python Documentation | Library Reference for details -import collections -import glob -import argparse -import os -import re -import shutil -import sys - -# ==================================================================== - -VERSION = "1.0 %s" % "$Date: 2012/03/07 17:26:31 $".split()[1] -PROJ_SUBDIR = r"vs2010\libtesseract" -PROJFILE = "libtesseract.vcproj" - -NEWHEADERS_FILENAME = "newheaders.txt" -NEWSOURCES_FILENAME = "newsources.txt" - -fileNodeTemplate = \ -''' ''' - -# ==================================================================== - -def getProjectfiles(libTessDir, libProjectFile, nTrimChars): - """Return sets of all, c, h, and resources files in libtesseract Project""" - - #extract filenames of header & source files from the .vcproj - projectCFiles = set() - projectHFiles = set() - projectRFiles = set() - projectFilesSet = set() - f = open(libProjectFile, "r") - data = f.read() - f.close() - - projectFiles = re.findall(r'(?i)Include="(\.[^"]+)"', data) - for projectFile in projectFiles: - root, ext = os.path.splitext(projectFile.lower()) - if ext == ".c" or ext == ".cpp": - projectCFiles.add(projectFile) - elif ext == ".h": - projectHFiles.add(projectFile) - elif ext == ".rc": - projectRFiles.add(projectFile) - else: - print("unknown file type: %s" % projectFile) - - relativePath = os.path.join(libTessDir, projectFile) - relativePath = os.path.abspath(relativePath) - relativePath = relativePath[nTrimChars:].lower() - projectFilesSet.add(relativePath) - - return projectFilesSet, projectHFiles, projectCFiles, projectRFiles - -def getTessLibFiles(tessDir, nTrimChars): - """Return set of all libtesseract files in tessDir""" - - libDirs = [ - "api", - "ccmain", - "ccstruct", - "ccutil", - "classify", - "cube", - "cutil", - "dict", - r"neural_networks\runtime", - "opencl", - "textord", - "viewer", - "wordrec", - #"training", - r"vs2010\port", - r"vs2010\libtesseract", - ] - - #create list of all .h, .c, .cpp files in "library" directories - tessFiles = set() - for curDir in libDirs: - baseDir = os.path.join(tessDir, curDir) - for filetype in ["*.c", "*.cpp", "*.h"]: - pattern = os.path.join(baseDir, filetype) - fileList = glob.glob(pattern) - for curFile in fileList: - curFile = os.path.abspath(curFile) - relativePath = curFile[nTrimChars:].lower() - tessFiles.add(relativePath) - - return tessFiles - -# ==================================================================== - -def tessCompare(tessDir): - '''Compare libtesseract Project files and actual "sub-library" files.''' - - vs2010Dir = os.path.join(tessDir, "vs2010") - libTessDir = os.path.join(vs2010Dir, "libtesseract") - libProjectFile = os.path.join(libTessDir,"libtesseract.vcxproj") - tessAbsDir = os.path.abspath(tessDir) - nTrimChars = len(tessAbsDir)+1 - print('Comparing VS2010 Project "%s" with\n "%s"' % (libProjectFile, - tessAbsDir)) - - projectFilesSet, projectHFiles, projectCFiles, projectRFiles = \ - getProjectfiles(libTessDir, libProjectFile, nTrimChars) - tessFiles = getTessLibFiles(tessDir, nTrimChars) - - extraFiles = tessFiles - projectFilesSet - print("%2d Extra files (in %s but not in Project)" % (len(extraFiles), - tessAbsDir)) - headerFiles = [] - sourceFiles = [] - sortedList = list(extraFiles) - sortedList.sort() - for filename in sortedList: - root, ext = os.path.splitext(filename.lower()) - if ext == ".h": - headerFiles.append(filename) - else: - sourceFiles.append(filename) - print(" %s " % filename) - - print() - print("%2d new header file items written to %s" % (len(headerFiles), - NEWHEADERS_FILENAME)) - headerFiles.sort() - with open(NEWHEADERS_FILENAME, "w") as f: - for filename in headerFiles: - f.write(fileNodeTemplate % filename) - - print("%2d new source file items written to %s" % (len(sourceFiles), - NEWSOURCES_FILENAME)) - sourceFiles.sort() - with open(NEWSOURCES_FILENAME, "w") as f: - for filename in sourceFiles: - f.write(fileNodeTemplate % filename) - print() - - deadFiles = projectFilesSet - tessFiles - print("%2d Dead files (in Project but not in %s" % (len(deadFiles), - tessAbsDir)) - sortedList = list(deadFiles) - sortedList.sort() - for filename in sortedList: - print(" %s " % filename) - -# ==================================================================== - -def tessReport(tessDir): - """Report summary stats on "sub-library" files and libtesseract Project file.""" - - vs2010Dir = os.path.join(tessDir, "vs2010") - libTessDir = os.path.join(vs2010Dir, "libtesseract") - libProjectFile = os.path.join(libTessDir,"libtesseract.vcproj") - tessAbsDir = os.path.abspath(tessDir) - nTrimChars = len(tessAbsDir)+1 - - projectFilesSet, projectHFiles, projectCFiles, projectRFiles = \ - getProjectfiles(libTessDir, libProjectFile, nTrimChars) - tessFiles = getTessLibFiles(tessDir, nTrimChars) - - print('Summary stats for "%s" library directories' % tessAbsDir) - folderCounters = {} - for tessFile in tessFiles: - tessFile = tessFile.lower() - folder, head = os.path.split(tessFile) - file, ext = os.path.splitext(head) - typeCounter = folderCounters.setdefault(folder, collections.Counter()) - typeCounter[ext[1:]] += 1 - - folders = list(folderCounters.keys()) - folders.sort() - totalFiles = 0 - totalH = 0 - totalCPP = 0 - totalOther = 0 - - print() - print(" total h cpp") - print(" ----- --- ---") - for folder in folders: - counters = folderCounters[folder] - nHFiles = counters['h'] - nCPPFiles = counters['cpp'] - - total = nHFiles + nCPPFiles - totalFiles += total - totalH += nHFiles - totalCPP += nCPPFiles - - print(" %5d %3d %3d %s" % (total, nHFiles, nCPPFiles, folder)) - print(" ----- --- ---") - print(" %5d %3d %3d" % (totalFiles, totalH, totalCPP)) - - print() - 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")) - print(" -----") - print(" %5d" % (len(projectHFiles) + len(projectCFiles) + len(projectRFiles), )) - -# ==================================================================== - -def copyIncludes(fileSet, description, tessDir, includeDir): - """Copy set of files to specified include dir.""" - - print() - print('Copying libtesseract "%s" headers to %s' % (description, includeDir)) - print() - - sortedList = list(fileSet) - sortedList.sort() - - count = 0 - errList = [] - for includeFile in sortedList: - filepath = os.path.join(tessDir, includeFile) - if os.path.isfile(filepath): - shutil.copy2(filepath, includeDir) - print("Copied: %s" % includeFile) - count += 1 - else: - print('***Error: "%s" doesn\'t exist"' % filepath) - errList.append(filepath) - - print('%d header files successfully copied to "%s"' % (count, includeDir)) - if len(errList): - print("The following %d files were not copied:") - for filepath in errList: - print(" %s" % filepath) - -def tessCopy(tessDir, includeDir): - '''Copy all "public" libtesseract Project header files to include directory. - - Preserves directory hierarchy.''' - - baseIncludeSet = { - r"api\baseapi.h", - r"api\capi.h", - r"api\apitypes.h", - r"ccstruct\publictypes.h", - r"ccmain\thresholder.h", - r"ccutil\host.h", - r"ccutil\basedir.h", - r"ccutil\tesscallback.h", - r"ccutil\unichar.h", - r"ccutil\platform.h", - } - - strngIncludeSet = { - r"ccutil\strngs.h", - r"ccutil\memry.h", - r"ccutil\host.h", - r"ccutil\serialis.h", - r"ccutil\errcode.h", - r"ccutil\fileerr.h", - #r"ccutil\genericvector.h", - } - - resultIteratorIncludeSet = { - r"ccmain\ltrresultiterator.h", - r"ccmain\pageiterator.h", - r"ccmain\resultiterator.h", - r"ccutil\genericvector.h", - r"ccutil\tesscallback.h", - r"ccutil\errcode.h", - r"ccutil\host.h", - r"ccutil\helpers.h", - r"ccutil\ndminx.h", - r"ccutil\params.h", - r"ccutil\unicharmap.h", - r"ccutil\unicharset.h", - } - - genericVectorIncludeSet = { - r"ccutil\genericvector.h", - r"ccutil\tesscallback.h", - r"ccutil\errcode.h", - r"ccutil\host.h", - r"ccutil\helpers.h", - r"ccutil\ndminx.h", - } - - blobsIncludeSet = { - r"ccstruct\blobs.h", - r"ccstruct\rect.h", - r"ccstruct\points.h", - r"ccstruct\ipoints.h", - r"ccutil\elst.h", - r"ccutil\host.h", - r"ccutil\serialis.h", - r"ccutil\lsterr.h", - r"ccutil\ndminx.h", - r"ccutil\tprintf.h", - r"ccutil\params.h", - r"viewer\scrollview.h", - r"ccstruct\vecfuncs.h", - } - - extraFilesSet = { - #r"vs2010\include\stdint.h", - r"vs2010\include\leptonica_versionnumbers.vsprops", - r"vs2010\include\tesseract_versionnumbers.vsprops", - } - - tessIncludeDir = os.path.join(includeDir, "tesseract") - if os.path.isfile(tessIncludeDir): - print('Aborting: "%s" is a file not a directory.' % tessIncludeDir) - return - if not os.path.exists(tessIncludeDir): - os.mkdir(tessIncludeDir) - - #fileSet = baseIncludeSet | strngIncludeSet | genericVectorIncludeSet | blobsIncludeSet - fileSet = baseIncludeSet | strngIncludeSet | resultIteratorIncludeSet - - copyIncludes(fileSet, "public", tessDir, tessIncludeDir) - copyIncludes(extraFilesSet, "extra", tessDir, includeDir) - -# ==================================================================== - -def tessClean(tessDir): - '''Clean vs2010 folder of all build directories and certain temp files.''' - - 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]? ' % - 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(vs2010AbsDir): - for buildDir in ("LIB_Release", "LIB_Debug", "DLL_Release", "DLL_Debug"): - if buildDir in dirs: - dirs.remove(buildDir) - absBuildDir = os.path.join(rootDir, buildDir) - if listOnly: - print("Would remove: %s" % absBuildDir) - else: - print("Removing: %s" % absBuildDir) - shutil.rmtree(absBuildDir) - - if rootDir == vs2010AbsDir: - for file in files: - if file.lower() not in ("tesseract.sln", - "tesshelper.py", - "readme.txt"): - absPath = os.path.join(rootDir, file) - if listOnly: - print("Would remove: %s" % absPath) - else: - print("Removing: %s" % absPath) - os.remove(absPath) - else: - for file in files: - root, ext = os.path.splitext(file) - if ext.lower() in (".suo", - ".ncb", - ".user", - ) or ( - len(ext)>0 and ext[-1] == "~"): - absPath = os.path.join(rootDir, file) - if listOnly: - print("Would remove: %s" % absPath) - else: - print("Removing: %s" % absPath) - os.remove(absPath) - -# ==================================================================== - -def validateTessDir(tessDir): - """Check that tessDir is a valid tesseract directory.""" - - if not os.path.isdir(tessDir): - raise argparse.ArgumentTypeError('Directory "%s" doesn\'t exist.' % tessDir) - projFile = os.path.join(tessDir, PROJ_SUBDIR, PROJFILE) - if not os.path.isfile(projFile): - raise argparse.ArgumentTypeError('Project file "%s" doesn\'t exist.' % projFile) - return tessDir - -def validateDir(dir): - """Check that dir is a valid directory named include.""" - - if not os.path.isdir(dir): - raise argparse.ArgumentTypeError('Directory "%s" doesn\'t exist.' % dir) - - dirpath = os.path.abspath(dir) - head, tail = os.path.split(dirpath) - if tail.lower() != "include": - raise argparse.ArgumentTypeError('Include directory "%s" must be named "include".' % tail) - - return dir - -def main (): - parser = argparse.ArgumentParser( - epilog=epilogStr, - formatter_class=argparse.RawDescriptionHelpFormatter) - - parser.add_argument("--version", action="version", - version="%(prog)s " + VERSION) - parser.add_argument('tessDir', type=validateTessDir, - help="tesseract installation directory") - - subparsers = parser.add_subparsers( - dest="subparser_name", - title="Commands") - parser_changes = subparsers.add_parser('compare', - help="compare libtesseract Project with tessDir") - parser_changes.set_defaults(func=tessCompare) - - parser_report = subparsers.add_parser('report', - help="report libtesseract summary stats") - parser_report.set_defaults(func=tessReport) - - parser_copy = subparsers.add_parser('copy', - help="copy public libtesseract header files to includeDir") - parser_copy.add_argument('includeDir', type=validateDir, - help="Directory to copy header files to.") - parser_copy.set_defaults(func=tessCopy) - - parser_clean = subparsers.add_parser('clean', - 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 - if (len(sys.argv) == 2): - sys.argv.append("compare") - args = parser.parse_args() - - #handle commands - if args.func == tessCopy: - args.func(args.tessDir, args.includeDir) - else: - args.func(args.tessDir) - -if __name__ == '__main__' : - main() diff --git a/vs2010/version.bat b/vs2010/version.bat deleted file mode 100644 index 68e68828..00000000 --- a/vs2010/version.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -FOR /F "tokens=*" %%i IN ('call git describe --tags --always') DO echo #define GIT_REV "%%i" > ..\port\vcsversion.h \ No newline at end of file