change modules from 'dll' to 'plugin'; macOS: search plugin in bundle;

This commit is contained in:
polos 2017-10-04 07:58:47 +02:00
parent 96739debda
commit 8ffe0bc0a4
10 changed files with 22 additions and 13 deletions

View file

@ -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) {

View file

@ -7,7 +7,7 @@
#include <QTimer>
#include <QStringList>
const char EQL::version[] = "17.9.1"; // September 2017
const char EQL::version[] = "17.10.1"; // October 2017
extern "C" void ini_EQL(cl_object);

View file

@ -1,6 +1,6 @@
QT += help printsupport uitools
TEMPLATE = lib
CONFIG += dll no_keywords release
CONFIG += plugin no_keywords release
INCLUDEPATH += ../src /usr/local/include
LIBS += -lecl -leql5 -L.. -L/usr/local/lib
TARGET = eql5_help

View file

@ -1,6 +1,6 @@
QT += multimedia multimediawidgets printsupport uitools
TEMPLATE = lib
CONFIG += dll no_keywords release
CONFIG += plugin no_keywords release
INCLUDEPATH += ../src /usr/local/include
LIBS += -lecl -leql5 -L.. -L/usr/local/lib
TARGET = eql5_multimedia

View file

@ -1,6 +1,6 @@
QT += network printsupport uitools
TEMPLATE = lib
CONFIG += dll no_keywords release
CONFIG += plugin no_keywords release
INCLUDEPATH += ../src /usr/local/include
LIBS += -lecl -leql5 -L.. -L/usr/local/lib
TARGET = eql5_network

View file

@ -1,6 +1,6 @@
QT += quick quickwidgets qml printsupport uitools
TEMPLATE = lib
CONFIG += dll no_keywords release
CONFIG += plugin no_keywords release
INCLUDEPATH += ../src /usr/local/include
LIBS += -lecl -leql5 -L.. -L/usr/local/lib
TARGET = eql5_quick

View file

@ -1,6 +1,6 @@
QT += sql printsupport uitools
TEMPLATE = lib
CONFIG += dll no_keywords release
CONFIG += plugin no_keywords release
INCLUDEPATH += ../src /usr/local/include
LIBS += -lecl -leql5 -L.. -L/usr/local/lib
TARGET = eql5_sql

View file

@ -1,6 +1,6 @@
QT += svg printsupport uitools
TEMPLATE = lib
CONFIG += dll no_keywords release
CONFIG += plugin no_keywords release
INCLUDEPATH += ../src /usr/local/include
LIBS += -lecl -leql5 -L.. -L/usr/local/lib
TARGET = eql5_svg

View file

@ -1,6 +1,6 @@
QT += webenginewidgets printsupport uitools
TEMPLATE = lib
CONFIG += dll no_keywords release
CONFIG += plugin no_keywords release
INCLUDEPATH += ../src /usr/local/include
LIBS += -lecl -leql5 -L.. -L/usr/local/lib
TARGET = eql5_webengine

View file

@ -1,6 +1,6 @@
QT += webkitwidgets printsupport uitools
TEMPLATE = lib
CONFIG += dll no_keywords release
CONFIG += plugin no_keywords release
INCLUDEPATH += ../src /usr/local/include
LIBS += -lecl -leql5 -L.. -L/usr/local/lib
TARGET = eql5_webkit