mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-03 22:56:49 +00:00
Fix Mediastreamer plugin loading[ci skip]
This commit is contained in:
parent
0d89be9cd9
commit
44041b5d94
2 changed files with 22 additions and 6 deletions
|
|
@ -411,8 +411,15 @@ else()
|
|||
# ------------------------------------------------------------------------------
|
||||
# Create config.h file
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
if(APPLE)
|
||||
if(MS2_PLUGINS_LOCATION)
|
||||
set(MSPLUGINS_DIR ${MS2_PLUGINS_LOCATION})
|
||||
else()
|
||||
set(MSPLUGINS_DIR "Frameworks/mediastreamer2.framework/Versions/A/Libraries")
|
||||
endif()
|
||||
else()
|
||||
set(MSPLUGINS_DIR "${CMAKE_INSTALL_LIBDIR}/mediastreamer/plugins")
|
||||
endif()
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.cmake" "${CMAKE_CURRENT_BINARY_DIR}/config.h")
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -113,15 +113,19 @@ static inline string getWritableFilePath (const QString &filename) {
|
|||
// lib64/
|
||||
// share/
|
||||
|
||||
// On Mac, we have :
|
||||
// Contents/
|
||||
// Frameworks/
|
||||
// MacOs/linphone
|
||||
// Plugins/
|
||||
// Resources/
|
||||
// share/
|
||||
|
||||
static inline QDir getAppPackageDir () {
|
||||
QDir dir(QCoreApplication::applicationDirPath());
|
||||
if (dir.dirName() == QLatin1String("MacOS")) {
|
||||
dir.cdUp();
|
||||
if (!dir.cd("Resources"))
|
||||
{
|
||||
dir.mkdir("Resources");
|
||||
dir.cd("Resources");
|
||||
}
|
||||
|
||||
} else if( !dir.exists("lib") && !dir.exists("lib64")){// Check if these folders are in the current path
|
||||
dir.cdUp();
|
||||
if(!dir.exists("lib") && !dir.exists("lib64"))
|
||||
|
|
@ -132,6 +136,11 @@ static inline QDir getAppPackageDir () {
|
|||
|
||||
static inline QString getAppPackageDataDirPath() {
|
||||
QDir dir = getAppPackageDir();
|
||||
if (!dir.cd("Resources"))
|
||||
{
|
||||
dir.mkdir("Resources");
|
||||
dir.cd("Resources");
|
||||
}
|
||||
if (!dir.cd("share"))
|
||||
{
|
||||
dir.mkdir("share");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue