mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
bin: Add development session support
This commit is contained in:
parent
b020230cd7
commit
c0642a6d41
4 changed files with 104 additions and 0 deletions
|
|
@ -10,3 +10,8 @@ install(FILES
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/plasma-mobile.desktop
|
${CMAKE_CURRENT_BINARY_DIR}/plasma-mobile.desktop
|
||||||
DESTINATION ${KDE_INSTALL_DATADIR}/wayland-sessions
|
DESTINATION ${KDE_INSTALL_DATADIR}/wayland-sessions
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# For Plasma developers
|
||||||
|
configure_file(startplasmamobile-dev.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/startplasmamobile-dev.sh)
|
||||||
|
configure_file(plasma-mobile-dev.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/plasma-mobile-dev.desktop)
|
||||||
|
configure_file(install-sessions.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/install-sessions.sh)
|
||||||
|
|
|
||||||
33
bin/install-sessions.sh.cmake
Executable file
33
bin/install-sessions.sh.cmake
Executable file
|
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# SPDX-FileCopyrightText: 2019 Aleix Pol Gonzalez <aleixpol@kde.org>
|
||||||
|
# SPDX-FileCopyrightText: 2021 Nate Graham <nate@kde.org>
|
||||||
|
# SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Make built-from-source sessions appear in login screen
|
||||||
|
sudo install @CMAKE_CURRENT_BINARY_DIR@/plasma-mobile-dev.desktop /usr/share/wayland-sessions/
|
||||||
|
install @CMAKE_CURRENT_BINARY_DIR@/startplasmamobile-dev.sh @CMAKE_INSTALL_FULL_LIBEXECDIR@
|
||||||
|
|
||||||
|
# Make the system DBus able to see any new DBus files that have been added to
|
||||||
|
# the built-from-source plasma session which are not yet present in the system
|
||||||
|
# DBus locations. Because some distros have security policies which prevent the
|
||||||
|
# use of DBus files in a user's homedir, and even symlinks outside,
|
||||||
|
# we have to copy the files into a system-owned location.
|
||||||
|
sudo mkdir -p /opt/kde-dbus-scripts/
|
||||||
|
sudo cp -r @KDE_INSTALL_FULL_DBUSDIR@/* /opt/kde-dbus-scripts/
|
||||||
|
if [ ! -f /etc/dbus-1/session-local.conf ]
|
||||||
|
then
|
||||||
|
cat > session-local.conf << EOF
|
||||||
|
<busconfig>
|
||||||
|
<servicedir>/opt/kde-dbus-scripts/services</servicedir>
|
||||||
|
<servicedir>/opt/kde-dbus-scripts/system-services</servicedir>
|
||||||
|
<includedir>/opt/kde-dbus-scripts/system.d/</includedir>
|
||||||
|
<includedir>/opt/kde-dbus-scripts/interfaces/</includedir>
|
||||||
|
</busconfig>
|
||||||
|
EOF
|
||||||
|
sudo mv session-local.conf /etc/dbus-1/
|
||||||
|
fi
|
||||||
|
|
||||||
47
bin/plasma-mobile-dev.desktop.cmake
Normal file
47
bin/plasma-mobile-dev.desktop.cmake
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
# SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
[Desktop Entry]
|
||||||
|
Exec=@CMAKE_INSTALL_FULL_LIBEXECDIR@/plasma-dbus-run-session-if-needed @CMAKE_INSTALL_FULL_LIBEXECDIR@/startplasmamobile-dev.sh
|
||||||
|
DesktopNames=KDE
|
||||||
|
Name=Plasma Mobile (Development)
|
||||||
|
Comment=Plasma Mobile by KDE
|
||||||
|
Comment[ast]=Plasma Mobile, por KDE
|
||||||
|
Comment[az]=KDE Plasma Mobil
|
||||||
|
Comment[ca]=Plasma Mobile, creat per la comunitat KDE
|
||||||
|
Comment[ca@valencia]=Plasma Mobile, creat per la comunitat KDE
|
||||||
|
Comment[cs]=Plasma Mobile od KDE
|
||||||
|
Comment[da]=Plasma Mobile fra KDE
|
||||||
|
Comment[de]=Plasma Mobile von KDE
|
||||||
|
Comment[en_GB]=Plasma Mobile by KDE
|
||||||
|
Comment[es]=Plasma Mobile creado por KDE
|
||||||
|
Comment[et]=KDE Plasma Mobile
|
||||||
|
Comment[eu]=Plasma Mugikorra KDEk egina
|
||||||
|
Comment[fi]=KDE:n Plasma Mobile
|
||||||
|
Comment[fr]=Plasma Mobile par KDE
|
||||||
|
Comment[gl]=Plasma Mobile de KDE
|
||||||
|
Comment[hi]=केडीइ द्वारा प्लाज़्मा मोबाइल
|
||||||
|
Comment[hu]=Plasma Mobile a KDE-től
|
||||||
|
Comment[ia]=Plasma Mobile per KDE
|
||||||
|
Comment[id]=Plasma Mobile oleh KDE
|
||||||
|
Comment[it]=Plasma Mobile creato da KDE
|
||||||
|
Comment[ka]=მობილური Plasma, KDE-სგან
|
||||||
|
Comment[ko]=KDE의 Plasma 모바일
|
||||||
|
Comment[lt]=Plasma mobilioji sąsaja pagal KDE
|
||||||
|
Comment[nl]=Plasma-mobiel door KDE
|
||||||
|
Comment[nn]=Plasma Mobile frå KDE
|
||||||
|
Comment[pa]=KDE ਵਲੋਂ ਪਲਾਜ਼ਮਾ ਮੋਬਾਈਲ
|
||||||
|
Comment[pl]=Plazma Mobile stworzona przez KDE
|
||||||
|
Comment[pt]=Plasma Mobile do KDE
|
||||||
|
Comment[pt_BR]=Plasma Mobile do KDE
|
||||||
|
Comment[ro]=Plasma Mobile, de către KDE
|
||||||
|
Comment[ru]=KDE Plasma Mobile
|
||||||
|
Comment[sk]=Plasma Mobile od KDE
|
||||||
|
Comment[sl]=Plasma Mobile od KDE
|
||||||
|
Comment[sv]=Plasma mobil av KDE
|
||||||
|
Comment[tr]=KDE tarafından yapılan Plasma Mobile
|
||||||
|
Comment[uk]=Мобільна Плазма від KDE
|
||||||
|
Comment[x-test]=xxPlasma Mobile by KDExx
|
||||||
|
Comment[zh_CN]=KDE Plasma Mobile
|
||||||
|
Comment[zh_TW]=來自 KDE 的 Plasma 行動作業系統
|
||||||
|
X-KDE-PluginInfo-Version=${PROJECT_VERSION}
|
||||||
19
bin/startplasmamobile-dev.sh.cmake
Executable file
19
bin/startplasmamobile-dev.sh.cmake
Executable file
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# SPDX-FileCopyrightText: 2019 Aleix Pol Gonzalez <aleixpol@kde.org>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
source @CMAKE_INSTALL_FULL_LIBEXECDIR@/plasma-dev-prefix.sh
|
||||||
|
|
||||||
|
# This is a bit of a hack done because systemd starts in pam, and we only set our dev paths after all that is complete
|
||||||
|
# This copies everything into a transient runtime directory that systemd reads and reloads the units
|
||||||
|
|
||||||
|
if [ ! -z "$XDG_RUNTIME_DIR" ]; then
|
||||||
|
mkdir -p "$XDG_RUNTIME_DIR/systemd/user.control"
|
||||||
|
command cp -r @KDE_INSTALL_FULL_SYSTEMDUSERUNITDIR@/* $XDG_RUNTIME_DIR/systemd/user.control
|
||||||
|
systemctl --user daemon-reload
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
startplasmamobile$@
|
||||||
|
|
||||||
Loading…
Reference in a new issue