Skip to content

Commit

Permalink
fix tessdata prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
Olli-Pekka Heinisuo committed Jun 8, 2015
1 parent 235beec commit 73880ff
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/harbour-textractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@ int main(int argc, char *argv[])
{
// Tesseract requires this locale
setlocale(LC_NUMERIC, "C");
// Set the tessdata directory prefix env variable
QString datadir = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
qputenv("TESSDATA_PREFIX", QString(datadir + "/harbour-textractor/harbour-textractor/tesseract-ocr/tessdata/").toLocal8Bit());

QCoreApplication::setApplicationName("harbour-textractor");
QCoreApplication::setOrganizationName("harbour-textractor");

QGuiApplication *app = SailfishApp::application(argc, argv);
QQuickView *view = SailfishApp::createView();

// Set the tessdata directory prefix env variable
QString datadir = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
qputenv("TESSDATA_PREFIX", QString(datadir + "/tesseract-ocr/tessdata/").toLocal8Bit());

TesseractAPI interface;
view->rootContext()->setContextProperty("tesseractAPI", &interface);
qmlRegisterType<SettingsManager>("harbour.textractor.settingsmanager", 1, 0, "SettingsManager");
Expand Down

0 comments on commit 73880ff

Please sign in to comment.