diff --git a/code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_manager.cpp b/code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_manager.cpp index 131342956..b2cef4a8b 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_manager.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_manager.cpp @@ -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 diff --git a/code/nel/tools/3d/object_viewer_qt/src/main.cpp b/code/nel/tools/3d/object_viewer_qt/src/main.cpp index b908a6ad6..1f972e0d4 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/main.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/main.cpp @@ -3,6 +3,7 @@ #include // Qt includes +#include #include #include #include @@ -11,6 +12,7 @@ #include #include #include +#include #include #include @@ -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; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/CMakeLists.txt index 33a485c61..e34c80e89 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/CMakeLists.txt @@ -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}) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/CMakeLists.txt index d24f6ec3a..e30b2258f 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/log/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/log/CMakeLists.txt @@ -9,7 +9,7 @@ SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin. ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h) SET(OVQT_PLUG_LOG_HDR log_plugin.h) -SET(OVQT_PLUG_LOG_UIS log_form.ui) +SET(OVQT_PLUG_LOG_UIS log_form.ui) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTOPENGL TRUE) @@ -17,13 +17,13 @@ SET(QT_USE_QTOPENGL TRUE) QT4_WRAP_CPP(OVQT_PLUG_LOG_MOC_SRC ${OVQT_PLUG_LOG_HDR}) QT4_WRAP_UI( OVQT_PLUG_LOG_UI_HDRS ${OVQT_PLUG_LOG_UIS} ) -SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_LOG_UIS}) +SOURCE_GROUP(QtResources FILES ${OVQT_PLUG_LOG_UIS}) SOURCE_GROUP(QtGeneratedUiHdr FILES ${OVQT_PLUG_LOG_UI_HDRS}) 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}) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/CMakeLists.txt index 5a9bc2913..148e872d5 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/ovqt_sheet_builder/CMakeLists.txt @@ -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})