|
From: Oliver O. <fr...@us...> - 2007-03-07 09:57:45
|
Update of /cvsroot/simspark/simspark/spark/salt In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8781 Modified Files: Tag: projectx sharedlibrary.cpp Log Message: added ../plugins/ to the dlopen search dir (mainly to get MacOS apps running in application folders) Index: sharedlibrary.cpp =================================================================== RCS file: /cvsroot/simspark/simspark/spark/salt/sharedlibrary.cpp,v retrieving revision 1.3.2.3 retrieving revision 1.3.2.3.2.1 diff -C2 -d -r1.3.2.3 -r1.3.2.3.2.1 *** sharedlibrary.cpp 6 Mar 2007 06:02:08 -0000 1.3.2.3 --- sharedlibrary.cpp 7 Mar 2007 09:57:41 -0000 1.3.2.3.2.1 *************** *** 80,84 **** mLibHandle = ::dlopen((libName + ".so").c_str(), RTLD_LAZY); ! if (mLibHandle == NULL) { std::cerr << "(SharedLibrary) ERROR: dlopen failed for " << libName --- 80,97 ---- mLibHandle = ::dlopen((libName + ".so").c_str(), RTLD_LAZY); ! if (mLibHandle == 0) ! { // we didn't find the plugin, so we try again... ! /* mainly to work with MacOS bundles, so that plugins can be located like this: ! application.app/ ! | ! \- Contents/ ! | ! --MacOS/ < - application lives here - > ! | ! --plugins/ < - plugins live here - > ! */ ! mLibHandle = ::dlopen(("../plugins/" + libName + ".so").c_str(), RTLD_LAZY); ! } ! if (mLibHandle == 0) { std::cerr << "(SharedLibrary) ERROR: dlopen failed for " << libName |