diff --git a/linphone-app/src/app/main.cpp b/linphone-app/src/app/main.cpp index 71eab8f2e..df83da9af 100644 --- a/linphone-app/src/app/main.cpp +++ b/linphone-app/src/app/main.cpp @@ -30,9 +30,12 @@ FILE * gStream = NULL; #endif #include "components/core/CoreManager.hpp" -#include "components/vfs/VfsUtils.hpp" #include "utils/Utils.hpp" +#ifdef ENABLE_QT_KEYCHAIN +#include "components/vfs/VfsUtils.hpp" +#endif + // ============================================================================= void cleanStream(){ @@ -57,8 +60,13 @@ int main (int argc, char *argv[]) { freopen_s(&gStream, "CONOUT$", "w", stderr); } #endif + +#ifdef ENABLE_QT_KEYCHAIN bool vfsEncrypted = VfsUtils::updateSDKWithKey(); - +#else + bool vfsEncrypted = false; +#endif + AppController controller(argc, argv); #ifdef QT_QML_DEBUG QQmlDebuggingEnabler enabler; diff --git a/linphone-app/src/components/settings/SettingsModel.cpp b/linphone-app/src/components/settings/SettingsModel.cpp index d29c26a6f..1632c5a4e 100644 --- a/linphone-app/src/components/settings/SettingsModel.cpp +++ b/linphone-app/src/components/settings/SettingsModel.cpp @@ -68,7 +68,7 @@ SettingsModel::SettingsModel (QObject *parent) : QObject(parent) { connect(coreManager->getAccountSettingsModel(), &AccountSettingsModel::accountSettingsUpdated, this, &SettingsModel::groupChatEnabledChanged); connect(coreManager->getAccountSettingsModel(), &AccountSettingsModel::accountSettingsUpdated, this, &SettingsModel::videoConferenceEnabledChanged); connect(coreManager->getAccountSettingsModel(), &AccountSettingsModel::accountSettingsUpdated, this, &SettingsModel::secureChatEnabledChanged); - +#ifdef ENABLE_QT_KEYCHAIN connect(&mVfsUtils, &VfsUtils::keyRead, this, [&](const QString& key, const QString& value){ if(key == mVfsUtils.getApplicationVfsEncryptionKey()){ if(!getVfsEncrypted()){ @@ -100,7 +100,7 @@ SettingsModel::SettingsModel (QObject *parent) : QObject(parent) { connect(&mVfsUtils, &VfsUtils::error, this, [&](){ }); - +#endif configureRlsUri(); } @@ -1735,6 +1735,7 @@ bool SettingsModel::getVfsEncrypted (){ } void SettingsModel::setVfsEncrypted (bool encrypted, const bool deleteUserData){ +#ifdef ENABLE_QT_KEYCHAIN if(getVfsEncrypted() != encrypted){ if(encrypted) { mVfsUtils.newEncryptionKey(); @@ -1743,6 +1744,7 @@ void SettingsModel::setVfsEncrypted (bool encrypted, const bool deleteUserData){ mVfsUtils.deleteKey(mVfsUtils.getApplicationVfsEncryptionKey()); } } +#endif } // --------------------------------------------------------------------------- diff --git a/linphone-app/src/components/settings/SettingsModel.hpp b/linphone-app/src/components/settings/SettingsModel.hpp index f4167db3e..56231b323 100644 --- a/linphone-app/src/components/settings/SettingsModel.hpp +++ b/linphone-app/src/components/settings/SettingsModel.hpp @@ -29,9 +29,12 @@ #include "components/core/CoreHandlers.hpp" #include "components/contacts/ContactsImporterModel.hpp" -#include "components/vfs/VfsUtils.hpp" #include "utils/LinphoneEnums.hpp" +#ifdef ENABLE_QT_KEYCHAIN +#include "components/vfs/VfsUtils.hpp" +#endif + // ============================================================================= class TunnelModel; @@ -815,7 +818,9 @@ private: int mCurrentSettingsTab = 0; MediastreamerUtils::SimpleCaptureGraph *mSimpleCaptureGraph = nullptr; int mCaptureGraphListenerCount = 0; +#ifdef ENABLE_QT_KEYCHAIN VfsUtils mVfsUtils; +#endif std::shared_ptr mConfig; }; diff --git a/linphone-app/tools/create_appimage.sh b/linphone-app/tools/create_appimage.sh index 5f8a85dca..0e8431f39 100755 --- a/linphone-app/tools/create_appimage.sh +++ b/linphone-app/tools/create_appimage.sh @@ -49,6 +49,10 @@ cp -f "${BIN_SOURCE_DIR}/lib"/libapp-plugin* "${WORK_DIR}/AppDir/usr/lib/" cp -f "${BIN_SOURCE_DIR}/lib64"/libsoci_sqlite3* "${WORK_DIR}/AppDir/usr/lib/" cp -f "${BIN_SOURCE_DIR}/lib64"/libapp-plugin* "${WORK_DIR}/AppDir/usr/lib/" +cp -f "${BIN_SOURCE_DIR}/lib"/libEQt* "${WORK_DIR}/AppDir/usr/lib/" +cp -f "${BIN_SOURCE_DIR}/lib64"/libEQt* "${WORK_DIR}/AppDir/usr/lib/" + + 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/"