Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 1664 → Rev 1665

/branches/Version13x/Scribus/scribus/pluginmanager.h
94,6 → 94,9
* Each plugin has its record key() -> PluginData */
QMap<int, PluginData> pluginMap;
 
/*! \brief Return file extension used for shared libs on this platform */
static QCString PluginManager::platformDllExtension();
 
public slots:
/*! obsolete */
void callDLLBySlot(int pluginID);
/branches/Version13x/Scribus/scribus/scribus.cpp
8151,12 → 8151,7
const char *error;
typedef PSLib* (*sdem)(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, ColorList DocColors, bool pdf);
sdem demo;
QString pfad = LIBDIR;
#if defined(__hpux)
pfad += "libs/libpostscript.sl";
#else
pfad += "libs/libpostscript.so";
#endif
QString pfad = QString("%1/libs/libpostscript.%3").arg(LIBDIR).arg(PluginManager::platformDllExtension());
PSDriver = dlopen(pfad, RTLD_LAZY);
if (!PSDriver)
{
8266,12 → 8261,7
void *PDFDriver;
typedef bool (*sdem)(ScribusApp *plug, QString fn, QString nam, int Components, std::vector<int> &pageNs, QMap<int,QPixmap> thumbs, QProgressBar *dia2);
sdem demo;
QString pfad = LIBDIR;
#if defined(__hpux)
pfad += "libs/libpdf.sl";
#else
pfad += "libs/libpdf.so";
#endif
QString pfad = QString("%1/libs/libpdf.%3").arg(LIBDIR).arg(PluginManager::platformDllExtension());
PDFDriver = dlopen(pfad, RTLD_NOW);
if (!PDFDriver)
{
/branches/Version13x/Scribus/scribus/pluginmanager.cpp
37,11 → 37,8
QString name = "";
int id = 0;
struct PluginData pda;
#if defined(__hpux)
QDir dirList(PLUGINDIR, "*.sl*", QDir::Name, QDir::Files | QDir::Executable | QDir::NoSymLinks);
#else
QDir dirList(PLUGINDIR, "*.so*", QDir::Name, QDir::Files | QDir::Executable | QDir::NoSymLinks);
#endif
QString libPattern = QString("*.%1*").arg(PluginManager::platformDllExtension());
QDir dirList(PLUGINDIR, libPattern, QDir::Name, QDir::Files | QDir::Executable | QDir::NoSymLinks);
if ((dirList.exists()) && (dirList.count() != 0))
{
ScApp->scrMenuMgr->addMenuSeparator("Extras");
331,3 → 328,17
return tr("Unknown", "plugin manager");
}
}
 
QCString PluginManager::platformDllExtension()
{
#ifdef __hpux
// HP/UX
return "sl";
#elif defined(__APPLE__) && defined(__MACH__)
// MacOS/X, Darwin
return "dylib";
#else
// Generic *NIX
return "so";
#endif
}
/branches/Version13x/Scribus/scribus/gtgettext.cpp
19,6 → 19,7
***************************************************************************/
 
#include "gtgettext.h"
#include "pluginmanager.h"
#include "scribus.h"
 
extern QPixmap loadIcon(QString nam);
59,11 → 60,8
{
QString gtdir = PLUGINDIR;
gtdir += "gettext";
#if defined(__hpux)
QDir d(gtdir, "*.sl*", QDir::Name, QDir::Files | QDir::Executable | QDir::NoSymLinks);
#else
QDir d(gtdir, "*.so*", QDir::Name, QDir::Files | QDir::Executable | QDir::NoSymLinks);
#endif
QString libPattern = QString("*.%1*").arg(PluginManager::platformDllExtension());
QDir d(gtdir, libPattern, QDir::Name, QDir::Files | QDir::Executable | QDir::NoSymLinks);
 
struct ImporterData ida;
ida.fileFormatName = "";