Merge pull request #1202 from TheAssassin/fix-relative-resource-loading

Fix support for relocatable installations
presentation
Bryan Tan 7 years ago committed by GitHub
commit d558c5ad35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      src/control/XournalMain.cpp

@ -509,6 +509,19 @@ string XournalMain::findResourcePath(string searchFile)
return relative5.getParentPath().str();
}
// -----------------------------------------------------------------------
// Check for .../share resources directory relative to binary to support
// relocatable installations (such as e.g., AppImages)
Path relative6 = executableDir;
relative6 /= "../share/xournalpp/";
relative6 /= searchFile;
if (relative6.exists())
{
return relative6.getParentPath().str();
}
// Not found
return "";
}

Loading…
Cancel
Save