Merge pull request #591 from mmuman/haiku-port

Preliminary Haiku port
This commit is contained in:
itsmattkc
2019-03-05 19:56:13 -08:00
committed by GitHub
5 changed files with 8 additions and 6 deletions
+2 -2
View File
@@ -146,7 +146,7 @@ void VSTHost::loadPlugin() {
#ifdef _WIN32
DWORD dll_err = GetLastError();
dll_error = QString::number(dll_err);
#elif __linux__
#elif defined(__linux__) || defined(__HAIKU__)
dll_error = dlerror();
#endif
qCritical() << "Failed to load VST plugin" << dll_fn << "-" << dll_error;
@@ -363,7 +363,7 @@ void VSTHost::show_interface(bool show) {
dispatcher(plugin, effEditOpen, 0, 0, reinterpret_cast<HWND>(dialog->windowHandle()->winId()), 0);
#elif defined(__APPLE__)
dispatcher(plugin, effEditOpen, 0, 0, reinterpret_cast<NSWindow*>(dialog->windowHandle()->winId()), 0);
#elif defined(__linux__)
#elif defined(__linux__) || defined(__HAIKU__)
dispatcher(plugin, effEditOpen, 0, 0, reinterpret_cast<void*>(dialog->windowHandle()->winId()), 0);
#endif
} else {
+2 -2
View File
@@ -26,7 +26,7 @@ ModulePtr LibLoad(const QString &filename) {
#ifdef _WIN32
LPCWSTR dll_fn_w = reinterpret_cast<const wchar_t*>(filename.utf16());
return LoadLibrary(dll_fn_w);
#elif defined(__linux__) || defined(__APPLE__)
#elif defined(__linux__) || defined(__APPLE__) || defined(__HAIKU__)
return dlopen(filename.toUtf8(), RTLD_LAZY);
#else
qWarning() << "Olive doesn't know how to open dynamic libraries on this platform, external libraries will not be functional";
@@ -37,7 +37,7 @@ ModulePtr LibLoad(const QString &filename) {
QStringList LibFilter() {
#ifdef _WIN32
return QStringList("*.dll");
#elif defined(__linux__) || defined(__APPLE__)
#elif defined(__linux__) || defined(__APPLE__) || defined(__HAIKU__)
return {"*.so", "*.dylib"};
#endif
}
+1 -1
View File
@@ -28,7 +28,7 @@
#define LibAddress GetProcAddress
#define LibClose FreeModule
#define ModulePtr HMODULE
#elif defined(__linux__) || defined(__APPLE__)
#elif defined(__linux__) || defined(__APPLE__) || defined(__HAIKU__)
#include <dlfcn.h>
#define LibAddress dlsym
#define LibClose dlclose
+2
View File
@@ -304,6 +304,8 @@ mac {
unix:!mac {
CONFIG += link_pkgconfig
PKGCONFIG += libavutil libavformat libavcodec libavfilter libswscale libswresample
}
unix:!mac:!haiku {
LIBS += -ldl
}
+1 -1
View File
@@ -231,7 +231,7 @@ void load_frei0r_effects() {
QList<QString> effect_dirs = get_effects_paths();
// add defined paths for frei0r plugins on unix
#if defined(__APPLE__) || defined(__linux__)
#if defined(__APPLE__) || defined(__linux__) || defined(__HAIKU__)
effect_dirs.prepend("/usr/lib/frei0r-1");
effect_dirs.prepend("/usr/local/lib/frei0r-1");
effect_dirs.prepend(QDir::homePath() + "/.frei0r-1/lib");