mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Linux installation scripts, some adjustments
This commit is contained in:
@ -1904,15 +1904,28 @@ void PDFProgramController::updatePageLayoutActions()
|
||||
|
||||
void PDFProgramController::loadPlugins()
|
||||
{
|
||||
QStringList availablePlugins;
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
QDir directory(QApplication::applicationDirPath() + "/pdfplugins");
|
||||
QStringList availablePlugins = directory.entryList(QStringList("*.dll"));
|
||||
availablePlugins = directory.entryList(QStringList("*.dll"));
|
||||
#elif defined(Q_OS_UNIX)
|
||||
#ifndef NDEBUG
|
||||
QDir directory(QApplication::applicationDirPath() + "/../pdfplugins");
|
||||
QStringList availablePlugins = directory.entryList(QStringList("*.so"));
|
||||
availablePlugins = directory.entryList(QStringList("*.so"));
|
||||
#else
|
||||
QDir directory(QApplication::applicationDirPath());
|
||||
if (directory.cdUp() &&
|
||||
directory.cd("lib") &&
|
||||
directory.cd("pdf4qt"))
|
||||
{
|
||||
availablePlugins = directory.entryList(QStringList("*.so"));
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
static_assert(false, "Implement this for another OS!");
|
||||
#endif
|
||||
|
||||
for (const QString& availablePlugin : availablePlugins)
|
||||
{
|
||||
QString pluginFileName = directory.absoluteFilePath(availablePlugin);
|
||||
|
Reference in New Issue
Block a user