Skip to content

Commit

Permalink
fix: start before kwin
Browse files Browse the repository at this point in the history
调整 dde-file-manager 启动顺序和依赖关系
删除 desktop 文件,从 autostart 移除

Log: start before kwin
  • Loading branch information
chenchongbiao authored and Johnson-zs committed Sep 19, 2023
1 parent 91523fe commit 660c213
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 12 deletions.
1 change: 1 addition & 0 deletions debian/dde-file-manager.conffiles
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
remove-on-upgrade /etc/xdg/autostart/dde-filemanager-server.desktop
1 change: 0 additions & 1 deletion debian/dde-file-manager.install
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ usr/lib/systemd/user/
etc/dbus-1/system.d/com.deepin.filemanager.daemon.conf
etc/X11/Xsession.d/99dfm-dlnfs-automount
etc/deepin/dde-file-manager/dfm-dlnfs-automount
etc/xdg/autostart
15 changes: 12 additions & 3 deletions src/apps/dde-file-manager-server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ set(SRCS
main.cpp
)

find_package(PkgConfig REQUIRED)
find_package(Qt5 COMPONENTS
Core
DBus
Expand All @@ -36,6 +37,16 @@ target_link_libraries(
${DtkWidget_LIBRARIES}
)

if (NOT DEFINED SYSTEMD_USER_UNIT_DIR)
pkg_get_variable(SYSTEMD_USER_UNIT_DIR systemd systemduserunitdir)
endif()

macro(install_symlink filepath wantsdir)
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/link/${wantsdir}/)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SYSTEMD_USER_UNIT_DIR}/${filepath} ${PROJECT_BINARY_DIR}/link/${wantsdir}/${filepath})
install(FILES ${PROJECT_BINARY_DIR}/link/${wantsdir}/${filepath} DESTINATION ${SYSTEMD_USER_UNIT_DIR}/${wantsdir}/)
endmacro(install_symlink)

# binary
install(TARGETS ${PROJECT_NAME} DESTINATION bin)

Expand All @@ -47,6 +58,4 @@ install(FILES dbusservice/org.deepin.filemanager.server.service
install(FILES dbusservice/dde-filemanager-server.service
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/systemd/user)

# xdg-autostart
install(FILES dbusservice/dde-filemanager-server.desktop
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/xdg/autostart)
install_symlink(dde-filemanager-server.service dde-session-initialized.target.wants)

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
[Unit]
Description=DDE File Manager Server

Requisite=dde-session-pre.target
After=dde-session-pre.target

Requisite=dde-session-initialized.target
PartOf=dde-session-initialized.target
Before=dde-session-initialized.target

[Service]
Type=dbus
BusName=org.deepin.filemanager.server
Expand Down

0 comments on commit 660c213

Please sign in to comment.