From bde651bbde9df3a8c33b705dbe33bbcaf4e3e73d Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 18 Aug 2021 22:37:40 +0100 Subject: rescribe: Update documentation on how to deal with M1 signing, and move makefile to where it makes sense --- cmd/rescribe/EMBEDDING_NOTES.md | 6 ++++++ cmd/rescribe/makefile | 15 +++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 cmd/rescribe/makefile (limited to 'cmd/rescribe') diff --git a/cmd/rescribe/EMBEDDING_NOTES.md b/cmd/rescribe/EMBEDDING_NOTES.md index 930f2d7..e3c3425 100644 --- a/cmd/rescribe/EMBEDDING_NOTES.md +++ b/cmd/rescribe/EMBEDDING_NOTES.md @@ -24,6 +24,12 @@ You can find the path names to replace using `otool -L`. This is all taken from a great guide on how to do this: http://thecourtsofchaos.com/2013/09/16/how-to-copy-and-relink-binaries-on-osx/ +Additionally, at least with OSX on arm64 (M1), one needs to re- +sign the tesseract executable and libraries after changing them, +or OSX will prevent them from being run. You can do this with +the codesign tool, like this: + codesign -f -s - liblept.5.dylib + The embedded tessdata is much easier to create, it's just a standard tessdata from an install on any platform, plus any additional .traineddata files you want to include. diff --git a/cmd/rescribe/makefile b/cmd/rescribe/makefile new file mode 100644 index 0000000..32620f2 --- /dev/null +++ b/cmd/rescribe/makefile @@ -0,0 +1,15 @@ +# See LICENSE file for copyright and license details. + +all: rescribe-osx rescribe-osx-m1 rescribe.exe rescribe + +rescribe: + GOOS=linux GOARCH=amd64 go build -o $@ . + +rescribe-osx: + GOOS=darwin GOARCH=amd64 go build -o $@ . + +rescribe-osx-m1: + GOOS=darwin GOARCH=arm64 go build -o $@ . + +rescribe.exe: + GOOS=windows GOARCH=386 go build -o $@ . -- cgit v1.2.1-24-ge1ad