diff --git a/libretroshare/src/plugins/pluginmanager.cc b/libretroshare/src/plugins/pluginmanager.cc index 84af1fc86..28c2f340f 100644 --- a/libretroshare/src/plugins/pluginmanager.cc +++ b/libretroshare/src/plugins/pluginmanager.cc @@ -82,6 +82,8 @@ bool RsPluginManager::acceptablePluginName(const std::string& name) // #ifdef WINDOWS_SYS return name.size() > 4 && name.substr(name.size() - 4) == ".dll"; +#elif defined(__MACH__) + return name.size() > 6 && !strcmp(name.c_str()+name.size()-6,".dylib") ; #else return name.size() > 3 && !strcmp(name.c_str()+name.size()-3,".so") ; #endif diff --git a/plugins/Common/retroshare_plugin.pri b/plugins/Common/retroshare_plugin.pri index 2291b93f0..52fc91dea 100644 --- a/plugins/Common/retroshare_plugin.pri +++ b/plugins/Common/retroshare_plugin.pri @@ -68,7 +68,11 @@ win32 { } macx { - + #You can found some information here: + #https://developer.apple.com/library/mac/documentation/Porting/Conceptual/PortingUnix/compiling/compiling.html + QMAKE_LFLAGS_PLUGIN -= -dynamiclib + QMAKE_LFLAGS_PLUGIN += -bundle + QMAKE_LFLAGS_PLUGIN += -bundle_loader "../../retroshare-gui/src/RetroShare06.app/Contents/MacOS/RetroShare06" OBJECTS_DIR = temp/obj MOC_DIR = temp/moc diff --git a/plugins/FeedReader/FeedReader.pro b/plugins/FeedReader/FeedReader.pro index a989ecd64..64c698fe6 100644 --- a/plugins/FeedReader/FeedReader.pro +++ b/plugins/FeedReader/FeedReader.pro @@ -121,8 +121,6 @@ macx { INCLUDEPATH += . $$INC_DIR LIBS = -lcurl -lxml2 -lxslt -lcrypto - -error(Missing RetroShare-gui library. Remove Plugins from RetroShare.pro)) } openbsd-* { diff --git a/plugins/VOIP/VOIP.pro b/plugins/VOIP/VOIP.pro index 29bd3783c..c89ec4396 100644 --- a/plugins/VOIP/VOIP.pro +++ b/plugins/VOIP/VOIP.pro @@ -110,8 +110,6 @@ macx { message(Use system opencv libraries.) LIBS += -lopencv_core -lopencv_highgui -lopencv_imgproc } - -error(Missing RetroShare-gui library. Remove Plugins from RetroShare.pro)) } diff --git a/retroshare-gui/src/gui/PluginManager.cpp b/retroshare-gui/src/gui/PluginManager.cpp index c558954c6..8581cdae6 100644 --- a/retroshare-gui/src/gui/PluginManager.cpp +++ b/retroshare-gui/src/gui/PluginManager.cpp @@ -69,8 +69,10 @@ PluginManager::defaultLoad( ) //=== get current available plugins ===== QStringList currAvailable = workDir.entryList(QDir::Files); -#if defined(Q_OS_WIN) +#if defined(Q_OS_WIN) QRegExp trx("*.dll") ; +#elif defined(__MACH__) + QRegExp trx("*.dylib"); #else QRegExp trx("*.so"); #endif