mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-23 08:11:24 -04:00
Make Plugin working in Mac OSX.
This commit is contained in:
parent
b6b5f9cd17
commit
c5e6f62382
5 changed files with 10 additions and 6 deletions
|
@ -82,6 +82,8 @@ bool RsPluginManager::acceptablePluginName(const std::string& name)
|
||||||
//
|
//
|
||||||
#ifdef WINDOWS_SYS
|
#ifdef WINDOWS_SYS
|
||||||
return name.size() > 4 && name.substr(name.size() - 4) == ".dll";
|
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
|
#else
|
||||||
return name.size() > 3 && !strcmp(name.c_str()+name.size()-3,".so") ;
|
return name.size() > 3 && !strcmp(name.c_str()+name.size()-3,".so") ;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -68,7 +68,11 @@ win32 {
|
||||||
}
|
}
|
||||||
|
|
||||||
macx {
|
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
|
OBJECTS_DIR = temp/obj
|
||||||
MOC_DIR = temp/moc
|
MOC_DIR = temp/moc
|
||||||
|
|
|
@ -121,8 +121,6 @@ macx {
|
||||||
INCLUDEPATH += . $$INC_DIR
|
INCLUDEPATH += . $$INC_DIR
|
||||||
|
|
||||||
LIBS = -lcurl -lxml2 -lxslt -lcrypto
|
LIBS = -lcurl -lxml2 -lxslt -lcrypto
|
||||||
|
|
||||||
error(Missing RetroShare-gui library. Remove Plugins from RetroShare.pro))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
openbsd-* {
|
openbsd-* {
|
||||||
|
|
|
@ -110,8 +110,6 @@ macx {
|
||||||
message(Use system opencv libraries.)
|
message(Use system opencv libraries.)
|
||||||
LIBS += -lopencv_core -lopencv_highgui -lopencv_imgproc
|
LIBS += -lopencv_core -lopencv_highgui -lopencv_imgproc
|
||||||
}
|
}
|
||||||
|
|
||||||
error(Missing RetroShare-gui library. Remove Plugins from RetroShare.pro))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -69,8 +69,10 @@ PluginManager::defaultLoad( )
|
||||||
|
|
||||||
//=== get current available plugins =====
|
//=== get current available plugins =====
|
||||||
QStringList currAvailable = workDir.entryList(QDir::Files);
|
QStringList currAvailable = workDir.entryList(QDir::Files);
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
QRegExp trx("*.dll") ;
|
QRegExp trx("*.dll") ;
|
||||||
|
#elif defined(__MACH__)
|
||||||
|
QRegExp trx("*.dylib");
|
||||||
#else
|
#else
|
||||||
QRegExp trx("*.so");
|
QRegExp trx("*.so");
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue