Changed: #1159 plugin and resource handling

This commit is contained in:
rti 2010-12-12 21:56:56 +01:00
parent 77915e0035
commit 9526715c55
5 changed files with 19 additions and 7 deletions

View file

@ -127,8 +127,6 @@ void CPluginManager::readPluginPaths()
const QDir dir(searchPaths.takeFirst());
#ifdef Q_OS_WIN
const QFileInfoList files = dir.entryInfoList(QStringList() << QString("*.dll"), QDir::Files);
#elif defined(Q_OS_MAC)
const QFileInfoList files = dir.entryInfoList(QStringList() << QString("*.dylib"), QDir::Files);
#else
const QFileInfoList files = dir.entryInfoList(QStringList() << QString("*.so"), QDir::Files);
#endif

View file

@ -3,6 +3,7 @@
#include <nel/misc/app_context.h>
// Qt includes
#include <QtCore/QDir>
#include <QtGui/QMessageBox>
#include <QtGui/QApplication>
#include <QtGui/QSplashScreen>
@ -11,6 +12,7 @@
#include <nel/misc/debug.h>
#include <nel/misc/common.h>
#include <nel/misc/file.h>
#include <nel/misc/dynloadlib.h>
#include <nel/misc/path.h>
#include <nel/misc/command.h>
@ -91,6 +93,12 @@ sint main(int argc, char **argv)
splash->setPixmap(QPixmap(":/images/nel_ide_load.png"));
splash->show();
#if defined(NL_OS_MAC)
QDir::setCurrent(qApp->applicationDirPath() + QString("/../Resources"));
CLibrary::addLibPath(
(qApp->applicationDirPath() + QString("/../PlugIns/nel")).toStdString());
#endif
Modules::init();
// load and set remap extensions from config
@ -101,7 +109,13 @@ sint main(int argc, char **argv)
Modules::mainWin().showMaximized();
Modules::plugMan().addObject(&Modules::mainWin());
#if !defined(NL_OS_MAC)
Modules::plugMan().setPluginPaths(QStringList() << QString("./plugins"));
#else
Modules::plugMan().setPluginPaths(QStringList() <<
qApp->applicationDirPath() + QString("/../PlugIns/ovqt"));
#endif
Modules::plugMan().loadPlugins();
QStringList errors;

View file

@ -19,7 +19,7 @@ SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_EXAMPLE_MOC_SRC})
SOURCE_GROUP("Example Plugin" FILES ${SRC})
SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC})
ADD_LIBRARY(ovqt_plugin_example SHARED ${SRC} ${OVQT_PLUG_EXAMPLE_MOC_SRC} ${OVQT_EXT_SYS_SRC})
ADD_LIBRARY(ovqt_plugin_example MODULE ${SRC} ${OVQT_PLUG_EXAMPLE_MOC_SRC} ${OVQT_EXT_SYS_SRC})
TARGET_LINK_LIBRARIES(ovqt_plugin_example nelmisc ${QT_LIBRARIES})

View file

@ -23,7 +23,7 @@ SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_LOG_MOC_SRC})
SOURCE_GROUP("Log Plugin" FILES ${SRC})
SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC})
ADD_LIBRARY(ovqt_plugin_log SHARED ${SRC} ${OVQT_PLUG_LOG_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_LOG_UI_HDRS})
ADD_LIBRARY(ovqt_plugin_log MODULE ${SRC} ${OVQT_PLUG_LOG_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_LOG_UI_HDRS})
TARGET_LINK_LIBRARIES(ovqt_plugin_log nelmisc ${QT_LIBRARIES})

View file

@ -19,7 +19,7 @@ SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_SHEET_BUILDER_MOC_SRC})
SOURCE_GROUP("Sheet builder Plugin" FILES ${SRC})
SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC})
ADD_LIBRARY(ovqt_plugin_sheet_builder SHARED ${SRC} ${OVQT_PLUG_SHEET_BUILDER_MOC_SRC} ${OVQT_EXT_SYS_SRC})
ADD_LIBRARY(ovqt_plugin_sheet_builder MODULE ${SRC} ${OVQT_PLUG_SHEET_BUILDER_MOC_SRC} ${OVQT_EXT_SYS_SRC})
TARGET_LINK_LIBRARIES(ovqt_plugin_sheet_builder nelmisc ${QT_LIBRARIES})