--- scribo/ChangeLog | 4 ++++ scribo/demo/viewer/runner.cc | 16 +++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog index bd888be..d01f048 100644 --- a/scribo/ChangeLog +++ b/scribo/ChangeLog @@ -1,3 +1,7 @@ +2012-05-22 Guillaume Lazzara z@lrde.epita.fr + + * demo/viewer/runner.cc: Make xml2doc binary lookup more robust. + 2011-12-07 Guillaume Lazzara z@lrde.epita.fr
* src/scribo-cli.in: Move shebang on first line. diff --git a/scribo/demo/viewer/runner.cc b/scribo/demo/viewer/runner.cc index 05ddac5..fe6732f 100644 --- a/scribo/demo/viewer/runner.cc +++ b/scribo/demo/viewer/runner.cc @@ -1,5 +1,5 @@ -// Copyright (C) 2010, 2011 EPITA Research and Development Laboratory -// (LRDE) +// Copyright (C) 2010, 2011, 2012 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -50,9 +50,15 @@ QString get_pathto(const QString& file, // Installed in a specific path but moved elsewhere ? QDir dir(QCoreApplication::applicationDirPath()); dir.cdUp(); // move from prefix/bin to prefix/ - f.setFileName(dir.currentPath() + "/libexec/scribo" + file); - if (f.exists()) - return dir.currentPath() + "/libexec/scribo"; + + const char *path[] = { "lib", "libexec", 0 }; + + for (int i = 0; path[i]; ++i) + { + f.setFileName(dir.currentPath() + QString("/%1/scribo").arg(path[i]) + file); + if (f.exists()) + return dir.currentPath() + QString("/%1/scribo").arg(path[i]); + }
qDebug() << "FATAL ERROR: Can't locate file: " + file;