xbus modifies library search path in order for QtDBus to find libdbus

refs #615
This commit is contained in:
Roland Winklmeier
2016-04-23 22:53:14 +02:00
parent d4248d2661
commit 21fe8d46ea
5 changed files with 75 additions and 20 deletions

View File

@@ -11,6 +11,8 @@
#include "service.h"
#include "traffic.h"
#include "weather.h"
#include "utils.h"
#include "blackmisc/librarypath.h"
namespace {
inline QString xbusServiceName() {
@@ -34,7 +36,15 @@ namespace XBus
Q_ASSERT(! m_server);
for (auto &item : m_startServerMenuItems) { item.setEnabled(false); }
auto previousLibraryPath = BlackMisc::getCustomLibraryPath();
auto libraryPath = g_xplanePath + "Resources" + g_sep + "plugins" + g_sep + "xbus";
#if !defined (Q_OS_MAC) && defined(WORD_SIZE_64)
libraryPath = libraryPath + g_sep + "64";
#endif
BlackMisc::setCustomLibraryPath(libraryPath);
m_server = new BlackMisc::CDBusServer(xbusServiceName(), address, this);
BlackMisc::setCustomLibraryPath(previousLibraryPath);
m_service = new CService(this);
m_traffic = new CTraffic(this);
m_weather = new CWeather(this);