diff --git a/CMakeLists.txt b/CMakeLists.txt index a278823..fa0dfb7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,65 +1,59 @@ 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 5.41.0 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_SOURCE_DIR}/cmake) 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") # torch find_package(GStreamer 1.1.90 REQUIRED) find_package(GLIB2 REQUIRED) find_package(GObject REQUIRED) 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") 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(applets) add_subdirectory(containments) add_subdirectory(dialer) add_subdirectory(sounds) #add_subdirectory(touchscreentest) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt index 9977660..7d8eea4 100644 --- a/bin/CMakeLists.txt +++ b/bin/CMakeLists.txt @@ -1,4 +1,11 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/plasma-phone.cmake ${CMAKE_CURRENT_BINARY_DIR}/plasma-phone) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/plasma-phone PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ WORLD_EXECUTE WORLD_READ GROUP_EXECUTE GROUP_READ DESTINATION ${BIN_INSTALL_DIR}) +install(PROGRAMS kwinwrapper DESTINATION ${BIN_INSTALL_DIR}) + +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 +) diff --git a/bin/kwinwrapper b/bin/kwinwrapper new file mode 100755 index 0000000..44a6857 --- /dev/null +++ b/bin/kwinwrapper @@ -0,0 +1,30 @@ +#!/bin/sh + +[ -f /etc/profile ] && . /etc/profile + +export $(dbus-launch) +export QT_QPA_PLATFORM=wayland +export QT_QPA_PLATFORMTHEME=KDE +export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 +export XDG_CURRENT_DESKTOP=KDE +export KSCREEN_BACKEND=QScreen +export EGL_PLATFORM=wayland + +export KDE_FULL_SESSION=1 +export KDE_SESSION_VERSION=5 +export PLASMA_PLATFORM=phone +export QT_QUICK_CONTROLS_STYLE=Plasma +export QT_ENABLE_GLYPH_CACHE_WORKAROUND=1 +export QT_QUICK_CONTROLS_MOBILE=true + +# work around to fix : https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/1507584 +export LD_LIBRARY_PATH=/usr/lib/arm-linux-gnueabihf/libhybris-egl:$LD_LIBRARY_PATH + +if [ "`cat /sys/devices/virtual/dmi/id/board_name`" = "EXOPG06411" ]; then + # The ExoPC Slate from Akademy in Berlin only supports OpenGL 1.4, to get it to + # work with KWin (which requires 2.0), fake 2.0 support. + export MESA_GL_VERSION_OVERRIDE=2.0 +fi + +touch /tmp/simplelogin_starting +kwin_wayland --xwayland --libinput --inputmethod maliit-server plasma-phone diff --git a/bin/plasma-mobile.desktop.cmake b/bin/plasma-mobile.desktop.cmake new file mode 100644 index 0000000..65c8e94 --- /dev/null +++ b/bin/plasma-mobile.desktop.cmake @@ -0,0 +1,7 @@ +[Desktop Entry] +Exec=dbus-run-session ${CMAKE_INSTALL_FULL_BINDIR}/kwinwrapper +TryExec=${CMAKE_INSTALL_FULL_BINDIR}/kwinwrapper +DesktopNames=KDE +Name=Plasma Mobile +Comment=Plasma Mobile by KDE +X-KDE-PluginInfo-Version=${PROJECT_VERSION} diff --git a/plasma-mobile.desktop.cmake b/plasma-mobile.desktop.cmake deleted file mode 100644 index 74960c0..0000000 --- a/plasma-mobile.desktop.cmake +++ /dev/null @@ -1,42 +0,0 @@ -[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 -Name[ca]=Plasma Mòbil -Name[ca@valencia]=Plasma Mòbil -Name[de]=Plasma Mobile -Name[en_GB]=Plasma Mobile -Name[es]=Plasma Mobile -Name[fr]=Plasma Mobile -Name[gl]=Plasma Mobile -Name[it]=Plasma Mobile -Name[ko]=Plasma 모바일 -Name[nl]=Plasma-mobiel -Name[nn]=Plasma Mobile -Name[pl]=Plazma Mobile -Name[pt]=Plasma Mobile -Name[pt_BR]=Plasma Mobile -Name[sv]=Plasma mobil -Name[uk]=Мобільна Плазма -Name[x-test]=xxPlasma Mobilexx -Name[zh_TW]=Plasma 行動 -Comment=Plasma Mobile by KDE -Comment[ca]=Plasma Mòbil, creat per la comunitat KDE -Comment[ca@valencia]=Plasma Mòbil, creat per la comunitat KDE -Comment[de]=Plasma Mobile von KDE -Comment[en_GB]=Plasma Mobile by KDE -Comment[es]=Plasma Mobile creado por KDE -Comment[fr]=Plasma Mobile par KDE -Comment[gl]=Plasma Mobile de KDE -Comment[it]=Plasma Mobile creato da KDE -Comment[ko]=KDE의 Plasma 모바일 -Comment[nl]=Plasma-mobiel door KDE -Comment[nn]=Plasma Mobile frå KDE -Comment[pl]=Plazma Mobile stworzona przez KDE -Comment[pt]=Plasma Mobile do KDE -Comment[sv]=Plasma mobil av KDE -Comment[uk]=Мобільна Плазма від KDE -Comment[x-test]=xxPlasma Mobile by KDExx -Comment[zh_TW]=來自 KDE 的 Plasma 行動作業系統