diff --git a/linphone-app/CMakeLists.txt b/linphone-app/CMakeLists.txt index 415dff304..414f05e16 100644 --- a/linphone-app/CMakeLists.txt +++ b/linphone-app/CMakeLists.txt @@ -328,12 +328,12 @@ if(ENABLE_BUILD_VERBOSE)#useful to copy these Paths to QML previewers endif() if(APPLE) if(MS2_PLUGINS_LOCATION) - set(MSPLUGINS_DIR ${MS2_PLUGINS_LOCATION}) + set(MSPLUGINS_DIR ${MS2_PLUGINS_LOCATION}) else() - set(MSPLUGINS_DIR "Frameworks/mediastreamer2.framework/Versions/A/Libraries") + set(MSPLUGINS_DIR "Frameworks/mediastreamer2.framework/Versions/A/Libraries") endif() else() - set(MSPLUGINS_DIR "${CMAKE_INSTALL_LIBDIR}/mediastreamer/plugins") + set(MSPLUGINS_DIR "plugins/mediastreamer") endif() configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.cmake" "${CMAKE_CURRENT_BINARY_DIR}/config.h") # ------------------------------------------------------------------------------ diff --git a/linphone-app/cmake_builder/linphone_package/CMakeLists.txt b/linphone-app/cmake_builder/linphone_package/CMakeLists.txt index 3b3cfa221..ce1be3c06 100644 --- a/linphone-app/cmake_builder/linphone_package/CMakeLists.txt +++ b/linphone-app/cmake_builder/linphone_package/CMakeLists.txt @@ -122,9 +122,10 @@ if (WIN32) file(GLOB PDB_FILES "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/*.pdb") install(FILES ${PDB_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}/" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/../../${EXECUTABLE_NAME}_app.pdb" DESTINATION ${CMAKE_INSTALL_BINDIR}) - endif() + endif() install(FILES ${EXE_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}/") - install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/mediastreamer" DESTINATION "${CMAKE_INSTALL_LIBDIR}" USE_SOURCE_PERMISSIONS) + file(GLOB PLUGINS_FILES "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/mediastreamer/plugins/*") + install(FILES ${PLUGINS_FILES} DESTINATION "plugins/mediastreamer/" ) file(GLOB GRAMMAR_FILES "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_DATAROOTDIR}/Belr/grammars/*") install(FILES ${GRAMMAR_FILES} DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/belr/grammars/" ) install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_DATAROOTDIR}/images" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}" USE_SOURCE_PERMISSIONS OPTIONAL) @@ -237,7 +238,8 @@ else()# Not Windows and Apple if(ENABLE_BUILD_VERBOSE) message("INSTALLATION : ${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_DATAROOTDIR}/" ) endif() - install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/mediastreamer" DESTINATION "${CMAKE_INSTALL_LIBDIR}" USE_SOURCE_PERMISSIONS) + file(GLOB PLUGINS_FILES "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/mediastreamer/plugins/*") + install(FILES ${PLUGINS_FILES} DESTINATION "plugins/mediastreamer/" ) # Install desktop/icon files. configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../../assets/linphone.desktop.cmake" "${CMAKE_CURRENT_BINARY_DIR}/../../${EXECUTABLE_NAME}.desktop" @ONLY) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/../../${EXECUTABLE_NAME}.desktop" DESTINATION "${CMAKE_INSTALL_DATADIR}/applications") diff --git a/linphone-app/src/app/paths/Paths.cpp b/linphone-app/src/app/paths/Paths.cpp index bdc4c3048..4e39aabe6 100644 --- a/linphone-app/src/app/paths/Paths.cpp +++ b/linphone-app/src/app/paths/Paths.cpp @@ -106,8 +106,10 @@ static inline string getWritableFilePath (const QString &filename) { // bin/linphone // lib/ // lib64/ +// plugins/ // share/ + // But in some cases, it can be : // /linphone // lib/ @@ -125,12 +127,11 @@ static inline string getWritableFilePath (const QString &filename) { static inline QDir getAppPackageDir () { QDir dir(QCoreApplication::applicationDirPath()); if (dir.dirName() == QLatin1String("MacOS")) { - dir.cdUp(); - + dir.cdUp(); } 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")) - qWarning() <<"The application's location is not correct: You have to put your 'bin/' folder next to 'lib/' folder."; + if(!dir.exists("lib") && !dir.exists("lib64") && !dir.exists("plugins")) + qWarning() <<"The application's location is not correct: You have to put your 'bin/' folder next to 'lib/' or 'plugins/' folder."; } return dir; } diff --git a/linphone-app/src/components/file/FileDownloader.cpp b/linphone-app/src/components/file/FileDownloader.cpp index 68f2ef445..331596531 100644 --- a/linphone-app/src/components/file/FileDownloader.cpp +++ b/linphone-app/src/components/file/FileDownloader.cpp @@ -136,7 +136,7 @@ void FileDownloader::handleDownloadFinished() { cleanDownloadEnd(); emit downloadFailed(); } else { - qInfo() << QStringLiteral("Download of %1 finished.").arg(mUrl.toString()); + qInfo() << QStringLiteral("Download of %1 finished to %2").arg(mUrl.toString(), mDestinationFile.fileName()); mDestinationFile.close(); cleanDownloadEnd(); emit downloadFinished(mDestinationFile.fileName()); diff --git a/linphone-app/src/components/sound-player/SoundPlayer.cpp b/linphone-app/src/components/sound-player/SoundPlayer.cpp index 35d8a708c..579f086d4 100644 --- a/linphone-app/src/components/sound-player/SoundPlayer.cpp +++ b/linphone-app/src/components/sound-player/SoundPlayer.cpp @@ -73,7 +73,8 @@ SoundPlayer::SoundPlayer (QObject *parent) : QObject(parent) { SoundPlayer::~SoundPlayer () { mForceCloseTimer->stop(); - mInternalPlayer->close(); + if( mInternalPlayer) + mInternalPlayer->close(); } // ----------------------------------------------------------------------------- diff --git a/linphone-app/tools/create_appimage.sh b/linphone-app/tools/create_appimage.sh index 888aa572c..8f36abff5 100755 --- a/linphone-app/tools/create_appimage.sh +++ b/linphone-app/tools/create_appimage.sh @@ -41,6 +41,16 @@ rm -rf "${WORK_DIR}/AppDir/usr/Packages" rm -rf "${WORK_DIR}/AppDir/usr/lib" rm -rf "${WORK_DIR}/AppDir/usr/lib64" +if [ -d "${BIN_SOURCE_DIR}/lib64/mediastreamer" ]; then + mkdir -p "${WORK_DIR}/AppDir/usr/plugins/" + cp -rf "${BIN_SOURCE_DIR}"/lib64/mediastreamer "${WORK_DIR}/AppDir/usr/plugins/" +fi + +if [ -d "${BIN_SOURCE_DIR}/lib/mediastreamer" ]; then + mkdir -p "${WORK_DIR}/AppDir/usr/plugins/" + cp -rf "${BIN_SOURCE_DIR}"/lib/mediastreamer "${WORK_DIR}/AppDir/usr/plugins/" +fi + if [ -f "${WORK_DIR}/AppBin/linuxdeploy-x86_64.AppImage" ]; then echo "linuxdeploy-x86_64.AppImage exists" else @@ -71,7 +81,7 @@ else #./linuxdeploy-x86_64.AppImage --appdir=${WORK_DIR}/ -e ${WORK_DIR}/app/bin/linphone --output appimage --desktop-file=${WORK_DIR}/app/share/applications/linphone.desktop -i ${WORK_DIR}/app/share/icons/hicolor/scalable/apps/linphone.svg echo "-- Code Signing of AppImage" if [ -z "$3" ]; then - ./${WORK_DIR}/AppBin/appimagetool-x86_64.AppImage ${WORK_DIR}/AppDir --sign --sign-key $2 + ./${WORK_DIR}/AppBin/appimagetool-x86_64.AppImage ${WORK_DIR}/AppDir --sign --sign-key $2 else ./${WORK_DIR}/AppBin/appimagetool-x86_64.AppImage ${WORK_DIR}/AppDir --sign --sign-key $2 --sign-args "--pinentry-mode loopback --passphrase $3" fi