Commit 09fa8a86 authored by Ghislain MARY's avatar Ghislain MARY

Set the resources path correctly when executing the application from a Mac OS X bundle.

parent 97d308d0
......@@ -20,12 +20,15 @@
* Author: Ronan Abhamon
*/
#include <QTimer>
#include "../../utils.hpp"
#include "../../app/Paths.hpp"
#include "CoreManager.hpp"
#include <QCoreApplication>
#include <QDir>
#include <QTimer>
using namespace std;
// =============================================================================
......@@ -33,6 +36,18 @@ using namespace std;
CoreManager *CoreManager::m_instance = nullptr;
CoreManager::CoreManager (QObject *parent) : QObject(parent), m_handlers(make_shared<CoreHandlers>()) {
QDir dir(QCoreApplication::applicationDirPath());
if (dir.dirName() == "MacOS") {
dir.cdUp();
dir.cd("Resources");
QDir mspluginsdir(dir);
mspluginsdir.cd("lib/mediastreamer/plugins");
QDir datadir(dir);
datadir.cd("share");
linphone::Factory::get()->setMspluginsDir(::Utils::qStringToLinphoneString(mspluginsdir.absolutePath()));
linphone::Factory::get()->setTopResourcesDir(::Utils::qStringToLinphoneString(datadir.absolutePath()));
}
m_core = linphone::Factory::get()->createCore(m_handlers, Paths::getConfigFilepath(), "");
m_core->setVideoDisplayFilter("MSOGL");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment