diff --git a/CMakeLists.txt b/CMakeLists.txt index 609ccac..655a668 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,60 +1,66 @@ project(plasma-phone-components) # minimal requirements cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR) set (QT_MIN_VERSION "5.2.0") set(KF5_MIN_VERSION "5.0.0") set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) find_package(ECM 0.0.9 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings) include(ECMOptionalAddSubdirectory) include(ECMInstallIcons) include(ECMSetupVersion) include(ECMMarkNonGuiExecutable) include(ECMGenerateHeaders) include(GenerateExportHeader) include(FeatureSummary) find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core Gui Widgets Qml Quick Test) find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Plasma Service Declarative I18n KIO People) find_package(KF5 REQUIRED COMPONENTS PlasmaQuick DBusAddons Notifications) find_package(TelepathyQt5 REQUIRED) find_package(KF5Wayland CONFIG) set_package_properties(KF5Wayland PROPERTIES TYPE REQUIRED PURPOSE "Required for interacting with the compositor") feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) include(CheckIncludeFiles) plasma_install_package(look-and-feel org.kde.plasma.phone look-and-feel) plasma_install_package(shell org.kde.plasma.phone shells) install(DIRECTORY wallpaper/ DESTINATION "${WALLPAPER_INSTALL_DIR}/org.kde.plasma.phone.lockers") #kpackage_install_package(phonebook org.kde.phone.phonebook genericqml) #install(FILES phonebook/metadata.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} RENAME org.kde.phone.phonebook.desktop) install( DIRECTORY kwinmultitasking/ DESTINATION ${DATA_INSTALL_DIR}/kwin/scripts/org.kde.phone.multitasking ) install( FILES kwinmultitasking/metadata.desktop DESTINATION ${SERVICES_INSTALL_DIR} RENAME kwin-script-org.kde.phone.multitasking.desktop ) install( DIRECTORY qtvirtualkeyboardplugin/ DESTINATION ${KDE_INSTALL_QMLDIR}/QtQuick/VirtualKeyboard/Styles/Plasma ) +configure_file(plasma-mobile.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/plasma-mobile.desktop) +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/plasma-mobile.desktop + DESTINATION ${KDE_INSTALL_DATADIR}/wayland-sessions +) + add_subdirectory(bin) #add_subdirectory(services) add_subdirectory(applets) add_subdirectory(containments) add_subdirectory(components) add_subdirectory(dialer) add_subdirectory(sounds) add_subdirectory(touchscreentest) diff --git a/plasma-mobile.desktop.cmake b/plasma-mobile.desktop.cmake new file mode 100644 index 0000000..601118a --- /dev/null +++ b/plasma-mobile.desktop.cmake @@ -0,0 +1,7 @@ +[Desktop Entry] +Encoding=UTF-8 +Exec=dbus-launch --exit-with-session ${CMAKE_INSTALL_FULL_BINDIR}/startplasmacompositor +TryExec=${CMAKE_INSTALL_FULL_BINDIR}/startplasmacompositor +DesktopNames=KDE +Name=Plasma Mobile +Comment=Plasma Mobile by KDE diff --git a/shell/contents/loader.qml b/shell/contents/loader.qml index 79e34f6..9d8fac8 100644 --- a/shell/contents/loader.qml +++ b/shell/contents/loader.qml @@ -1,34 +1,34 @@ /* vim:set foldmethod=marker: * * Copyright (C) 2013 Ivan Cukic * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, * or (at your option) any later version, as published by the Free * Software Foundation * * 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, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2 Item { id: main property string shell : "org.kde.plasma.phone" property bool willing : true - property int priority : 10 + property int priority : currentSession == "plasma-mobile" ? 0 : 10 // This is not needed, but allows the // handler to know whether its shell is loaded property bool loaded : false }