chore: update dependency of Application Manager Service
Signed-off-by: ComixHe <heyuming@deepin.org>
This commit is contained in:
parent
3a9973c772
commit
d198ecebc8
@ -3,6 +3,12 @@
|
|||||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
macro(install_symlink filepath wantsdir)
|
||||||
|
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/link/${wantsdir}/)
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_INSTALL_PREFIX}/lib/systemd/user/${filepath} ${PROJECT_BINARY_DIR}/link/${wantsdir}/${filepath})
|
||||||
|
install(FILES ${PROJECT_BINARY_DIR}/link/${wantsdir}/${filepath} DESTINATION lib/systemd/user/${wantsdir}/)
|
||||||
|
endmacro(install_symlink)
|
||||||
|
|
||||||
# # systemd service
|
# # systemd service
|
||||||
configure_file(
|
configure_file(
|
||||||
systemd/user/org.desktopspec.ApplicationManager1.service.in
|
systemd/user/org.desktopspec.ApplicationManager1.service.in
|
||||||
@ -14,7 +20,12 @@ set(SYSTEMD_USER_FILE
|
|||||||
${CMAKE_CURRENT_BINARY_DIR}/systemd/user/org.desktopspec.ApplicationManager1.service
|
${CMAKE_CURRENT_BINARY_DIR}/systemd/user/org.desktopspec.ApplicationManager1.service
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES ${SYSTEMD_USER_FILE} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/systemd/user/)
|
set(SERVICE_DEST_PATH ${CMAKE_INSTALL_PREFIX}/lib/systemd/user/)
|
||||||
|
|
||||||
|
install(FILES ${SYSTEMD_USER_FILE} DESTINATION ${SERVICE_DEST_PATH})
|
||||||
|
|
||||||
|
# create a symlink to dde-session
|
||||||
|
install_symlink(org.desktopspec.ApplicationManager1.service dde-session-initialized.target.wants)
|
||||||
|
|
||||||
# # dbus activate
|
# # dbus activate
|
||||||
configure_file(
|
configure_file(
|
||||||
|
@ -4,12 +4,22 @@
|
|||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Deepin Application Manager
|
Description=Deepin Application Manager
|
||||||
|
RefuseManualStart=no
|
||||||
|
RefuseManualStop=no
|
||||||
|
StartLimitBurst=3
|
||||||
|
CollectMode=inactive-or-failed
|
||||||
|
|
||||||
|
Requisite=dde-session-initialized.target
|
||||||
|
PartOf=dde-session-initialized.target
|
||||||
|
Before=dde-session-initialized.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=dbus
|
Type=dbus
|
||||||
BusName=org.desktopspec.ApplicationManager1
|
BusName=org.desktopspec.ApplicationManager1
|
||||||
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/dde-application-manager-reborn
|
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/dde-application-manager-reborn
|
||||||
Restart=always
|
|
||||||
Environment=QT_LOGGING_RULES="*.debug=false"
|
Environment=QT_LOGGING_RULES="*.debug=false"
|
||||||
PrivateUsers=false
|
|
||||||
# turn off PrivateUser to prevent AM can't access some directory. eg. "/persistent/linglong"
|
# turn off PrivateUser to prevent AM can't access some directory. eg. "/persistent/linglong"
|
||||||
|
PrivateUsers=false
|
||||||
|
Slice=session.slice
|
||||||
|
Restart=always
|
||||||
|
RestartSec=500ms
|
||||||
|
Loading…
Reference in New Issue
Block a user