mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-21 13:48:08 +00:00
Set the resources path correctly when executing the application from a Mac OS X bundle.
This commit is contained in:
parent
97d308d064
commit
09fa8a8666
1 changed files with 17 additions and 2 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue