diff --git a/CMakeLists.txt b/CMakeLists.txt index 47bbe1c4..bce17c58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,188 +1,190 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12) IF(POLICY CMP0053) CMAKE_POLICY(SET CMP0053 NEW) ENDIF(POLICY CMP0053) IF(POLICY CMP0048) CMAKE_POLICY(SET CMP0048 NEW) ENDIF(POLICY CMP0048) IF(POLICY CMP0017) CMAKE_POLICY(SET CMP0017 NEW) ENDIF(POLICY CMP0017) IF(POLICY CMP0028) CMAKE_POLICY(SET CMP0028 NEW) ENDIF(POLICY CMP0028) -SET(PROJECT_VERSION "3.0.0") +SET(PROJECT_VERSION "3.0.1") PROJECT(ring-kde) SET(QT_MIN_VERSION "5.9.0" ) SET(KF5_DEP_VERSION "5.6.0" ) SET(AKO_DEP_VERSION "4.89.0") OPTION(ENABLE_SINGLE_INSTANCE "Reuse instances of Ring-KDE when possible" ON) SET(LOCAL_CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/" ) LIST(APPEND CMAKE_MODULE_PATH "${LOCAL_CMAKE_MODULE_PATH}") FIND_PACKAGE(ECM 1.1.0 REQUIRED NO_MODULE) LIST(APPEND CMAKE_MODULE_PATH "${ECM_MODULE_PATH}") # libringqt isn't a "stable" library. Clients often only work with a very specific # commit and nothing else. To prevent using the wrong version, it is possible to # add a `libringqt` directory in the source. If present, that version will be used. IF(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/libringqt/") SET(LibRingQt_SRC "${CMAKE_CURRENT_SOURCE_DIR}/libringqt/") SET(ringqt_FOUND true) ELSE() FIND_PACKAGE ( LibRingQt QUIET CONFIG) ENDIF() # This package was developed for Ring-KDE. It is now a shared framework. Until # it is more widespread and stable, a copy is still included in Ring-KDE. -IF(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/libkquickview/") - SET(LibKQuickView_SRC "${CMAKE_CURRENT_SOURCE_DIR}/libkquickview/") +IF(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/libkquickitemviews/") + SET(LibKQuickView_SRC "${CMAKE_CURRENT_SOURCE_DIR}/libkquickitemviews/") SET(quickview_FOUND true) ELSE() - FIND_PACKAGE (KF5 REQUIRED COMPONENTS QuickView) + message("Download KQuickItemViews from `git clone https://anongit.kde.org/kquickitemviews/`") + message("and move it to `path/to/ring-kde/libkquickitemviews`") + #FIND_PACKAGE (KF5 REQUIRED COMPONENTS KQuickItemViews) ENDIF() # Download libringqt if it wasn't found to simplify the build process IF(NOT ringqt_FOUND) INCLUDE(cmake/FetchRingQt.cmake) SET(LibRingQt_SRC ${CMAKE_CURRENT_BINARY_DIR}/libringqt/) ENDIF() # Use the build-in copy if it has been found IF(LibRingQt_SRC) # Use the .a, not the .so; SET(ENABLE_STATIC true) LIST(APPEND CMAKE_MODULE_PATH "${LibRingQt_SRC}/cmake/") ADD_SUBDIRECTORY(${LibRingQt_SRC}) INCLUDE_DIRECTORIES(${LibRingQt_SRC}/src) ENDIF() IF(LibKQuickView_SRC) # Use the .a, not the .so; SET(ENABLE_STATIC true) ADD_SUBDIRECTORY(${LibKQuickView_SRC}) ENDIF() INCLUDE(ECMInstallIcons) INCLUDE(ECMOptionalAddSubdirectory) INCLUDE(KDEInstallDirs) INCLUDE(KDECMakeSettings) INCLUDE(KDECompilerSettings) INCLUDE(FeatureSummary) # So far only Linux systems use this feature, so it will print noise on all # platforms where the necessary infrastructure doesn't even exists, let alone # in use. IF(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux") SET(KDE_SKIP_TEST_SETTINGS 1) ENDIF() # Block known broken C++11 compilers IF (CMAKE_COMPILER_IS_GNUCC) EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) IF (GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8) MESSAGE(STATUS "Found GCC version >= 4.8: " ${GCC_VERSION}) ELSE() MESSAGE(FATAL_ERROR "Your version of GCC is too old, please install GCC 4.8 or later") ENDIF() ENDIF() SET(QT_USE_QT*) FIND_PACKAGE(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core Widgets Gui Svg PrintSupport QuickControls2 Quick ) #FIND_PACKAGE(Qt5TextToSpeech ${QT_MIN_VERSION} QUIET) #SET_PACKAGE_PROPERTIES(Qt5TextToSpeech PROPERTIES # PURPOSE "Speech support" #) IF (Qt5TextToSpeech_FOUND) ADD_DEFINITIONS(-DHAVE_SPEECH) ENDIF() FIND_PACKAGE(KF5 "${KF5_DEP_VERSION}" REQUIRED COMPONENTS Config GuiAddons DBusAddons I18n WindowSystem XmlGui Notifications IconThemes Crash NotifyConfig GlobalAccel Declarative Kirigami2 ) FIND_PACKAGE(KF5 "${AKO_DEP_VERSION}" QUIET COMPONENTS DocTools Akonadi AkonadiContact Contacts ) IF ( KF5_AKONADI_FOUND AND KF5_AKONADICONTACT_FOUND AND KF5_CONTACTS_FOUND) ADD_DEFINITIONS("-DENABLE_AKONADI=1") ENDIF() INCLUDE( ${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake ) # INCLUDE( ${QT_USE_FILE} ) ADD_SUBDIRECTORY( data ) ADD_SUBDIRECTORY( src ) ADD_SUBDIRECTORY( man ) IF (KF5_DOCTOOLS_FOUND OR KF5_DOC_TOOLS_FOUND) ADD_SUBDIRECTORY( doc ) ENDIF() IF(${ENABLE_TEST} MATCHES true) ADD_SUBDIRECTORY( src/test) ENDIF() # macOS IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") SET(MACOSX_BUNDLE ON) SET(MACOSX_BUNDLE_BUNDLE_NAME "Ring-KDE") SET(MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_VERSION}") SET(CMAKE_MACOSX_RPATH ON) SET(CMAKE_SKIP_BUILD_RPATH FALSE) SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) SET(CMAKE_INSTALL_RPATH "${CMAKE_CURRENT_SOURCE_DIR}") SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") SET(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_VERSION}) ADD_CUSTOM_TARGET(dist COMMAND git archive --prefix=${ARCHIVE_NAME}/ HEAD | gzip > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.gz WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) FEATURE_SUMMARY(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/cmake/FetchRingQt.cmake b/cmake/FetchRingQt.cmake index dc2066bb..9569e93d 100644 --- a/cmake/FetchRingQt.cmake +++ b/cmake/FetchRingQt.cmake @@ -1,73 +1,79 @@ # In case dring and LibRingQt are not found, fetch them from git and curl to # setup a minimal environment capable of building Ring-KDE. It also enable # static libraries to isolate Ring-KDE from any potential LRC API break. # # Ring-GNOME also enable static libraries for the same reason. This module # doesn't produce a "ready to use" binary. The daemon is still a separate # process. Single binary Ring isn't officially supported on Linux and sending # patches to keep it working upstream will only annoy its maintainer before # being ignored. CMAKE_MINIMUM_REQUIRED(VERSION 3.0) find_package(Git REQUIRED) include(ExternalProject) # Fetch the XMLs set(XML_PATH ${CMAKE_CURRENT_BINARY_DIR}/xml/) if ((NOT ${ENABLE_LIBWRAP}) AND (NOT EXISTS ${XML_PATH}/cx.ring.Ring.CallManager.xml)) message(STATUS "Downloading the GNU Ring API definition") file(DOWNLOAD https://raw.githubusercontent.com/savoirfairelinux/ring-daemon/master/bin/dbus/cx.ring.Ring.CallManager.xml ${XML_PATH}cx.ring.Ring.CallManager.xml INACTIVITY_TIMEOUT 30) file(DOWNLOAD https://raw.githubusercontent.com/savoirfairelinux/ring-daemon/master/bin/dbus/cx.ring.Ring.ConfigurationManager.xml ${XML_PATH}cx.ring.Ring.ConfigurationManager.xml INACTIVITY_TIMEOUT 30) file(DOWNLOAD https://raw.githubusercontent.com/savoirfairelinux/ring-daemon/master/bin/dbus/cx.ring.Ring.Instance.xml ${XML_PATH}cx.ring.Ring.Instance.xml INACTIVITY_TIMEOUT 30) file(DOWNLOAD https://raw.githubusercontent.com/savoirfairelinux/ring-daemon/master/bin/dbus/cx.ring.Ring.PresenceManager.xml ${XML_PATH}cx.ring.Ring.PresenceManager.xml INACTIVITY_TIMEOUT 30) file(DOWNLOAD https://raw.githubusercontent.com/savoirfairelinux/ring-daemon/master/bin/dbus/cx.ring.Ring.VideoManager.xml ${XML_PATH}cx.ring.Ring.VideoManager.xml INACTIVITY_TIMEOUT 30) file(DOWNLOAD https://raw.githubusercontent.com/savoirfairelinux/ring-daemon/master/bin/dbus/cx.ring.Ring.VideoManager.xml ${XML_PATH}cx.ring.Ring.VideoManager.xml INACTIVITY_TIMEOUT 30) # Fetch the constants file(DOWNLOAD https://raw.githubusercontent.com/savoirfairelinux/ring-daemon/master/src/dring/account_const.h ${CMAKE_CURRENT_BINARY_DIR}/dring/account_const.h INACTIVITY_TIMEOUT 30) file(DOWNLOAD https://raw.githubusercontent.com/savoirfairelinux/ring-daemon/master/src/dring/security_const.h ${CMAKE_CURRENT_BINARY_DIR}/dring/security_const.h INACTIVITY_TIMEOUT 30) file(DOWNLOAD https://raw.githubusercontent.com/savoirfairelinux/ring-daemon/master/src/dring/media_const.h ${CMAKE_CURRENT_BINARY_DIR}/dring/media_const.h INACTIVITY_TIMEOUT 30) file(DOWNLOAD https://raw.githubusercontent.com/savoirfairelinux/ring-daemon/master/src/dring/call_const.h ${CMAKE_CURRENT_BINARY_DIR}/dring/call_const.h INACTIVITY_TIMEOUT 30) file(DOWNLOAD https://raw.githubusercontent.com/savoirfairelinux/ring-daemon/master/src/dring/presence_const.h ${CMAKE_CURRENT_BINARY_DIR}/dring/presence_const.h INACTIVITY_TIMEOUT 30) endif() message(STATUS "Fetching LibRingQt from GitHub") if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/libringqt) execute_process(COMMAND git clone https://github.com/Elv13/libringqt.git --branch master ${CMAKE_CURRENT_BINARY_DIR}/libringqt ) else() execute_process(COMMAND /bin/sh -c "cd ${CMAKE_CURRENT_BINARY_DIR}/libringqt && git fetch origin && git reset --hard origin/master" ) endif() +if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/libkquickitemviews) + execute_process(COMMAND + git clone http://anongit.kde.org/kquickitemviews/--branch master ${CMAKE_CURRENT_BINARY_DIR}/libkquickitemviews + ) +endif() + # Build LibRingQt SET(RING_XML_INTERFACES_DIR ${XML_PATH}) SET(ring_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/dring/) diff --git a/data/config.ini b/data/config.ini index 3710b479..8886b98f 100644 --- a/data/config.ini +++ b/data/config.ini @@ -1,16 +1,16 @@ # # you can use remove, addPo, addDocs, set docs to yes if an app has # doc translations, etc. # [ring-kde] mainmodule = extragear name = ring-kde submodule = pim folder = ring-kde kde_release = no -version = 3.0.0 +version = 3.0.1 docs = yes translations = yes gitModule = yes custompo = ring-kde diff --git a/src/main.cpp b/src/main.cpp index 1e004839..be04ae61 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,110 +1,110 @@ /*************************************************************************** * Copyright (C) 2009-2015 by Savoir-Faire Linux * * Author : Jérémy Quentin * * Emmanuel Lepage Vallee * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 3 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program. If not, see . * **************************************************************************/ //Qt #include #include #include //KDE #include #include #include //Ring #include "ringapplication.h" #include "klib/kcfg_settings.h" #include "cmd.h" #include #include Q_IMPORT_PLUGIN(KQuickView) -constexpr static const char version[] = "3.0.0"; +constexpr static const char version[] = "3.0.1"; int main(int argc, char **argv) { try { //QQmlDebuggingEnabler enabler; QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); RingApplication app( argc, argv ); KLocalizedString::setApplicationDomain("ring-kde"); //FIXME remove qobject_cast(qt_static_plugin_KQuickView().instance())->registerTypes("org.kde.playground.kquickview"); KAboutData about(QStringLiteral("ring-kde"), i18n("ring-kde"), /*QStringLiteral(*/version/*)*/, i18n("RING, a secured and distributed communication software"), KAboutLicense::GPL_V3, i18n("(C) 2004-2015 Savoir-faire Linux\n2016-2017 Emmanuel Lepage Vallee"), QString(), QStringLiteral("http://www.ring.cx"), QStringLiteral("ring@gnu.org") ); about.setOrganizationDomain(QByteArray("kde.org")); about.setProgramLogo(QImage(QStringLiteral(":appicon/icons/64-apps-ring-kde.png"))); about.addAuthor( i18n( "Emmanuel Lepage-Vallée" ), QString(), QStringLiteral("elv1313@gmail.com" )); about.addAuthor( i18n( "Alexandre Lision" ), QString(), QStringLiteral("alexandre.lision@savoirfairelinux.com")); about.addCredit( i18n( "Based on the SFLphone teamworks" ), QString(), QString() ); if (!Cmd::parseCmd(argc, argv, about)) return 0; KAboutData::setApplicationData(about); app.setOrganizationDomain(QStringLiteral("ring.cx")); //Only start the application once #ifdef Q_OS_LINUX #ifndef DISABLE_KDBUS_SERVICE KDBusService service(KDBusService::Unique); QObject::connect(&service, &KDBusService::activateActionRequested, Cmd::instance(), &Cmd::slotActivateActionRequested); QObject::connect(&service, &KDBusService::activateRequested , Cmd::instance(), &Cmd::slotActivateRequested ); QObject::connect(&service, &KDBusService::openRequested , Cmd::instance(), &Cmd::slotOpenRequested ); #endif #endif //The app will have quitted by now if an instance already exist app.newInstance(); const int retVal = app.exec(); ConfigurationSkeleton::self()->save(); return retVal; } catch(const char * msg) { qDebug() << msg; } catch(QString& msg) { qDebug() << msg; } } // kate: space-indent on; indent-width 3; replace-tabs on;