From a798db15135d56205bbe3660741b53837094914b Mon Sep 17 00:00:00 2001 From: Nick White Date: Tue, 29 Jun 2021 12:38:44 +0100 Subject: rescribe: Add embed target for darwin (osx) too --- cmd/rescribe/main.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cmd/rescribe/main.go') diff --git a/cmd/rescribe/main.go b/cmd/rescribe/main.go index eb9719f..814504b 100644 --- a/cmd/rescribe/main.go +++ b/cmd/rescribe/main.go @@ -191,11 +191,12 @@ These training files are included in rescribe, and are always available: log.Fatalln("Error unpacking embedded Tesseract zip:", err) } switch runtime.GOOS { - case "windows": - tessCommand = filepath.Join(tessdir, "tesseract.exe") + case "darwin": + tessCommand = filepath.Join(tessdir, "tesseract") case "linux": tessCommand = filepath.Join(tessdir, "tesseract") - // TODO: add osx + case "windows": + tessCommand = filepath.Join(tessdir, "tesseract.exe") } } @@ -241,6 +242,7 @@ These training files are included in rescribe, and are always available: fmt.Fprintf(os.Stderr, "Ensure that Tesseract is installed and available, or don't use the -systess flag.\n") fmt.Fprintf(os.Stderr, "You may need to -tesscmd to the full path of Tesseract.exe if you're on Windows, like this:\n") fmt.Fprintf(os.Stderr, " rescribe -tesscmd 'C:\\Program Files\\Tesseract OCR (x86)\\tesseract.exe' ...\n") + fmt.Fprintf(os.Stderr, "Error message: %v\n", err) os.Exit(1) } -- cgit v1.2.1-24-ge1ad