diff --git a/CMakeLists.txt b/CMakeLists.txt index 2dd734f6..7b754925 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,195 +1,195 @@ 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.1") +SET(PROJECT_VERSION "3.1.0") 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) IF (ringqt_FOUND) FIND_PACKAGE ( LibRingQtQuick REQUIRED CONFIG) ENDIF() ENDIF() FIND_PACKAGE (KQuickItemViews QUIET CONFIG) # 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(NOT KQuickItemViews_FOUND AND IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/libkquickitemviews/") SET(LibKQuickItemViews_SRC "${CMAKE_CURRENT_SOURCE_DIR}/libkquickitemviews/") SET(libkquickitemviews_FOUND true) ADD_DEFINITIONS(-DKQUICKITEMVIEWS_USE_STATIC_PLUGIN=1) ELSEIF(NOT KQuickItemViews_FOUND) message(FATAL_ERROR "Download KQuickItemViews from `git clone https://anongit.kde.org/kquickitemviews/` and move it to `path/to/ring-kde/libkquickitemviews`") 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(LibKQuickItemViews_SRC) # Use the .a, not the .so; SET(ENABLE_STATIC true) ADD_SUBDIRECTORY(${LibKQuickItemViews_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/data/config.ini b/data/config.ini index 8886b98f..49ad7d24 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.1 +version = 3.1.0 docs = yes translations = yes gitModule = yes custompo = ring-kde diff --git a/src/main.cpp b/src/main.cpp index 25c37c77..2b168973 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,124 +1,124 @@ /*************************************************************************** * 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 #ifdef KQUICKITEMVIEWS_USE_STATIC_PLUGIN Q_IMPORT_PLUGIN(KQuickItemViews) #else #include #endif Q_IMPORT_PLUGIN(RingQtQuick) -constexpr static const char version[] = "3.0.1"; +constexpr static const char version[] = "3.1.0"; int main(int argc, char **argv) { try { //QQmlDebuggingEnabler enabler; QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); RingApplication app( argc, argv ); KLocalizedString::setApplicationDomain("ring-kde"); //FIXME remove #ifdef KQUICKITEMVIEWS_USE_STATIC_PLUGIN qobject_cast(qt_static_plugin_KQuickItemViews().instance())->registerTypes("org.kde.playground.kquickitemviews"); #else KQuickItemViews v; v.registerTypes("org.kde.playground.kquickitemviews"); #endif qobject_cast(qt_static_plugin_RingQtQuick().instance())->registerTypes("net.lvindustries.ringqtquick"); 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;