This guide uses my own repos from Mer Obs. I found it very hard to find information about this so hopefully someone sees this useful. This short guide was created as a side product while I was creating these RPM packages (which wasn't so clear to me either).
-
Add the repositories to the Mer SDK armv7hl and i486 targets (you'll have to ssh to the Mer SDK):
-
sb2 -t SailfishOS-2.1.3.7-armv7hl -m sdk-install -R zypper ar -f https://sailfish.openrepos.net/birdzhang/personal-main.repo -
sb2 -t SailfishOS-2.1.3.7-i486 -m sdk-install -R zypper ar -f https://sailfish.openrepos.net/birdzhang/personal-main.repo
-
-
Refresh
sb2 -t SailfishOS-2.1.3.7-i486 -m sdk-install -R zypper refandsb2 -t SailfishOS-2.1.3.7-armv7hl -m sdk-install -R zypper ref -
Install packages:
sb2 -t SailfishOS-2.1.3.7-armv7hl -m sdk-install -R zypper in librimesb2 -t SailfishOS-2.1.3.7-i486 -m sdk-install -R zypper in librime
-
Synchronize the targets with the SDK. This has to be done because SDK uses shared folders and they do not update automatically.
- Go to the Sailfish SDK and click SailFish OS tab
- In targets, click manage -> sync for both targets
- Check that i.e. the header files appeared to the shared folder (in Windows i.e. C:\SailfishOS\mersdk\targets\SailfishOS-2.1.3.7-i486\usr\include\tesseract)
-
If you want to use the i486 emulator, the packages must be installed there too
pkcon install zyppersudo zypper ar https://sailfish.openrepos.net/birdzhang/personal-main.reposudo zypper refsudo zypper in librime
You should be able now to do like this:
- In the .pro file, add line
LIBS += -ltesseract -llept - In your C++ files include the development headers like this:
#include <tesseract/baseapi.h>
#include <leptonica/allheaders.h>
However, this is not everything. You can't submit the app to the Jolla Harbour yet, because the libraries are not likely allowed in the store. You should package the libs with the app and after that it would be allowed in the Harbour.