Improve help messages for Windows

This commit is contained in:
James R. Barlow
2019-12-10 01:44:00 -08:00
parent f34130d193
commit a2d89f67c4
2 changed files with 22 additions and 2 deletions
+12 -1
View File
@@ -42,7 +42,18 @@ if os.name == 'nt':
if not GS:
GS = which('gswin32c')
if not GS:
raise MissingDependencyError("Ghostscript (gswin64c or gswin32c)")
raise MissingDependencyError(
"""
---------------------------------------------------------------------
This error normally occurs when ocrmypdf can't Ghostscript. Please
ensure Ghostscript is installed and its location is added to the
system PATH environment variable.
For details see:
https://ocrmypdf.readthedocs.io/en/latest/installation.html
---------------------------------------------------------------------
"""
)
GS = Path(GS).stem
+10 -1
View File
@@ -47,7 +47,16 @@ else:
_libpath = find_library(libname)
if not _libpath and os.name == 'nt':
raise MissingDependencyError(
"Please ensure that 'tesseract' is on your PATH environment variable. "
"""
---------------------------------------------------------------------
This error normally occurs when ocrmypdf can't find a file named
liblept-5.dll (Leptonica). Please ensure Tesseract-OCR is installed
and its location is added to the system PATH environment variable.
For details see:
https://ocrmypdf.readthedocs.io/en/latest/installation.html
---------------------------------------------------------------------
"""
)
lept = ffi.dlopen(_libpath)
lept.setMsgSeverity(lept.L_SEVERITY_WARNING)