mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-15 14:08:42 +00:00
Changed: #1159 plugin and resource handling
This commit is contained in:
parent
248b86bd94
commit
ad19524ed0
5 changed files with 19 additions and 7 deletions
|
@ -127,8 +127,6 @@ void CPluginManager::readPluginPaths()
|
||||||
const QDir dir(searchPaths.takeFirst());
|
const QDir dir(searchPaths.takeFirst());
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
const QFileInfoList files = dir.entryInfoList(QStringList() << QString("*.dll"), QDir::Files);
|
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
|
#else
|
||||||
const QFileInfoList files = dir.entryInfoList(QStringList() << QString("*.so"), QDir::Files);
|
const QFileInfoList files = dir.entryInfoList(QStringList() << QString("*.so"), QDir::Files);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include <nel/misc/app_context.h>
|
#include <nel/misc/app_context.h>
|
||||||
|
|
||||||
// Qt includes
|
// Qt includes
|
||||||
|
#include <QtCore/QDir>
|
||||||
#include <QtGui/QMessageBox>
|
#include <QtGui/QMessageBox>
|
||||||
#include <QtGui/QApplication>
|
#include <QtGui/QApplication>
|
||||||
#include <QtGui/QSplashScreen>
|
#include <QtGui/QSplashScreen>
|
||||||
|
@ -11,6 +12,7 @@
|
||||||
#include <nel/misc/debug.h>
|
#include <nel/misc/debug.h>
|
||||||
#include <nel/misc/common.h>
|
#include <nel/misc/common.h>
|
||||||
#include <nel/misc/file.h>
|
#include <nel/misc/file.h>
|
||||||
|
#include <nel/misc/dynloadlib.h>
|
||||||
#include <nel/misc/path.h>
|
#include <nel/misc/path.h>
|
||||||
#include <nel/misc/command.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->setPixmap(QPixmap(":/images/nel_ide_load.png"));
|
||||||
splash->show();
|
splash->show();
|
||||||
|
|
||||||
|
#if defined(NL_OS_MAC)
|
||||||
|
QDir::setCurrent(qApp->applicationDirPath() + QString("/../Resources"));
|
||||||
|
CLibrary::addLibPath(
|
||||||
|
(qApp->applicationDirPath() + QString("/../PlugIns/nel")).toStdString());
|
||||||
|
#endif
|
||||||
|
|
||||||
Modules::init();
|
Modules::init();
|
||||||
|
|
||||||
// load and set remap extensions from config
|
// load and set remap extensions from config
|
||||||
|
@ -101,7 +109,13 @@ sint main(int argc, char **argv)
|
||||||
Modules::mainWin().showMaximized();
|
Modules::mainWin().showMaximized();
|
||||||
Modules::plugMan().addObject(&Modules::mainWin());
|
Modules::plugMan().addObject(&Modules::mainWin());
|
||||||
|
|
||||||
|
#if !defined(NL_OS_MAC)
|
||||||
Modules::plugMan().setPluginPaths(QStringList() << QString("./plugins"));
|
Modules::plugMan().setPluginPaths(QStringList() << QString("./plugins"));
|
||||||
|
#else
|
||||||
|
Modules::plugMan().setPluginPaths(QStringList() <<
|
||||||
|
qApp->applicationDirPath() + QString("/../PlugIns/ovqt"));
|
||||||
|
#endif
|
||||||
|
|
||||||
Modules::plugMan().loadPlugins();
|
Modules::plugMan().loadPlugins();
|
||||||
|
|
||||||
QStringList errors;
|
QStringList errors;
|
||||||
|
|
|
@ -19,7 +19,7 @@ SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_EXAMPLE_MOC_SRC})
|
||||||
SOURCE_GROUP("Example Plugin" FILES ${SRC})
|
SOURCE_GROUP("Example Plugin" FILES ${SRC})
|
||||||
SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_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})
|
TARGET_LINK_LIBRARIES(ovqt_plugin_example nelmisc ${QT_LIBRARIES})
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_LOG_MOC_SRC})
|
||||||
SOURCE_GROUP("Log Plugin" FILES ${SRC})
|
SOURCE_GROUP("Log Plugin" FILES ${SRC})
|
||||||
SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_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})
|
TARGET_LINK_LIBRARIES(ovqt_plugin_log nelmisc ${QT_LIBRARIES})
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ SOURCE_GROUP(QtGeneratedMocSrc FILES ${OVQT_PLUG_SHEET_BUILDER_MOC_SRC})
|
||||||
SOURCE_GROUP("Sheet builder Plugin" FILES ${SRC})
|
SOURCE_GROUP("Sheet builder Plugin" FILES ${SRC})
|
||||||
SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_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})
|
TARGET_LINK_LIBRARIES(ovqt_plugin_sheet_builder nelmisc ${QT_LIBRARIES})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue