mirror of
https://gitlab.com/eql/EQL5.git
synced 2026-01-14 05:11:18 -08:00
change modules from 'dll' to 'plugin'; macOS: search plugin in bundle;
This commit is contained in:
parent
96739debda
commit
8ffe0bc0a4
10 changed files with 22 additions and 13 deletions
|
|
@ -2434,10 +2434,19 @@ cl_object qrequire2(cl_object l_name, cl_object l_quiet) { /// qrequire
|
|||
ecl_process_env()->nvalues = 1;
|
||||
QString name = symbolName(l_name);
|
||||
QString fileName = "eql5_" + name;
|
||||
QLibrary lib(fileName); // global library
|
||||
if(!lib.load()) {
|
||||
fileName.prepend("/usr/local/lib/"); // "local" might not be in library search path
|
||||
lib.setFileName(fileName); }
|
||||
QLibrary lib(fileName);
|
||||
QStringList libPaths = QCoreApplication::libraryPaths();
|
||||
#ifdef Q_OS_MACOS
|
||||
// try bundle first
|
||||
QString appPath(QCoreApplication::applicationDirPath());
|
||||
if(appPath.contains(".app/") {
|
||||
libPaths.prepend(appPath + "/../libs")); }
|
||||
else {
|
||||
libPaths.prepend("/usr/local/lib"); }
|
||||
#else
|
||||
libPaths.prepend("/usr/local/lib");
|
||||
#endif
|
||||
QCoreApplication::setLibraryPaths(libPaths);
|
||||
typedef void (*Ini)();
|
||||
Ini ini = (Ini)lib.resolve("ini");
|
||||
if(ini) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue