Commit beb71cd3 authored by Guillaume Lazzara's avatar Guillaume Lazzara Committed by Roland Levillain
Browse files

demo/viewer/runner.cc: Make detection of scribo-xml2doc more robust.


Signed-off-by: Roland Levillain's avatarRoland Levillain <roland@lrde.epita.fr>
parent d5d6227f
2011-12-07 Guillaume Lazzara <z@lrde.epita.fr>
* demo/viewer/runner.cc: Make detection of scribo-xml2doc more
robust.
2014-06-27 Roland Levillain <roland@lrde.epita.fr>
Address compiler warnings in Scribo.
......
......@@ -37,14 +37,23 @@ static
QString get_pathto(const QString& file,
const QString localdirsuffix = QString())
{
// Not installed ?
QFile f(SCRIBO_LOCAL_DEMODIR "/" + localdirsuffix + "/" + file);
if (f.exists())
return SCRIBO_LOCAL_DEMODIR "/" + localdirsuffix;
// Installed in a specific path ?
f.setFileName(SCRIBO_PREFIX_LIBEXECDIR "/" + file);
if (f.exists())
return SCRIBO_PREFIX_LIBEXECDIR;
// 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";
qDebug() << "FATAL ERROR: Can't locate file: " + file;
return "";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment